Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to navigate internal storage to export database #6397

Closed
2 tasks done
ghost opened this issue May 29, 2021 · 14 comments · Fixed by #6402
Closed
2 tasks done

Unable to navigate internal storage to export database #6397

ghost opened this issue May 29, 2021 · 14 comments · Fixed by #6402
Labels
bug Issue is related to a bug

Comments

@ghost
Copy link

ghost commented May 29, 2021

Checklist

  • I am using the latest version - 0.21.3
  • I checked, but didn't find any duplicates (open OR closed) of this issue in the repo.

Steps to reproduce the bug

  1. Go to 'Settings, Content, Export database'
  2. Allow permissions if necessary.
  3. Navigate to external drive, and attempt to save. NOTE: The default save folder has now changed, locking you out of any ability to ever navigate to a viable folder, and effectively making the database unsavable.
  4. After save fails (see Database export to removable storage fails on Android 10 #5198 ) attempt to navigate back to internal storage.
  5. Many folders are not displayed, especially the folder(s) necessary to navigate back to a viable internal save folder.

Device info

  • Android version/Custom ROM version: android 9 / lineage 16.
  • Device model: xt1687
@ghost ghost added the bug Issue is related to a bug label May 29, 2021
@triallax
Copy link
Contributor

I'm not sure I understand the problem. I understand that you weren't able to export your database, but if you uninstalled NewPipe without exporting a backup, of course you're going to lose all your data. Could you clarify?

@ghost
Copy link
Author

ghost commented May 29, 2021

the bug is an inability to see folders to navigate back to internal storage

@ghost
Copy link
Author

ghost commented May 29, 2021

Screenshot_20210529-115107_NewPipe
as you can see, this is at root, only showing the virtual .. folder. there is no place to go.

@triallax
Copy link
Contributor

Then could you please edit the issue and its title to reflect this? Right now, the issue sounds like it complains about NewPipe losing its database after uninstalling, not of the inability to see folders in internal storage.

@triallax triallax changed the title Export database fails completely, internal and external, unable to navigate, LOST WHOLE DATABASE Unable to navigate internal storage to export database May 29, 2021
@triallax
Copy link
Contributor

Nevermind, I edited both the issue and the title.

@ghost
Copy link
Author

ghost commented May 29, 2021

also, there are plenty of sloppy apps out there that would NOT delete user settings (database) upon uninstall. so it's not obvious that was going to happen. congrats, NewPipe isn't that kind of app. but right now it's worse because of this bug. but personally i'm against the whole philosophy of storing/hiding user-data in program files areas. i.e., i would prefer the database be a file in a user directory apart from installation files. that is how linux is supposed to operate.

@triallax
Copy link
Contributor

also, there are plenty of sloppy apps out there that would NOT delete user settings (database) upon uninstall.

Can you clarify this part? NewPipe doesn't itself delete data when it's uninstalled; Android does that.

i would prefer the database be a file in a user directory apart from installation files. that is how linux is supposed to operate.

This is how Android works; each app has its own storage area where it's free to do as it pleases and that other apps are not allowed to access. Changing that would require getting permission to access the filesystem, which I imagine many would feel uncomfortable with. I'm not trying to side with any point of view here; this is just how Android works.

@opusforlife2
Copy link
Collaborator

If I understand this issue correctly, then this was an unintended consequence of the PR that implemented saving the backup location. If that backup location later becomes inaccessible for whatever reason (here it seems to be on an SD Card that is no longer inserted) then the folder picker behaves like in the screenshot shown above.

The simplest solution would be to implement a fallback, I think. If the app cannot find the backup folder, it should show the root directory of the internal storage.

@ATofighi Is this correct?

@ATofighi
Copy link
Contributor

@opusforlife2 I did a simple check on #6319 for directory existence on https://github.com/TeamNewPipe/NewPipe/pull/6319/files#diff-1609dad9ee8508ad8521334fdcdf214ab32a8bc3c27a8a6e6f6b857695d48c3bR71 . But it seems that it not work for this situation.

@opusforlife2
Copy link
Collaborator

Oh. Okay. Then let's see if #6402 successfully fixes it.

@ghost
Copy link
Author

ghost commented Jun 1, 2021

i didn't remove my SD card. it just wouldn't save on SD, so i tried to navigate back to internal storage. the /storage/emulated/0 folder was missing, and then i navigated to the root, and then i was stuck.

so, the app CAN find the backup folder (SD card), but i can't navigate from there to internal storage.

@ghost
Copy link
Author

ghost commented Jun 1, 2021

i tested #6402 which, for now, successfully works around the issue. after attempting and failing to save on SD, when i try again to export the database it starts me in /storage/emulated/0 where i can save, instead of the SD card folder which leaves me unable to save or navigate back to internal storage.

however, the underlying issue remains: when i navigate to /storage/emulated it does not show the "0" folder... and, similarly, if i navigate to root i am stuck and can see nothing. this has not changed. i saw this same exact behavior with the same type of file browser screen in another app i was considering yesterday (Timbre v3.1.8), so it seems this underlying issue is not specific to newpipe. (fyi: in /storage i can see 3 folders: my SD card, emulated and self. navigating from storage/emulated/0 to SD card has never been a problem).

i say #6402 fixes it "for now" but i am still unable to save to SD, due to #5198, and i can't test that bug fix with this one because there is no such apk. if i can, in the future, save to SD, then i don't know what would happen if i save to SD successfully and then try to save to internal storage. if the default save folder is permanently locked to /storage/emulated/0 then i expect no issue. if the default can change to any SD location, then i expect this issue would resurface (as long as the underlying issue exists).

thanks!

@ghost
Copy link
Author

ghost commented Jun 1, 2021

The other app I found with the same underlying file browser navigation issue is Timbre v3.1.8

https://timbre.en.uptodown.com/android

@opusforlife2
Copy link
Collaborator

@cubetronic Could you open a new issue with the specific problem that was not solved by the linked PR? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants