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

Database export to removable storage fails on Android 10 #5198

Closed
4 tasks done
johanw666 opened this issue Dec 16, 2020 · 9 comments · Fixed by #5415
Closed
4 tasks done

Database export to removable storage fails on Android 10 #5198

johanw666 opened this issue Dec 16, 2020 · 9 comments · Fixed by #5415
Labels
bug Issue is related to a bug

Comments

@johanw666
Copy link

johanw666 commented Dec 16, 2020

Checklist

Steps to reproduce the bug

  1. Go to the settings, content, export database
  2. Select a folder in the removable storage
  3. Press OK
  4. Crash

Actual behaviour

A screen with an exception shows.

Expected behavior

A database is exported. This worked OK on my Android 4, 6 and 7 devices, but on Android 10 it crashes (no permission).

Logs

Exception

  • User Action: ui error
  • Request:
  • Content Country: US
  • Content Language: en
  • App Language: en_US
  • Service: none
  • Version: 0.20.6
  • OS: Linux samsung/a50eea/a50:10/QP1A.190711.020/A505FNXXU4BTC9:user/release-keys 10 - 29
Crash log

java.io.FileNotFoundException: /storage/A34D-12E4/tmp/internalsd/NewPipeData-20201216_222951.zip: open failed: EACCES (Permission denied)
	at libcore.io.IoBridge.open(IoBridge.java:496)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:235)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:125)
	at org.schabi.newpipe.settings.ContentSettingsFragment.exportDatabase(ContentSettingsFragment.java:215)
	at org.schabi.newpipe.settings.ContentSettingsFragment.onActivityResult(ContentSettingsFragment.java:197)
	at androidx.fragment.app.FragmentActivity.onActivityResult(FragmentActivity.java:170)
	at android.app.Activity.dispatchActivityResult(Activity.java:8292)
	at android.app.ActivityThread.deliverResults(ActivityThread.java:5090)
	at android.app.ActivityThread.handleSendResult(ActivityThread.java:5138)
	at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51)
	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2147)
	at android.os.Handler.dispatchMessage(Handler.java:107)
	at android.os.Looper.loop(Looper.java:237)
	at android.app.ActivityThread.main(ActivityThread.java:7814)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1075)
Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
	at libcore.io.Linux.open(Native Method)
	at libcore.io.ForwardingOs.open(ForwardingOs.java:167)
	at libcore.io.BlockGuardOs.open(BlockGuardOs.java:252)
	at libcore.io.ForwardingOs.open(ForwardingOs.java:167)
	at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7691)
	at libcore.io.IoBridge.open(IoBridge.java:482)
	... 18 more


Device info

  • Android version: 10 (Stock ROM, rooted)
  • Device model: Samsung A50
@johanw666 johanw666 added the bug Issue is related to a bug label Dec 16, 2020
@triallax
Copy link
Contributor

This works just fine for me. From the error, it appears like you have not given NewPipe storage permission. Could you check that you actually gave it the permission?

@johanw666
Copy link
Author

I just checked, I did give it storage permission.

@triallax
Copy link
Contributor

Ah, wait, I missed the fact that you were using removable storage, which is probably the cause. For now, can you check if you can export the database to your phone's internal storage and move it to the external storage?

@johanw666
Copy link
Author

Yes, exporting to internal SD works fine.

@johanw666
Copy link
Author

Unfortunately switching on SAF gives the same error.

@Stypox
Copy link
Member

Stypox commented Jan 15, 2021

Could you check if this apk from #5415 solves the issue?

@johanw666
Copy link
Author

johanw666 commented Jan 17, 2021

Yes, this apk can export the database and settings to removable storage on my Android 10 device. Thanks.

@triallax triallax mentioned this issue Jan 17, 2021
14 tasks
@johanw666
Copy link
Author

This still does not work in 0.20.9, when will this PR, #5415 , merged?

@Thewisem
Copy link

Thewisem commented Jul 3, 2021

Same for android 7

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.

4 participants