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
NullPointerException: unable to stop service org.schabi.newpipe.player.PlayerService@1ac624e #11029
Comments
Is that the error you get each time? This looks like a duplicate of #10097, but your error is different, |
No, that's completely different and is very likely a 0.27.0 regression related to media notification actions changes. I can reproduce this issue if a playback error occurs when playing a content in the main player (so it is closed due to the error), while the player service is being stopped. |
I got the same error, but in a different situation. I was watching a video and wanted to play another one. I clicked on the other one. Then the message appeared. After clicking away the error message, I had to restart NewPipe. Smartphone: Fairphone 4 (CalyxOS 5.6.3, Android 14) Exception
Crash log
Feel free to hide my message if it's annoying. However, since there was the "Waiting for Author" tag for a short time, I thought I'd write my error message briefly too. |
Checklist
Affected version
0.27.0
Steps to reproduce the bug
Expected behavior
Video continues to play
Actual behavior
Video stops playing and NewPipe opens up (even when playing in the background) with the guru meditation screen. The following output is shown:
java.lang.RuntimeException: Unable to stop service org.schabi.newpipe.player.PlayerService@1ac624e: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector.setCustomActionProviders(com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector$CustomActionProvider[])' on a null object reference
at android.app.ActivityThread.handleStopService(ActivityThread.java:5285)
at android.app.ActivityThread.-$$Nest$mhandleStopService(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2454)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8772)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector.setCustomActionProviders(com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector$CustomActionProvider[])' on a null object reference
at org.schabi.newpipe.player.mediasession.MediaSessionPlayerUi.updateMediaSessionActions(MediaSessionPlayerUi.java:215)
at org.schabi.newpipe.player.mediasession.MediaSessionPlayerUi.onMetadataChanged(MediaSessionPlayerUi.java:282)
at org.schabi.newpipe.player.Player.lambda$updateMetadataWith$22(Player.java:1801)
at org.schabi.newpipe.player.Player.$r8$lambda$6LL1ynLVHUrHxxol0bvWL1Rn_TU(Player.java:0)
at org.schabi.newpipe.player.Player$$ExternalSyntheticLambda47.accept(R8$$SyntheticClass:0)
at j$.util.AbstractList$RandomAccessSpliterator.forEachRemaining(Unknown Source:19)
at j$.util.stream.ReferencePipeline$Head.forEachOrdered(Unknown Source:10)
at org.schabi.newpipe.player.ui.PlayerUiList.call(PlayerUiList.java:88)
at org.schabi.newpipe.player.Player.updateMetadataWith(Player.java:1801)
at org.schabi.newpipe.player.Player.lambda$onEvents$13(Player.java:1293)
at org.schabi.newpipe.player.Player.$r8$lambda$5dalatdJw7zsnq99HOZvtSHTxZo(Player.java:0)
at org.schabi.newpipe.player.Player$$ExternalSyntheticLambda37.accept(R8$$SyntheticClass:0)
at j$.util.Optional.ifPresent(Unknown Source:4)
at org.schabi.newpipe.player.Player.lambda$onEvents$14(Player.java:1287)
at org.schabi.newpipe.player.Player.$r8$lambda$67JZJPUrqqIwv2qPVBiXIeF-1Rs(Player.java:0)
at org.schabi.newpipe.player.Player$$ExternalSyntheticLambda9.accept(R8$$SyntheticClass:0)
at j$.util.Optional.ifPresent(Unknown Source:4)
at org.schabi.newpipe.player.Player.onEvents(Player.java:1265)
at com.google.android.exoplayer2.ExoPlayerImpl.lambda$new$0(ExoPlayerImpl.java:266)
at com.google.android.exoplayer2.ExoPlayerImpl.$r8$lambda$FaN7Odt_OJn5xWFlmhnR2OmiNMg(ExoPlayerImpl.java:0)
at com.google.android.exoplayer2.ExoPlayerImpl$$ExternalSyntheticLambda1.invoke(R8$$SyntheticClass:0)
at com.google.android.exoplayer2.util.ListenerSet$ListenerHolder.release(ListenerSet.java:320)
at com.google.android.exoplayer2.util.ListenerSet.remove(ListenerSet.java:183)
at com.google.android.exoplayer2.ExoPlayerImpl.removeListener(ExoPlayerImpl.java:1641)
at org.schabi.newpipe.player.Player.destroyPlayer(Player.java:573)
at org.schabi.newpipe.player.Player.destroy(Player.java:600)
at org.schabi.newpipe.player.PlayerService.cleanup(PlayerService.java:150)
at org.schabi.newpipe.player.PlayerService.onDestroy(PlayerService.java:145)
at android.app.ActivityThread.handleStopService(ActivityThread.java:5265)
... 9 more
I'll need to close and open the app to recover. Also sometimes my position in the video will be lost, so even going to it through the History tab won't allow me to resume where I left off. That makes it even more annoying.
Screenshots/Screen recordings
No response
Logs
No response
Affected Android/Custom ROM version
No response
Affected device model
Samsung Galaxy ZFold 4
Additional information
Phone: SM-F936U1
One UI 5.0
Android 13
Kernel Version: 5.10.81-android12-9-25407272-abF936U1UEU1BVKB
This is a de-Googled phone, so it doesn't run Google Play Services, which has been put to deep sleep via adb.
Maybe you can add a null check here:
NewPipe/app/src/main/java/org/schabi/newpipe/player/mediasession/MediaSessionPlayerUi.java
Line 215 in 879d7a2
Or maybe it's clear to you why
NewPipe/app/src/main/java/org/schabi/newpipe/player/mediasession/MediaSessionPlayerUi.java
Line 280 in 879d7a2
sessionConnector
is somehow being unset?This happens very often to me, basically whenever I leave the house while playing a video in the background, or entering.
The text was updated successfully, but these errors were encountered: