Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spotify offline sdk connection issues #192

Open
alaeri opened this issue Jan 10, 2020 · 4 comments
Open

Spotify offline sdk connection issues #192

alaeri opened this issue Jan 10, 2020 · 4 comments
Labels

Comments

@alaeri
Copy link

alaeri commented Jan 10, 2020

Issue found on 10/01/2020. It looks very similar to #184 but the error message is different.

SDK Version:

7.0.0

OS Version:

9

Spotify version: 8.5.40.195

Steps to reproduce:

Sometimes when connecting via sdk to spotify in airplane mode this error is returned by AppRemote.connect():

AuthenticationFailedException: {"message":"java.lang.Throwable: Failed resolving \u0027hm://bakery/accountscookie\u0027, got status code: 0"}

Killing/Reopening the app and spotify and enabling wifi back seems to fix the issue.

I reproduced #175 before experiencing this new error. Maybe they are linked.

Expected behaviour:

Connection is authorized if spotify was online in the last 24h.

@mdelolmo mdelolmo added the bug label Jan 15, 2020
@mdelolmo
Copy link
Contributor

Apologies for the misleading error message.

Essentially that means Spotify tried to authorize your app online, and because the phone was in airplane mode, it failed.

Let me clarify that the "spotify was online in the last 24h" is a simplification of the actual requirement. I will add that by Spotify being online, we mean Spotify was launched online within that time frame.

For now I can treat this as a bug, because the error message should be more comprehensive.

@alaeri
Copy link
Author

alaeri commented Jan 15, 2020

Thank you for the clarification.

Is there a more complete description of the requirement?

(I'm pretty sure I launched spotify online in the last 24h before I had this bug, are there some situations that could reduce this timeframe? rebooting the device - spotify app killed?)

@mdelolmo
Copy link
Contributor

Hi @alaeri
Killing the app or rebooting the device should not affect this feature.

However, logging out or clearing the app's data, will invalidate the offline authorization.

In general, when your app is authorized Spotify will try to verify that is still authorized every time it's launched and online. If it can't verify it, then the TTL of that authorization is about 24 hours.

@tobika
Copy link

tobika commented Jan 17, 2020

I'm also doing tests with this at the moment:

Starting the app.
Making sure it's connected to spotify.
Going to airplane mode.
Closing the App.
Starting again (within seconds), sometimes it works, sometimes I have the error mentioned in this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants