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

UI Crash on Download Folder Selection #8441

Open
5 tasks done
js290 opened this issue May 26, 2022 · 4 comments
Open
5 tasks done

UI Crash on Download Folder Selection #8441

js290 opened this issue May 26, 2022 · 4 comments
Labels
bug Issue is related to a bug downloader Issue is related to the downloader

Comments

@js290
Copy link

js290 commented May 26, 2022

Checklist

  • I am able to reproduce the bug with the latest version.
  • I made sure that there are no existing issues - open or closed - which I could contribute my information to.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.
  • I have read and understood the contribution guidelines.

Affected version

0.23.0

Steps to reproduce the bug

  1. Pick a video to download
  2. Select parameters and click OK
  3. UI will ask to select download folder
  4. select folder and press Use this folder
  5. UI crashes

Expected behavior

UI should not crash, and selected folder should be used for download

Actual behavior

UI crashes generating exception.

Screenshots/Screen recordings

No response

Logs

Search

Note to Self
You can add notes for yourself in this conversation. If your account has any linked devices, new notes will be synced.

Exception

  • User Action: ui error
  • Request: ACRA report
  • Content Country: US
  • Content Language: en-US
  • App Language: en_US
  • Service: none
  • Version: 0.23.0
  • OS: Linux motorola/racer_retail/racer:11/RPD31.Q4U-39-26-14/dcd58b:user/release-keys 11 - 30
Crash log

java.lang.RuntimeException: Unable to resume activity {org.schabi.newpipe/org.schabi.newpipe.MainActivity}: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1597476056, result=-1, data=Intent { dat=content://com.android.externalstorage.documents/tree/primary:Podcasts flg=0xc3 }} to activity {org.schabi.newpipe/org.schabi.newpipe.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toLowerCase()' on a null object reference
	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4506)
	at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4538)
	at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)
	at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2115)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:250)
	at android.app.ActivityThread.main(ActivityThread.java:7755)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:958)
Caused by: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1597476056, result=-1, data=Intent { dat=content://com.android.externalstorage.documents/tree/primary:Podcasts flg=0xc3 }} to activity {org.schabi.newpipe/org.schabi.newpipe.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toLowerCase()' on a null object reference
	at android.app.ActivityThread.deliverResults(ActivityThread.java:5080)
	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4493)
	... 11 more
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toLowerCase()' on a null object reference
	at org.schabi.newpipe.streams.io.StoredDirectoryHelper.findFileSAFHelper(StoredDirectoryHelper.java:300)
	at org.schabi.newpipe.streams.io.StoredDirectoryHelper.findFile(StoredDirectoryHelper.java:218)
	at org.schabi.newpipe.download.DownloadDialog.requestDownloadPickFolderResult(DownloadDialog.java:527)
	at org.schabi.newpipe.download.DownloadDialog.requestDownloadPickAudioFolderResult(DownloadDialog.java:463)
	at org.schabi.newpipe.download.DownloadDialog.$r8$lambda$ZkWQqHfoXkKABn6hHnEEj8ilCGQ(Unknown Source:0)
	at org.schabi.newpipe.download.DownloadDialog$$ExternalSyntheticLambda4.onActivityResult(Unknown Source:4)
	at androidx.activity.result.ActivityResultRegistry.doDispatch(ActivityResultRegistry.java:392)
	at androidx.activity.result.ActivityResultRegistry.dispatchResult(ActivityResultRegistry.java:351)
	at androidx.activity.ComponentActivity.onActivityResult(ComponentActivity.java:647)
	at androidx.fragment.app.FragmentActivity.onActivityResult(FragmentActivity.java:164)
	at android.app.Activity.dispatchActivityResult(Activity.java:8393)
	at android.app.ActivityThread.deliverResults(ActivityThread.java:5073)
	... 12 more


Affected Android/Custom ROM version

Android 11

Affected device model

Motorola Edge 2020

Additional information

Workaround is to set the download folder in Settings before doing the download.

@js290 js290 added the bug Issue is related to a bug label May 26, 2022
@MDP43140
Copy link
Contributor

i also have this happened, but its different.
on mine, a toast that says "no download directory selected" (i forget what this toast says) appeared for couple seconds,
then the app crashed (without any exception thing opened after it), opening the app again will crash again. the only way to get rid of continous crashing is to clear the app data (root is required to backup newpipe.db as opening newpipe will always crashing)

@CLtheman1
Copy link

The same thing happens to me, on my Android 8.1 device. I push the download button, select parameters, and as soon as it opens up the menu to select download folder, a toast pops up with an error and NewPipe crashes.

On my other device, it downloads just fine(Android 9 or 10).

@steebn

This comment was marked as resolved.

@steebn
Copy link

steebn commented Jun 12, 2023

Update, once i set the download folder in settings > download it works fine

@js290
Copy link
Author

js290 commented Apr 3, 2024

Happening on Android 14 (LineageOS 21) and NewPipe 0.26.1. As @steebn points out, setting the download folder first before downloading works. But, setting the download folder on initial download does not.

Exception

  • User Action: ui error
  • Request: ACRA report
  • Content Country: US
  • Content Language: en-US
  • App Language: en_US
  • Service: none
  • Version: 0.26.1
  • OS: Linux Android 14 - 34
Crash log

java.lang.RuntimeException: Unable to resume activity {org.schabi.newpipe/org.schabi.newpipe.MainActivity}: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=2112959158, result=-1, data=Intent { dat=content://com.android.externalstorage.documents/... flg=0xc3 }} to activity {org.schabi.newpipe/org.schabi.newpipe.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toLowerCase()' on a null object reference
	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:5003)
	at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:5036)
	at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:57)
	at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
	at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:180)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:98)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2468)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loopOnce(Looper.java:205)
	at android.os.Looper.loop(Looper.java:294)
	at android.app.ActivityThread.main(ActivityThread.java:8248)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
Caused by: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=2112959158, result=-1, data=Intent { dat=content://com.android.externalstorage.documents/... flg=0xc3 }} to activity {org.schabi.newpipe/org.schabi.newpipe.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toLowerCase()' on a null object reference
	at android.app.ActivityThread.deliverResults(ActivityThread.java:5568)
	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4990)
	... 13 more
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toLowerCase()' on a null object reference
	at org.schabi.newpipe.streams.io.StoredDirectoryHelper.findFileSAFHelper(StoredDirectoryHelper.java:317)
	at org.schabi.newpipe.streams.io.StoredDirectoryHelper.findFile(StoredDirectoryHelper.java:229)
	at org.schabi.newpipe.download.DownloadDialog.requestDownloadPickFolderResult(DownloadDialog.java:560)
	at org.schabi.newpipe.download.DownloadDialog.requestDownloadPickAudioFolderResult(DownloadDialog.java:497)
	at org.schabi.newpipe.download.DownloadDialog.$r8$lambda$liBpbzpyKRBfQ6k5_3ZkABe_ukA(DownloadDialog.java:0)
	at org.schabi.newpipe.download.DownloadDialog$$ExternalSyntheticLambda1.onActivityResult(R8$$SyntheticClass:0)
	at androidx.activity.result.ActivityResultRegistry.doDispatch(ActivityResultRegistry.java:418)
	at androidx.activity.result.ActivityResultRegistry.dispatchResult(ActivityResultRegistry.java:375)
	at androidx.activity.ComponentActivity.onActivityResult(ComponentActivity.java:777)
	at androidx.fragment.app.FragmentActivity.onActivityResult(FragmentActivity.java:140)
	at android.app.Activity.dispatchActivityResult(Activity.java:8969)
	at android.app.ActivityThread.deliverResults(ActivityThread.java:5561)
	... 14 more


@opusforlife2 opusforlife2 added the downloader Issue is related to the downloader label Apr 3, 2024
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 downloader Issue is related to the downloader
Projects
None yet
Development

No branches or pull requests

5 participants