spotify / android-sdk

Spotify SDK for Android
https://developer.spotify.com/documentation/android/
Apache License 2.0
454 stars 117 forks source link

Android SDK ContentAPI.getRecommendedContentItems("default") crashes with ClassCastException #365

Open hufman opened 6 days ago

hufman commented 6 days ago

Issue found on 2024-06-24.

SDK Version:

0.7.2 and 0.8.0

OS Version:

Android 14

Scope(s):

Steps to reproduce:

  1. remote.contentApi.getRecommendedContentItems("default")

Expected behaviour:

The Result Callback will be given a list of top-level browseable entries.

Actual behaviour:

The Error Callback is given the following Throwable:

com.spotify.protocol.client.error.RemoteClientException: "java.lang.ClassCastException"
at com.spotify.protocol.client.RemoteWampClient.getRemoteClientException(RemoteWampClient.java:130)
at com.spotify.protocol.client.RemoteWampClient.access$200(RemoteWampClient.java:16)
at com.spotify.protocol.client.RemoteWampClient$1.onError(RemoteWampClient.java:107)
at com.spotify.protocol.client.WampRouterImpl.routeError(WampRouterImpl.java:75)
at com.spotify.protocol.client.WampRouterImpl.route(WampRouterImpl.java:46)
at com.spotify.protocol.client.AppProtocolCommunicator.onData(AppProtocolCommunicator.java:77)
at com.spotify.android.appremote.internal.RemoteServiceIo.handleMessage(RemoteServiceIo.java:108)
at com.spotify.android.appremote.internal.RemoteServiceIo.access$000(RemoteServiceIo.java:45)
at com.spotify.android.appremote.internal.RemoteServiceIo$IncomingHandler.handleMessage(RemoteServiceIo.java:86)
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:8223)
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:977)
hufman commented 6 days ago

It seems other browse locations work, such as "com.spotify.your-library" and "com.spotify.browse". Can someone look into why Recommended Items is no longer working?