NewPipe icon indicating copy to clipboard operation
NewPipe copied to clipboard

UI Crash on Download Folder Selection

Open js290 opened this issue 3 years ago • 4 comments

Checklist

  • [X] I am able to reproduce the bug with the latest version.
  • [X] I made sure that there are no existing issues - open or closed - which I could contribute my information to.
  • [X] I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • [X] This issue contains only one bug.
  • [X] 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 avatar May 26 '22 16:05 js290

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)

MDP43140 avatar May 29 '22 11:05 MDP43140

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).

CLtheman1 avatar Dec 13 '22 21:12 CLtheman1

I get the same thing on a Pixel 6 Pro / Android 13

Exception

  • User Action: ui error
  • Request: ACRA report
  • Content Country: US
  • Content Language: en-US
  • App Language: en_US
  • Service: none
  • Version: 0.25.1
  • OS: Linux Android 13 - 33
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=2038289667, 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:4770)
	at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4803)
	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:179)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2303)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loopOnce(Looper.java:201)
	at android.os.Looper.loop(Looper.java:288)
	at android.app.ActivityThread.main(ActivityThread.java:7884)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Caused by: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=2038289667, 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:5335)
	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4757)
	... 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:295)
	at org.schabi.newpipe.streams.io.StoredDirectoryHelper.findFile(StoredDirectoryHelper.java:213)
	at org.schabi.newpipe.download.DownloadDialog.requestDownloadPickFolderResult(DownloadDialog.java:507)
	at org.schabi.newpipe.download.DownloadDialog.requestDownloadPickVideoFolderResult(DownloadDialog.java:449)
	at org.schabi.newpipe.download.DownloadDialog.$r8$lambda$8_4uGa65e4V9wh3gclKUnD8enuc(DownloadDialog.java:0)
	at org.schabi.newpipe.download.DownloadDialog$$ExternalSyntheticLambda2.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:8664)
	at android.app.ActivityThread.deliverResults(ActivityThread.java:5328)
	... 14 more


steebn avatar Jun 12 '23 05:06 steebn

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

steebn avatar Jun 12 '23 06:06 steebn

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


js290 avatar Apr 03 '24 13:04 js290