NewPipe icon indicating copy to clipboard operation
NewPipe copied to clipboard

Casting crashes every time

Open zuavra opened this issue 1 year ago • 5 comments

Checklist

  • [X] I am able to reproduce the bug with the latest version given here: CLICK THIS LINK.
  • [X] I made sure that there are no existing issues - open or closed - which I could contribute my information to.
  • [X] I have read the FAQ and my problem isn't listed.
  • [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.25.2

Steps to reproduce the bug

  1. Play any YouTube video.
  2. Expand the video controls.
  3. Tap the cast button.

Expected behavior

Cast the video to Chromecast gen2.

Actual behavior

App crashes.

Screenshots/Screen recordings

No response

Logs

Attempting to cast to a Chromecast gen2 from a Sony Xperia 10 III phone.

Exception

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

android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?
	at android.view.ViewRootImpl.setView(ViewRootImpl.java:1075)
	at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:409)
	at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:110)
	at android.app.Dialog.show(Dialog.java:340)
	at androidx.appcompat.app.AlertDialog$Builder.show(AlertDialog.java:1009)
	at org.schabi.newpipe.util.external_communication.KoreUtils.playWithKore(KoreUtils.java:69)
	at org.schabi.newpipe.player.ui.VideoPlayerUi.onPlayWithKodiClicked(VideoPlayerUi.java:1495)
	at org.schabi.newpipe.player.ui.VideoPlayerUi.$r8$lambda$Ah5-AMSNj8xTdhW85LEN89TEhsk(VideoPlayerUi.java:0)
	at org.schabi.newpipe.player.ui.VideoPlayerUi$$ExternalSyntheticLambda21.run(R8$$SyntheticClass:0)
	at org.schabi.newpipe.player.ui.VideoPlayerUi.lambda$makeOnClickListener$27(VideoPlayerUi.java:1408)
	at org.schabi.newpipe.player.ui.VideoPlayerUi.$r8$lambda$PsCE_Yd-jcDxLdmShO83lTESJIk(VideoPlayerUi.java:0)
	at org.schabi.newpipe.player.ui.VideoPlayerUi$$ExternalSyntheticLambda38.onClick(R8$$SyntheticClass:0)
	at android.view.View.performClick(View.java:7463)
	at android.view.View.performClickInternal(View.java:7432)
	at android.view.View.access$3600(View.java:817)
	at android.view.View$PerformClick.run(View.java:28324)
	at android.os.Handler.handleCallback(Handler.java:938)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:368)
	at android.app.ActivityThread.main(ActivityThread.java:7730)
	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:954)


Affected Android/Custom ROM version

Android 11 / Sony

Affected device model

Xperia 10 III

Additional information

Similar issue with inactive reporter is #10127 .

zuavra avatar Aug 28 '23 21:08 zuavra

I have same crash issue from my Samsung S22 Ultra (up to date stock) to google home smart speakers (I have 4)

whatistime avatar Dec 19 '23 18:12 whatistime

Same here. I can't select which target device to cast to, NewPipe crashes when clicking the icon.

Logs

## Exception * __User Action:__ ui error * __Request:__ ACRA report * __Content Country:__ DE * __Content Language:__ de-DE * __App Language:__ de_DE * __Service:__ none * __Version:__ 0.26.0 * __OS:__ Linux Android 12 - 31

Crash log

android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?
	at android.view.ViewRootImpl.setView(ViewRootImpl.java:1235)
	at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:403)
	at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:134)
	at android.app.Dialog.show(Dialog.java:374)
	at androidx.appcompat.app.AlertDialog$Builder.show(AlertDialog.java:1009)
	at org.schabi.newpipe.util.external_communication.KoreUtils.playWithKore(KoreUtils.java:69)
	at org.schabi.newpipe.player.ui.VideoPlayerUi.onPlayWithKodiClicked(VideoPlayerUi.java:1522)
	at org.schabi.newpipe.player.ui.VideoPlayerUi.$r8$lambda$Ah5-AMSNj8xTdhW85LEN89TEhsk(VideoPlayerUi.java:0)
	at org.schabi.newpipe.player.ui.VideoPlayerUi$$ExternalSyntheticLambda21.run(R8$$SyntheticClass:0)
	at org.schabi.newpipe.player.ui.VideoPlayerUi.lambda$makeOnClickListener$27(VideoPlayerUi.java:1435)
	at org.schabi.newpipe.player.ui.VideoPlayerUi.$r8$lambda$PsCE_Yd-jcDxLdmShO83lTESJIk(VideoPlayerUi.java:0)
	at org.schabi.newpipe.player.ui.VideoPlayerUi$$ExternalSyntheticLambda38.onClick(R8$$SyntheticClass:0)
	at android.view.View.performClick(View.java:7753)
	at android.view.View.performClickInternal(View.java:7730)
	at android.view.View.access$3700(View.java:861)
	at android.view.View$PerformClick.run(View.java:29146)
	at android.os.Handler.handleCallback(Handler.java:938)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loopOnce(Looper.java:210)
	at android.os.Looper.loop(Looper.java:299)
	at android.app.ActivityThread.main(ActivityThread.java:8293)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:556)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1045)


just-grizzle avatar Dec 29 '23 15:12 just-grizzle

I'm getting the same Unable to add window -- token null is not valid error when touching the cast button during pause or playback on a plain Android 9 phone without any casting device.

Should you prefer me to report this in a separate issue, please let me now.

GfEW avatar Feb 26 '24 02:02 GfEW