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

Switch to audio then back to video crash #5958

Closed
3 tasks done
gsdgethjfjj opened this issue May 1, 2024 · 6 comments · Fixed by #5998
Closed
3 tasks done

Switch to audio then back to video crash #5958

gsdgethjfjj opened this issue May 1, 2024 · 6 comments · Fixed by #5998
Labels
bug Something isn't working can't reproduce help wanted Looking for help

Comments

@gsdgethjfjj
Copy link

gsdgethjfjj commented May 1, 2024

Steps to reproduce

Open a video, turn on audio mode, turn on video mode again

Expected behavior

App isn't crashing

Actual behavior

App is crashing

LibreTube version

0.23.0

Android version

Android 14

Other details

java.lang.RuntimeException: Unable to stop service com.github.libretube.services.OnlinePlayerService@b6752b0: java.lang.IllegalArgumentException: Receiver not registered: androidx.media3.common.util.NetworkTypeObserver$Receiver@a500529
at android.app.ActivityThread.handleStopService(ActivityThread.java:5111)
at android.app.ActivityThread.-$$Nest$mhandleStopService(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2405)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.app.ActivityThread.main(ActivityThread.java:8532)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
at com.android.internal.os.ExecInit.main(ExecInit.java:50)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:359)
Caused by: java.lang.IllegalArgumentException: Receiver not registered: androidx.media3.common.util.NetworkTypeObserver$Receiver@a500529
at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:1670)
at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:1905)
at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:821)
at com.github.libretube.services.OnlinePlayerService.onDestroy(SourceFile:34)
at android.app.ActivityThread.handleStopService(ActivityThread.java:5091)
... 11 more

Acknowledgements

  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
  • I have written a short but informative title.
  • I will fill out all of the requested information in this form.
@TechnoSparks
Copy link

TechnoSparks commented May 2, 2024

On v0.22.2 this bug is not present. Android 14 (LOS 21)

On Android 13, v0.23 i could reproduce this bug too.

Edit, including the crash notification on launch:

java.lang.RuntimeException: Unable to stop service com.github.libretube.services.OnlinePlayerService@37d572b: java.lang.IllegalArgumentException: Receiver not registered: androidx.media3.common.util.NetworkTypeObserver$Receiver@32f6788
	at android.app.ActivityThread.handleStopService(ActivityThread.java:5085)
	at android.app.ActivityThread.-$$Nest$mhandleStopService(Unknown Source:0)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2398)
	at android.os.Handler.dispatchMessage(Handler.java:107)
	at android.os.Looper.loopOnce(Looper.java:232)
	at android.os.Looper.loop(Looper.java:317)
	at android.app.ActivityThread.main(ActivityThread.java:8501)
	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:878)
Caused by: java.lang.IllegalArgumentException: Receiver not registered: androidx.media3.common.util.NetworkTypeObserver$Receiver@32f6788
	at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:1670)
	at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:1873)
	at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:821)
	at com.github.libretube.services.OnlinePlayerService.onDestroy(SourceFile:34)
	at android.app.ActivityThread.handleStopService(ActivityThread.java:5065)
	... 9 more

@M00NJ
Copy link

M00NJ commented May 3, 2024

I can reproduce this. v0.23.0, Android 14 (GOS)

@xlash123
Copy link

xlash123 commented May 3, 2024

I am able to reproduce this consistently by selecting play in background and then pressing the X on the mini player. I don't even have to switch to video.

@github-user93
Copy link

can confirm. using android 13, can reproduce the issue on 0.23.0

@akano12 akano12 mentioned this issue May 5, 2024
3 tasks
@Bnyro Bnyro added the help wanted Looking for help label May 6, 2024
@DanielProg39
Copy link

I also encountered this error:

java.lang.RuntimeException: Unable to stop service com.github.libretube.services.OnlinePlayerService@218a77b: java.lang.IllegalArgumentException: Receiver not registered: com.github.libretube.services.OnlinePlayerService$playerActionReceiver$1@ba8f998
	at android.app.ActivityThread.handleStopService(ActivityThread.java:4706)
	at android.app.ActivityThread.-$$Nest$mhandleStopService(Unknown Source:0)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2185)
	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:7924)
	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.IllegalArgumentException: Receiver not registered: com.github.libretube.services.OnlinePlayerService$playerActionReceiver$1@ba8f998
	at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:1662)
	at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:1836)
	at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:812)
	at com.github.libretube.services.OnlinePlayerService.onDestroy(OnlinePlayerService.kt:435)
	at android.app.ActivityThread.handleStopService(ActivityThread.java:4686)
	... 9 more
    

@kazekawa2
Copy link

I also encounter this error
java.lang.RuntimeException: Unable to stop service com.github.libretube.services.OnlinePlayerService@589563c: java.lang.IllegalArgumentException: Receiver not registered: androidx.media3.common.util.NetworkTypeObserver$Receiver@2282fc5
at android.app.ActivityThread.handleStopService(ActivityThread.java:5345)
at android.app.ActivityThread.access$2400(ActivityThread.java:324)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2379)
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:8855)
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:1135)
Caused by: java.lang.IllegalArgumentException: Receiver not registered: androidx.media3.common.util.NetworkTypeObserver$Receiver@2282fc5
at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:1656)
at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:1867)
at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:788)
at com.github.libretube.services.OnlinePlayerService.onDestroy(SourceFile:34)
at android.app.ActivityThread.handleStopService(ActivityThread.java:5325)
... 9 more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working can't reproduce help wanted Looking for help
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants