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: "unable to login offline: no such user" #531

Closed
atzorvas opened this Issue Nov 30, 2018 · 56 comments

Comments

Projects
None yet
@atzorvas
Copy link

atzorvas commented Nov 30, 2018

First of all, gratz for the project!!

Description

Can't use spotify integration

Steps to Reproduce

  1. tizonia --spotify-user atzorvas --spotify-password "XXX" --spotify-track "Can't stop"
tizonia 0.15.0. Copyright (C) 2018 Juan A. Rubio
This software is part of the Tizonia project <http://tizonia.org>

[Spotify] [Connecting] : 'atzorvas'.
[Spotify] [Track search] 'Can't stop'.
[Spotify] [Track] 'Can't Stop' [Red Hot Chili Peppers].
[Spotify] [Track] 'We Can't Stop' [Miley Cyrus].
[Spotify] [Track] 'CAN'T STOP THE FEELING! (Original Song from DreamWorks Animation's "TROLLS")' [Justin Timberlake].
[Spotify] [Track] 'Can't Stop At All' [Yella Beezy].
[Spotify] [Track] 'CAN'T STOP THE FEELING! - Film Version' [Justin Timberlake].
[Spotify] [Track] 'I Can't Stop' [Flux Pavilion].
[Spotify] [Track] 'Can't Stop' [Red Hot Chili Peppers].
[Spotify] [Track] 'We Can't Stop' [Bea Miller].
[Spotify] [Track] 'Can't Stop The Feeling' [Piano Pianissimo].
[Spotify] [Track] 'You Can't Stop the Beat' [Elijah Kelley].
[Spotify] [Track] 'Can't Stop' [Dave Matthews Band].
[Spotify] [Track] 'Can't Stop Me Now' [Oh The Larceny].
[Spotify] [Track] 'Steal My Sunshine' [Len].
[Spotify] [Track] 'I Can't Stop Loving You' [Kem].
[Spotify] [Track] 'Can't Stop Dancin'' [Becky G].
[Spotify] [Track] 'I Can't Stop Drinking About You - Chainsmokers Remix' [Bebe Rexha].
[Spotify] [Track] 'I Still Can't Stop' [Flux Pavilion].
[Spotify] [Track] 'Cant Stop' [OneRepublic].
[Spotify] [Track] 'Whatever You Want' [Sports].
[Spotify] [Track] 'Cant Stop' [NxWorries].
[Spotify] [Tracks in queue] '20'.
[Spotify] : Spotify cache location: '/home/atzorvas/snap/tizonia/common/tizonia-atzorvas-spotify-atzorvas'
[Spotify] : 07:52:32.290 I [offline_authorizer.cpp:297] Unable to login offline: no such user
[Spotify] : 07:52:32.299 I [ap:1752] Connecting to AP ap.spotify.com:4070
[Spotify] : 07:52:32.394 I [ap:1226] Connected to AP: 104.199.65.145:4070
[Spotify] : 07:52:32.573 E [ap:3915] Connection error:  410

Expected behavior: Be able to listen to some music :)

Actual behaviour:

[Spotify] : 07:52:32.290 I [offline_authorizer.cpp:297] Unable to login offline: no such user
[Spotify] : 07:52:32.299 I [ap:1752] Connecting to AP ap.spotify.com:4070
[Spotify] : 07:52:32.394 I [ap:1226] Connected to AP: 104.199.65.145:4070
[Spotify] : 07:52:32.573 E [ap:3915] Connection error:  410

Reproduces how often: Always (for me at least..)

Versions

This software is part of the Tizonia project <http://tizonia.org>

Debug Info:
            * [Boost 1_58]
            * [TagLib 1.9.1]
            * [MediaInfoLib - v0.7.82]
NAME="Ubuntu"
VERSION="18.04.1 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.1 LTS"
VERSION_ID="18.04"

Installation Method Used

Snap package

@tizonia

This comment has been minimized.

Copy link
Owner

tizonia commented Nov 30, 2018

Hi!, thanks for taking the time.

I am pretty sure this is the error you get when the credentials used are incorrect. Please check your username and password. Also, note that you need Spotify Premium to stream audio from Spotify using Tizonia.

@juanrubio

This comment has been minimized.

Copy link
Collaborator

juanrubio commented Nov 30, 2018

I've created an issue to make sure Tizonia exists with an error message explaining that the login attempt has failed due to incorrect credentials. See #533.

@juanrubio juanrubio added the question label Nov 30, 2018

@tizonia

This comment has been minimized.

Copy link
Owner

tizonia commented Dec 3, 2018

Closing this question now (note that #533 is now closed).

@tizonia tizonia closed this Dec 3, 2018

@LazyBoot

This comment has been minimized.

Copy link

LazyBoot commented Dec 5, 2018

I'm having the same issue, and I've double and triple checked that the credentials I have provided are correct. Literally copy+pasted from my password manager.

@tizonia

This comment has been minimized.

Copy link
Owner

tizonia commented Dec 5, 2018

Is Tizonia outputting this error?

[Spotify] [FATAL] Login attempt failed. Please check the username and password.

If that is the case, then Spotify is the one preventing the login of the user with those credentials. Are you sure you can use those same credentials from another browser?

@tizonia tizonia reopened this Dec 5, 2018

@tizonia

This comment has been minimized.

Copy link
Owner

tizonia commented Dec 5, 2018

@LazyBoot

Is this something that could be happening to you?
#468

Also, any non-ascii characters in username or pass?

@FrenchieSmalls

This comment has been minimized.

Copy link

FrenchieSmalls commented Dec 5, 2018

I get the same error as well. I have triple-checked the credentials against my Spotify application, and they are correct.

No non-ascii characters in either the username or password. I have tried removing all white spaces from those two lines of the config file. Same error.

I have also tried bypassing the config file and entering the credentials directly as input arguments, but I get the same error.

[Spotify] [ERROR] 15:17:03.433 I [offline_authorizer.cpp:297] Unable to login offline: no such user
[Spotify] [FATAL] Login attempt failed. Please check the username and password.
@tizonia

This comment has been minimized.

Copy link
Owner

tizonia commented Dec 5, 2018

Really strange. I can't really figure out what is going on.

@atzorvas @LazyBoot @FrenchieSmalls

I suppose you guys are all Premium users, correct? if so, for how long?

Any chances that any of you could temporarily change your password and try with something else? (running out of useful ideas really..)

@FrenchieSmalls

This comment has been minimized.

Copy link

FrenchieSmalls commented Dec 5, 2018

Yes, Premium account on my end. I've had it for at least a couple of years now.

I probably shouldn't change the password, because my wife uses the account as well.

I thought that there might have been an issue with other open clients, so I made sure that Spotify was closed on my two computers and phone. It may be open on my wife's phone, but she's currently at a conference and won't be actively using the app.

@SabataMartin

This comment has been minimized.

Copy link

SabataMartin commented Dec 5, 2018

Hello, i got a same problem.
TIZONIA without any problem can list the playlist, but can't play them. ??

Spotify] [Track] 'Planet Of New Orleans' [Dire Straits].
[Spotify] [Track] 'How Long' [Dire Straits].
[Spotify] [Track] 'Export Import' [Tosca].
[Spotify] [Tracks in queue] '14'.
[Spotify] [Cache]: '/var/tmp/tizonia-martin-spotify-USERNAME'
[Spotify] [ERROR] 15:49:21.806 I [offline_authorizer.cpp:297] Unable to login offline: no such user
[Spotify] [FATAL] Login attempt failed. Please check the username and password.
tizonia exiting (OMX_ErrorInsufficientResources).

[OMX.Aratelia.audio_source.spotify.pcm:port:0]
[OMX_ErrorInsufficientResources]

@tizonia

This comment has been minimized.

Copy link
Owner

tizonia commented Dec 5, 2018

@SabataMartin

Yes, public playlists and in general any other Spotify metadata is accessible without credentials;
see

but a Premium account is required to stream the tracks.

Would any of you be able to go to this location with a browser that hasn't got your credentials stored and see if they work in there (I assume they will)?

@FrenchieSmalls

This comment has been minimized.

Copy link

FrenchieSmalls commented Dec 5, 2018

Would any of you be able to go to this location with a browser that hasn't got your credentials stored and see if they work in there (I assume they will)?

* https://open.spotify.com

My credentials work at that link.

@SabataMartin

This comment has been minimized.

Copy link

SabataMartin commented Dec 5, 2018

Would any of you be able to go to this location with a browser that hasn't got your credentials stored and see if they work in there (I assume they will)?

* https://open.spotify.com

My credentials work at that link.
The same - my login without any problem.

@SabataMartin

This comment has been minimized.

Copy link

SabataMartin commented Dec 5, 2018

@tizonia

[Spotify] [Connecting] : 'USERNAME'.
/usr/local/lib/python2.7/dist-packages/fuzzywuzzy/fuzz.py:11: UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning
warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning')

@BojanZelic

This comment has been minimized.

Copy link

BojanZelic commented Dec 5, 2018

[Spotify] [ERROR] 16:14:59.940 I [offline_authorizer.cpp:297] Unable to login offline: no such user
[Spotify] [FATAL] Login attempt failed. Please check the username and password.

Getting the same error. Credentials work at that link...not via tizonia. Not sure if it matters or not but I'm on a Premium Family Plan

@tizonia

This comment has been minimized.

Copy link
Owner

tizonia commented Dec 5, 2018

@SabataMartin

That is unrelated. It is just a reminder to install a faster fuzzy matcher. You can do it like this:

sudo -H pip2 install python-Levenshtein
@SabataMartin

This comment has been minimized.

Copy link

SabataMartin commented Dec 5, 2018

That is unrelated. It is just a reminder to install a faster fuzzy matcher. You can do it like this:

@tizonia OK, thnx :)

@tizonia

This comment has been minimized.

Copy link
Owner

tizonia commented Dec 5, 2018

@BojanZelic

Premium Family Plan

My account is the regular Premium account...

@LazyBoot

This comment has been minimized.

Copy link

LazyBoot commented Dec 5, 2018

Really strange. I can't really figure out what is going on.

I suppose you guys are all Premium users, correct? if so, for how long?

Any chances that any of you could temporarily change your password and try with something else? (running out of useful ideas really..)

I tried changing my password, it didn't help.
I've been a premium user since 2009.

@tizonia

This comment has been minimized.

Copy link
Owner

tizonia commented Dec 5, 2018

@LazyBoot
Thanks for that. I'm located in the UK, and I've just tried through a VPN with US access and in that case, I still can play normally with my account.

I'll keep investigating.

@FrenchieSmalls

This comment has been minimized.

Copy link

FrenchieSmalls commented Dec 5, 2018

@LazyBoot
Thanks for that. I'm located in the UK, and I've just tried through a VPN with US access and in that case, I still can play normally with my account.

I'll keep investigating.

If it helps: I'm located in Germany, but I logged into my VPN with US access and I still get the error.

@d1X0n

This comment has been minimized.

Copy link

d1X0n commented Dec 7, 2018

Same problem here, tried Spotify username and e-mail (both are working via open.spotify.com), no special characters, same error when using credentials via tizonia config file and via command parameters. Active Spotify Premium account, Linux Mint 19 Tara, all system and python packages updated. Tizonia installed via shell script and all dependencies are fulfilled.

...
[Spotify] [Cache]: '/var/tmp/tizonia-LOGIN-spotify-USERNAME'
[Spotify] [ERROR] 21:21:09.039 I [offline_authorizer.cpp:297] Unable to login offline: no such user
[Spotify] [FATAL] Login attempt failed. Please check the username and password.
tizonia exiting (OMX_ErrorInsufficientResources).

 [OMX.Aratelia.audio_source.spotify.pcm:port:0]
 [OMX_ErrorInsufficientResources]
@tizonia

This comment has been minimized.

Copy link
Owner

tizonia commented Dec 7, 2018

@d1X0n thanks for your feedback.

Unfortunately, I have no idea yet why this is working for some people and not for others. But this is obviously high in my priority list.

@fasolens

This comment has been minimized.

Copy link

fasolens commented Dec 7, 2018

I have exactly the same issue and I use also Premium Family Plan.

@atzorvas

This comment has been minimized.

Copy link
Author

atzorvas commented Dec 8, 2018

@tizonia

This comment has been minimized.

Copy link
Owner

tizonia commented Dec 10, 2018

Just a reminder that the Spotify login name currently has to be provided to Tizonia as

'username'

i.e., without the '@Domain' part.

I noticed that some of you tried both forms, without luck, but just in case.

@LazyBoot

This comment has been minimized.

Copy link

LazyBoot commented Dec 10, 2018

Well, my username doesn't have an @Domain part anyway.

@augustpemberton

This comment has been minimized.

Copy link

augustpemberton commented Dec 14, 2018

Ive just created a new premium account from scratch, no facebook integration, and this doesn't work. It's a part of a family plan so I don't know if thats the problem but seeing others have had this issue too i doubt it is.

@lenarddome

This comment has been minimized.

Copy link

lenarddome commented Dec 16, 2018

@juanrubio Sorry, but that didn't work either. I reinstalled mopidy with the spotify extensions, but still getting the error.

I have the problem on Ubuntu 18.10, tizonia installed via snap, regular premium user.

@d1X0n

This comment has been minimized.

Copy link

d1X0n commented Dec 16, 2018

@juanrubio tried to generate mopidy client-id and client-secret credentials on https://www.mopidy.com/authenticate/ and used that as my username and password in tizonia, but unfortunately it didn't work either :(

@ElvisExMachina

This comment has been minimized.

Copy link

ElvisExMachina commented Dec 18, 2018

Same login issue, snap install:

[Spotify] [Tracks in queue] '35'.
[Spotify] [Cache]: '/home/rich/snap/tizonia/common/tizonia-rich-spotify-USERNAME'
[Spotify] [ERROR] 19:23:30.173 I [offline_authorizer.cpp:297] Unable to login offline: no such user
[Spotify] [FATAL] Login attempt failed. Please check the username and password.
tizonia exiting (OMX_ErrorInsufficientResources).

[OMX.Aratelia.audio_source.spotify.pcm:port:0]
[OMX_ErrorInsufficientResources]

@ElvisExMachina

This comment has been minimized.

Copy link

ElvisExMachina commented Dec 18, 2018

Removed the snap and built from source, same errors:

[Spotify] [Cache]: '/var/tmp/tizonia-rich-spotify-USERNAME'
[Spotify] [ERROR] 20:05:55.136 I [offline_authorizer.cpp:297] Unable to login offline: no such user
[Spotify] [FATAL] Login attempt failed. Please check the username and password.
tizonia exiting (OMX_ErrorInsufficientResources).

[OMX.Aratelia.audio_source.spotify.pcm:port:0]
[OMX_ErrorInsufficientResources]

Interestingly enough it was working on my Kubuntu install as recently as Friday Dec 14 2018. But some drunken disk reorganization messed up that install.

@ilp0

This comment has been minimized.

Copy link

ilp0 commented Dec 19, 2018

Same login issue here, clean install from AUR (latest stable release). I have student spotify premium (should not matter) registered with email.

Same behavior on two different machines, one running Manjaro and other Arch.

@GijsVermarien

This comment has been minimized.

Copy link

GijsVermarien commented Dec 19, 2018

I am getting the same login error, putting username and password in "" did not resolve the issue either. both are defined in the config file.
The error:

[Spotify] [Track] 'All I Wanna Do' [Martin Jensen].
[Spotify] [Track] 'Snakker For Meget' [Katie Keller].
[Spotify] [Track] 'Make My Love Go' [Jay Sean].
[Spotify] [Track] 'Don't Let Me Down' [The Chainsmokers].
[Spotify] [Track] 'True Meaning Of Cruel' [Mendoza].
[Spotify] [Track] 'Hallelujah' [Alexander Brown].
[Spotify] [Track] 'For Evigt - Radio Edit' [Volbeat].
[Spotify] [Tracks in queue] '396'.
[Spotify] [Cache]: '/var/tmp/tizonia-user-spotify-USERNAME'
[Spotify] [ERROR] 20:26:10.979 I [offline_authorizer.cpp:297] Unable to login offline: no such user
[Spotify] [FATAL] Login attempt failed. Please check the username and password.
tizonia exiting (OMX_ErrorInsufficientResources).

 [OMX.Aratelia.audio_source.spotify.pcm:port:0]
 [OMX_ErrorInsufficientResources]

The relevant part of the configuration file:

# Spotify configuration
# -------------------------------------------------------------------------
# To avoid passing this information on the command line, uncomment
# and configure accordingly

spotify.user     =USERNAME
spotify.password =PASSWORD
# spotify.recover_lost_token = false (set to true to continue playback after
#                                     the token has been [spuriously?] lost)

The project looks great, shame the logging in does not work

@gcanzalo

This comment has been minimized.

Copy link

gcanzalo commented Dec 19, 2018

Exact same problem on Debian Stretch.

[Spotify] [Tracks in queue] '30'.
[Spotify] [Cache]: '/var/tmp/tizonia-not_your-spotify-fucking_business'
[Spotify] [ERROR] 21:18:17.364 I [offline_authorizer.cpp:297] Unable to login offline: no such user
[Spotify] [FATAL] Login attempt failed. Please check the username and password.
tizonia exiting (OMX_ErrorInsufficientResources).

[OMX.Aratelia.audio_source.spotify.pcm:port:0]
[OMX_ErrorInsufficientResources]

@tizonia

This comment has been minimized.

Copy link
Owner

tizonia commented Dec 19, 2018

Hey, thanks everyone for the feedback. It has been very useful.

Here is some more information. I've created a new premium account (non-family, non-facebook login) and I can confirm that the new account does not work with Tizonia (i.e. libspotify), whereas my old account continues to work perfectly fine without any issues.

One obvious difference between the new account and my old account is that the username is not related anymore to the email address and instead it is now a random string of around 25 characters allocated by Spotify.

However, the interesting detail is this one (screenshot from my old account):
screenshot from 2018-12-19 23-01-56

Tizonia was registered a long time ago as a Spotify client (required in order to use libspotify); However a user of Tizonia has never needed to explicitly authorize Tizonia to use his/her account. I.e. giving your Spotify credentials to Tizonia was enough to implicitly authorize Tizonia to use your account (I think this is what Spotify calls 'Implicit Grant Flow'). This is what I believe has changed in recent times. So any old users of Tizonia (like me) that already have Tizonia as an authorized app in their account should be able to use Tizonia as normal. But the Implicit Grant Flow seems to be disabled now for libspotify-based clients.

The solution that I believe might work is to implement one of the other authorization flows, like the Authorization Code Flow:
https://developer.spotify.com/documentation/general/guides/authorization-guide/#authorization-code-flow

I believe this is what mopidy-spotify does and I suspect still works:
https://www.mopidy.com/authenticate/

Tizonia had this for SoundCloud, but not for Spotify, since it has not been required (until now).

I will investigate how to add this new authorization flow for Tizonia.

@ElvisExMachina

This comment has been minimized.

Copy link

ElvisExMachina commented Dec 20, 2018

Thanks for investigating. I've been running the heavy spotify client like some kind peasant.

@GijsVermarien

This comment has been minimized.

Copy link

GijsVermarien commented Dec 20, 2018

@tizonia I indeed have a 25 char account name, any help I can provide?

@ilp0

This comment has been minimized.

Copy link

ilp0 commented Dec 20, 2018

I too have 25 char account name. I tried to use both email and the long account name for my username in the config but both give the same error.

@tizonia

This comment has been minimized.

Copy link
Owner

tizonia commented Dec 31, 2018

Just another piece of info.

I received last week an email from Spotify asking me to reset my password. Sounds like my attempts to access Spotify from other countries using various VPNs triggered the reset on their end. So I had to change my password and after that, I can no longer access Spotify with Tizonia, even though Tizonia still is displayed in my account as an authorized app.

Maybe I'll have some time to implement the new auth flow this coming weekend.

@codeKonami

This comment has been minimized.

Copy link

codeKonami commented Jan 16, 2019

I've created a new premium account today (with a new email address). Try to use it with the latest 0.16.0 version but I'm getting the same error as everybody.

[Spotify] [Cache]: '/var/tmp/tizonia-ubuntu-spotify-_____'
[Spotify] [ERROR] 00:28:09.036 I [offline_authorizer.cpp:297] Unable to login offline: no such user
[Spotify] [FATAL] Login attempt failed. Please check the username and password.

But strangely, if I use the exact same command on an older Tizonia installation (which is on 0.15.0) it does work with the exact same account.
Here are the logs

[Spotify] : Spotify cache location: '/var/tmp/tizonia-ubuntu-spotify-_____'
[Spotify] : 00:27:03.490 I [offline_authorizer.cpp:297] Unable to login offline: no such user
[Spotify] : 00:27:03.501 I [ap:1752] Connecting to AP ap.spotify.com:4070
[Spotify] : 00:27:03.563 I [ap:1226] Connected to AP: 104.199.65.2:4070
[Spotify] : 00:27:03.695 I [user_cache:135] UserCache::initiateGetUsers() will query for 1 users
[Spotify] : '[HERE IS DISPLAYED MY 25 CHAR USERNAME]' logged in.

... and then the music plays

I don't know if it's a useful info.

@gcanzalo

This comment has been minimized.

Copy link

gcanzalo commented Jan 16, 2019

Spotifyd (https://github.com/Spotifyd/spotifyd) works great if all you want is a spotify client.

@tizonia tizonia added bug and removed question labels Jan 16, 2019

@tizonia tizonia added this to the v0.17.0 milestone Jan 16, 2019

@tizonia

This comment has been minimized.

Copy link
Owner

tizonia commented Jan 16, 2019

Thanks, @codeKonami

I don't know if it's a useful info.

Most useful indeed.

Pretty unfortunate, but a regression was introduced in 0.16.0. Just realized after comparing 0.15.0 and 0.16.0. The fix is now in the develop branch (96074c2).

It looks like an already populated cache (e.g. /var/tmp/tizonia-me-spotify-my) would hide this regression for an existing user of the software (like me). However new users, (or people changing their Spotify passwords, or people installing the software on another machine, where the cache would not be populated yet) would see this problem.

I am spinning a new release now. Version 0.17.0 will be in the repos in the next 2-3 days.

@SabataMartin

This comment has been minimized.

Copy link

SabataMartin commented Jan 16, 2019

@codeKonami

This comment has been minimized.

Copy link

codeKonami commented Jan 17, 2019

@tizonia Great news! Thanks

@juanrubio juanrubio closed this in 96074c2 Jan 17, 2019

@SabataMartin

This comment has been minimized.

Copy link

SabataMartin commented Jan 20, 2019

@Allaman

This comment has been minimized.

Copy link

Allaman commented Jan 21, 2019

Sadly, the docker image is still on 0.16 https://github.com/tizonia/docker-tizonia/blob/master/Dockerfile#L12
Unfortunately, I cannot create a PR at the moment...

@d1X0n

This comment has been minimized.

Copy link

d1X0n commented Jan 21, 2019

I've successfully updated to version 0.17.0 and everything now works like a charm! Finally, I can fully enjoy your product :) Thank you very much!

@tizonia

This comment has been minimized.

Copy link
Owner

tizonia commented Jan 21, 2019

@Allaman

Hopefully, the docker image will get updated very soon. Thanks all for your patience!

@Allaman

This comment has been minimized.

Copy link

Allaman commented Jan 22, 2019

The docker image is now working too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment