GmsCore icon indicating copy to clipboard operation
GmsCore copied to clipboard

com.pandora crashes on volume change

Open zzzb123 opened this issue 4 years ago • 15 comments

Affected app Name: Pandora Package id: com.pandora

Describe the bug App crashes whenever the volume is changed.

To Reproduce Steps to reproduce the behavior:

  1. Open Pandora
  2. Change the volume level
  3. App crashes

Expected behavior Volume changes without a crash

Screenshots If applicable, add screenshots to help explain your problem.

System Android Version: 9 Custom ROM: LineageOS 16.0

microG microG Core version: 0.2.17.204714 microG Self-Check results: All ticked

Additional context adb says the culprit is an attempt to call CastDevice's getModelName() on a null pointer, but I was unable to figure out much beyond that.

zzzb123 avatar Feb 26 '21 00:02 zzzb123

Confirmed on Android 10 and 11. On Android 11, I was using Pandora 2102.1.1 and microG 0.2.18.204714.

Stack trace in device log:

FATAL EXCEPTION: main
Process: com.pandora.android, PID: 28018
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.google.android.gms.cast.CastDevice.getModelName()' on a null object reference
	at com.pandora.ce.remotecontrol.googlecast.GoogleCastDevice.f(SourceFile:1)
	at com.pandora.ce.stats.CastStatsProcessor.a(SourceFile:11)
	at com.pandora.ce.stats.CastStatsHelper.a(SourceFile:8)
	at com.pandora.ce.remotecontrol.RemoteManagerImpl.onRouteVolumeChanged(SourceFile:2)
	at androidx.mediarouter.media.g$d$b.a(SourceFile:16)
	at androidx.mediarouter.media.g$d$b.handleMessage(SourceFile:13)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:223)
	at android.app.ActivityThread.main(ActivityThread.java:7660)
	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:947)

parcelcat avatar Apr 12 '21 07:04 parcelcat

Confirmed on Android 10, Pandora 2103.1, microG 0.2.18.204714.

Volume changes can be done normally after clearing Pandora app storage, but app will crash again after 2-3 uses.

mjtalarczyk avatar Apr 23 '21 21:04 mjtalarczyk

The problem is that microG does not implement the CastDevice class found in Google Play Services.

The CastDevice class needs to be implemented and added to https://github.com/microg/GmsCore/tree/master/play-services-cast/src/main/java/com/google/android/gms/cast inside microG's com.google.android.gms.cast package.

parcelcat avatar Apr 25 '21 12:04 parcelcat

This may have been fixed in ae8516a3397eb5d2c3edaef1330c0fec641ae142. Looking forward to testing this in the next release. Thanks, @mar-v-in!

parcelcat avatar Nov 02 '21 09:11 parcelcat

I attempted to test this on microG 0.2.23.214816 with Pandora 2112.1. Pandora was stuck on the loading screen, which prevented me from testing out the Cast API issue. Pandora still works in a work profile with microG disabled.

parcelcat avatar Jan 27 '22 04:01 parcelcat

I've had this issue for almost two years while using calyxos. Clearing the data will allow me one use of the app where adjusting the volume does not crash it. The second use will crash it with volume changes. 2203.1.

sokol99 avatar May 07 '22 03:05 sokol99

Pandora ~~now fully works~~ with microG on Android 12. It fails to go past the loading screen with microG on Android 11, unless microG is disabled (which can be done on the work profile only, if desired).

Edit: No, Pandora still crashes with microG on Android 12 when the volume is changed. I didn't test it thoroughly the first time.

parcelcat avatar May 27 '22 02:05 parcelcat

Thanks @parcelcat. Is Pandora supported as of a specific version of microG? It's still not working for me so I want to check whether I have the update. Was it a microG fix?

sokol99 avatar May 27 '22 14:05 sokol99

@sokol99 I'm not sure. All I know is that microG ~~0.2.24.224826~~ 0.2.24.214816 ~~works for me~~ with Pandora on Android 12 (Android 12L, to be precise), but that same version of microG does not work with Pandora on Android 11.

Edit: Doesn't work yet. See update.

parcelcat avatar May 29 '22 19:05 parcelcat

Great, thanks @parcelcat. I will look for an update. My CalyxOS 3.5.1 is currently running Android 12L but is only on microG 0.2.24.214816-25 so it's a little behind what you have. What version of Pandora is working? Thanks.

sokol99 avatar May 30 '22 02:05 sokol99

@sokol99 Oops, that was a typo. We have the same version of microG. And Pandora just crashed when I tested it again, so I must not have tested it thoroughly. I'm going to switch Pandora to the work profile again with microG disabled. Sorry for the false hope.

parcelcat avatar May 30 '22 18:05 parcelcat

Ok, darn. Thanks for the update...

sokol99 avatar Jun 01 '22 13:06 sokol99

@sokol99 I can confirm that Pandora 2303.1 is working with microG version 0.2.27.223616. No crashes on volume change.

parcelcat avatar Apr 21 '23 01:04 parcelcat

Thanks @parcelcat , that's great!

sokol99 avatar Apr 21 '23 14:04 sokol99