Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

Android Spotify App Remote `AuthenticationFailedException` When Networks Unavailable

Android Spotify App Remote `AuthenticationFailedException` When Networks Unavailable

Plan: Premium

Country: United States

 

Device: Google Pixel 6 Pro

Operating System: Android 12

 

The issue:

Recently, Spotify App Remote 0.7.2 has stopped working completely when my device is in airplane mode, has no network or has poor network coverage.  This used to work really, really well.  When I first integrated my app with Spotify App Remote and could initially use the connect method to obtain a working connection while offline, then continue to create working connections upon cold starts of my app process or the Spotify app while in poor to no network.  This would let my app request tracks by URI, so long as they were cached or downloaded.  This no longer works.  For a a mobile app, not having offline support makes Spotify App Remote no longer a viable solution.

 

Please help!  There have been other posts referencing this exception here on the forum, but no replies (Just Google for the exception name).  Spotify Cares on Twitter suggested to post here.

 

Expected Behavior: After an app successfully connects Spotify App Remote while online and obtains the required user scope via the auth view, similar attempts to connect should succeed when a network connection is unavailable.  If a measure of grace period time expires without a successful network connection, Spotify App Remote might deny a connection as it did once upon a time using a detailed exception type, code and message so the consuming app can notify users why the connection was denied and prompt them to try again when online.  Spotify App Remote should be able to play downloaded and cached tracks by their URI when offline.  Spotify App Remote should have reliable offline functionality in airplane mode and during poor network conditions.

 

Actual Result: A vague exception is thrown by connection attempts and Spotify App Remote cannot be used offline immediately after putting the device in airplane mode.

 

com.spotify.android.appremote.api.error.AuthenticationFailedException: {“message”:“Could not authenticate within 60 s. It is possible that there\u0027s an issue with Spotify auth services or the connection is unstable”}
at com.spotify.android.appremote.api.LocalConnector.asAppRemoteException(LocalConnector.java:137)
at com.spotify.android.appremote.api.LocalConnector.access$000(LocalConnector.java:34)
at com.spotify.android.appremote.api.LocalConnector$1.onConnectionFailed(LocalConnector.java:117)
at com.spotify.android.appremote.internal.SdkRemoteClientConnector$ConnectionTask.onPostExecute(SdkRemoteClientConnector.java:162)
at com.spotify.android.appremote.internal.SdkRemoteClientConnector$ConnectionTask.onPostExecute(SdkRemoteClientConnector.java:95)
at android.os.AsyncTask.finish(AsyncTask.java:771)
at android.os.AsyncTask.access$900(AsyncTask.java:199)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:788)
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:7870)
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:1003)
Caused by: com.spotify.protocol.client.error.RemoteClientException: {“message”:“Could not authenticate within 60 s. It is possible that there\u0027s an issue with Spotify auth services or the connection is unstable”}
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.onAbort(RemoteWampClient.java:44)
at com.spotify.protocol.client.WampRouterImpl.routeAbort(WampRouterImpl.java:100)
at com.spotify.protocol.client.WampRouterImpl.route(WampRouterImpl.java:26)
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)

 

 

 

Reply
2 Replies

I am having the same issue!! Have you received any reply?

Thanks for sharing!  I have not received a resolution yet. I've reported a couple of issues here on the forum, but I've never received a reply from Spotify.  I did reach out to @SpotifyCares via a DM on Twitter.  They did respond, but actually just asked me to post to the forum again.  When I mentioned I've not been getting responses here, they asked me to post to the Android SDK's Github.  I did, but also still haven't heard anything.

 

https://github.com/spotify/android-sdk/issues/330

 

I suspect something has changed in the Spotify app itself which is causing the Spotify Android SDK to no longer function without network.  I'd recommend you reach out to @SpotifyCares via DM on Twitter and refer to this very post on the community to see if they will escalate.  You could also comment on the Github issue above to try and increase the priority.

 

If we are persistent in communicating new issues and issues that are not being addressed I'm hopeful we'll here from Spotify.

Suggested posts