spotify / android-sdk

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

SpotifyAppRemote.getConnectApi().connectSetVolume(newVolume) throwing exception #336

Open mlenger opened 2 years ago

mlenger commented 2 years ago

Issue found on 2022-11-14.

SDK Version: 0.7.4

OS Version: Any Android version

Scope(s): app-remote-control

Steps to reproduce:

  1. Connect to Player according to documentation
  2. Call connection.connectApi.connectSetVolume(0.5f)

Expected behaviour:

Volume is adapted to new volume level. This used to work until some recent update of the Spotify app.

Actual behaviour:

Exception from Remote:

Caused by com.spotify.protocol.client.error.RemoteClientException: "java.lang.IllegalArgumentException" at com.spotify.protocol.client.RemoteWampClient.getRemoteClientException(RemoteWampClient.java:139) at com.spotify.protocol.client.RemoteWampClient.access$200(RemoteWampClient.java:16) at com.spotify.protocol.client.RemoteWampClient$1.onError(RemoteWampClient.java:116) 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:78) at com.spotify.android.appremote.internal.RemoteServiceIo.handleMessage(RemoteServiceIo.java:111) at com.spotify.android.appremote.internal.RemoteServiceIo.access$000(RemoteServiceIo.java:45) at com.spotify.android.appremote.internal.RemoteServiceIo$IncomingHandler.handleMessage(RemoteServiceIo.java:89) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:223) at android.app.ActivityThread.main(ActivityThread.java:7656) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)