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

Error saving files/changing media save location #228

Closed
gliffs opened this issue Jul 24, 2019 · 9 comments
Closed

Error saving files/changing media save location #228

gliffs opened this issue Jul 24, 2019 · 9 comments
Labels
wontfix This will not be worked on

Comments

@gliffs
Copy link

gliffs commented Jul 24, 2019

I try to save any sort of media from any board, and I get a popup notification that says "save failed".
When I try to change media save location, the app crashes and force closes.
I verified the app has media save permissions in Android 2x, by reinstalling and checking the permissions manually in application settings.

Pixel 2 xl on Android q beta 5
fresh install of current Kuroba release. recreated the issues and pasted the logs.

W/Kuroba | StartActivity: Can not save instance state, the board loadable is null
W/Kuroba | StartActivity: Can not save instance state, the board loadable is null
W/Kuroba | StartActivity: Can not save instance state, the board loadable is null
E/Kuroba | ImageSaveTask: Error writing to file
E/Kuroba | ImageSaveTask: java.io.FileNotFoundException: /storage/emulated/0/Kuroba/based.png: open failed: EACCES (Permission denied)
E/Kuroba | ImageSaveTask: 	at libcore.io.IoBridge.open(IoBridge.java:496)
E/Kuroba | ImageSaveTask: 	at java.io.FileOutputStream.<init>(FileOutputStream.java:235)
E/Kuroba | ImageSaveTask: 	at java.io.FileOutputStream.<init>(FileOutputStream.java:186)
E/Kuroba | ImageSaveTask: 	at com.github.adamantcheese.chan.utils.IOUtils.copyFile(IOUtils.java:115)
E/Kuroba | ImageSaveTask: 	at com.github.adamantcheese.chan.core.saver.ImageSaveTask.copyToDestination(ImageSaveTask.java:150)
E/Kuroba | ImageSaveTask: 	at com.github.adamantcheese.chan.core.saver.ImageSaveTask.onSuccess(ImageSaveTask.java:109)
E/Kuroba | ImageSaveTask: 	at com.github.adamantcheese.chan.core.cache.FileCache.handleFileImmediatelyAvailable(FileCache.java:155)
E/Kuroba | ImageSaveTask: 	at com.github.adamantcheese.chan.core.cache.FileCache.downloadFile(FileCache.java:111)
E/Kuroba | ImageSaveTask: 	at com.github.adamantcheese.chan.core.cache.FileCache.downloadFile(FileCache.java:84)
E/Kuroba | ImageSaveTask: 	at com.github.adamantcheese.chan.core.saver.ImageSaveTask.run(ImageSaveTask.java:100)
E/Kuroba | ImageSaveTask: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E/Kuroba | ImageSaveTask: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E/Kuroba | ImageSaveTask: 	at java.lang.Thread.run(Thread.java:919)
E/Kuroba | ImageSaveTask: Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
E/Kuroba | ImageSaveTask: 	at libcore.io.Linux.open(Native Method)
E/Kuroba | ImageSaveTask: 	at libcore.io.ForwardingOs.open(ForwardingOs.java:167)
E/Kuroba | ImageSaveTask: 	at libcore.io.BlockGuardOs.open(BlockGuardOs.java:252)
E/Kuroba | ImageSaveTask: 	at libcore.io.ForwardingOs.open(ForwardingOs.java:167)
E/Kuroba | ImageSaveTask: 	at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7242)
E/Kuroba | ImageSaveTask: 	at libcore.io.IoBridge.open(IoBridge.java:482)
E/Kuroba | ImageSaveTask: 	... 12 more
E/Kuroba | UNCAUGHT: java.lang.IllegalArgumentException: Cannot navigate to /storage/emulated/0
E/Kuroba | UNCAUGHT: 	at com.github.adamantcheese.chan.core.saver.FileWatcher.navigateTo(FileWatcher.java:66)
E/Kuroba | UNCAUGHT: 	at com.github.adamantcheese.chan.core.saver.FileWatcher.initialize(FileWatcher.java:50)
E/Kuroba | UNCAUGHT: 	at com.github.adamantcheese.chan.ui.controller.SaveLocationController.initialize(SaveLocationController.java:147)
E/Kuroba | UNCAUGHT: 	at com.github.adamantcheese.chan.ui.controller.SaveLocationController.onCreate(SaveLocationController.java:73)
E/Kuroba | UNCAUGHT: 	at com.github.adamantcheese.chan.controller.Controller.addChildController(Controller.java:137)
E/Kuroba | UNCAUGHT: 	at com.github.adamantcheese.chan.controller.NavigationController.transition(NavigationController.java:125)
E/Kuroba | UNCAUGHT: 	at com.github.adamantcheese.chan.ui.controller.ToolbarNavigationController.transition(ToolbarNavigationController.java:47)
E/Kuroba | UNCAUGHT: 	at com.github.adamantcheese.chan.ui.controller.StyledToolbarNavigationController.transition(StyledToolbarNavigationController.java:60)
E/Kuroba | UNCAUGHT: 	at com.github.adamantcheese.chan.controller.NavigationController.pushController(NavigationController.java:53)
E/Kuroba | UNCAUGHT: 	at com.github.adamantcheese.chan.ui.controller.StyledToolbarNavigationController.pushController(StyledToolbarNavigationController.java:55)
E/Kuroba | UNCAUGHT: 	at com.github.adamantcheese.chan.controller.NavigationController.pushController(NavigationController.java:41)
E/Kuroba | UNCAUGHT: 	at com.github.adamantcheese.chan.controller.NavigationController.pushController(NavigationController.java:37)
E/Kuroba | UNCAUGHT: 	at com.github.adamantcheese.chan.ui.controller.MediaSettingsController.lambda$setupSaveLocationSetting$0$MediaSettingsController(MediaSettingsController.java:215)
E/Kuroba | UNCAUGHT: 	at com.github.adamantcheese.chan.ui.controller.-$$Lambda$MediaSettingsController$-5-WmvQQEn7emsF_dnBIQBW_V-8.onClick(Unknown Source:2)
E/Kuroba | UNCAUGHT: 	at android.view.View.performClick(View.java:7125)
E/Kuroba | UNCAUGHT: 	at android.view.View.performClickInternal(View.java:7102)
E/Kuroba | UNCAUGHT: 	at android.view.View.access$3500(View.java:801)
E/Kuroba | UNCAUGHT: 	at android.view.View$PerformClick.run(View.java:27336)
E/Kuroba | UNCAUGHT: 	at android.os.Handler.handleCallback(Handler.java:883)
E/Kuroba | UNCAUGHT: 	at android.os.Handler.dispatchMessage(Handler.java:100)
E/Kuroba | UNCAUGHT: 	at android.os.Looper.loop(Looper.java:214)
E/Kuroba | UNCAUGHT: 	at android.app.ActivityThread.main(ActivityThread.java:7343)
E/Kuroba | UNCAUGHT: 	at java.lang.reflect.Method.invoke(Native Method)
E/Kuroba | UNCAUGHT: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
E/Kuroba | UNCAUGHT: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:933)
E/Kuroba | UNCAUGHT: .
E/Kuroba | UNCAUGHT: ----------------------------------------
E/Kuroba | UNCAUGHT: END OF CURRENT RUNTIME MESSAGES
E/Kuroba | UNCAUGHT: ----------------------------------------
E/Kuroba | UNCAUGHT: .
E/Kuroba | UNCAUGHT: Android API Level: 29
E/Kuroba | UNCAUGHT: App Version: v4.5.2-dev Official
E/Kuroba | UNCAUGHT: Phone Model: Google Pixel 2 XL
@K1rakishou
Copy link

K1rakishou commented Jul 24, 2019

Try opening Settings -> Import/Export. You will be asked to give your permission to write to external storage. Give the permission then try changing directory/downloading an image again.

I verified the app has media save permissions

It should be WRITE_EXTERNAL_STORAGE.

@gliffs
Copy link
Author

gliffs commented Jul 24, 2019

The app said "error trying to export settings permission denied"
Now I looked in the app permissions and it says nothing was denied. I gave it permission to view/modify media and I'm still getting the error.

https://pasteboard.co/IptXEgv.png
https://pasteboard.co/IptXRrR.png

@K1rakishou
Copy link

K1rakishou commented Jul 24, 2019

Something is wrong. Try reinstalling the app and opening Settings -> Import/Export again. It should show you the permission window. If it doesn't then it's some kind of weird bug. I have exactly the same phone and Android Q Beta 5 too and everything works.

@gliffs
Copy link
Author

gliffs commented Jul 24, 2019

That's exactly what I did. The permissions window did pop up, I tapped accept, and I'm still getting the error

@K1rakishou
Copy link

K1rakishou commented Jul 24, 2019

This should have worked. This is either an Android beta bug or there is something wrong with your phone. I'm afraid I don't know what else to suggest to you.

@Adamantcheese
Copy link
Owner

I suspect that the changes mentioned here https://developer.android.com/preview/privacy/scoped-storage are what's messing with it. It does say that Q B5 shouldn't have any issues with storage however, however I'll add in that manifest attribute just to be sure.

@Adamantcheese Adamantcheese added the bug Something isn't working label Jul 25, 2019
Adamantcheese added a commit that referenced this issue Jul 25, 2019
@K1rakishou
Copy link

K1rakishou commented Jul 25, 2019

Scoped storage has been posponed until Android R. So it shouldn't be it. And I have Android Q Beta 5 too and don't have this problem.

@Adamantcheese
Copy link
Owner

Hey, just double checking, but does this still occur with that manifest attribute added in?

@Adamantcheese
Copy link
Owner

Since that didn't seem to work (or I'll assume it didn't due to a lack of response), I'm going to close this and bump it to API 29 later on when #172 is implemented, which should fix the problem.

@Adamantcheese Adamantcheese added wontfix This will not be worked on and removed bug Something isn't working labels Aug 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants