Schnouki / spop

A Spotify client running as a daemon, similar to mpd.
GNU General Public License v3.0
248 stars 17 forks source link

Unable to login offline: no such user #37

Closed jozydapozy closed 9 years ago

jozydapozy commented 9 years ago

When i run spopd I'm getting the error Unable to login offline: no such user. This is my full log:

pi@raspberrypi ~/spop $ ./build_and_run -fv
Running CMake to regenerate build system...
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/spop/build
[  4%] Built target spop_audio_ao
[  8%] Built target spop_audio_oss
[ 12%] Built target spop_audio_sox
[ 16%] Built target spop_plugin_awesome
[ 48%] Built target spop_plugin_mpris2
[ 52%] Built target spop_plugin_notify
[ 56%] Built target spop_plugin_savestate
[ 60%] Built target spop_plugin_scrobble
[100%] Built target spopd
spop Copyright (C) 2010, 2011, 2012, 2013, 2014 Thomas Jost
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it under certain conditions.
See the COPYING file bundled with this program for details.
Powered by SPOTIFY(R) CORE

2015-01-02 23:27:42 [SPTF] 23:27:42.211 I [offline_authorizer.cpp:297] Unable to login offline: no such user
2015-01-02 23:27:42 [INFO] Listening on 127.0.0.1: 6602

I'm sure I've entered my (premium) spotify credentials correct. What could be wrong?

Halloran commented 9 years ago

I got this same issue, and I'm quite sure that the problem is not with my spotify account.

This thread: http://stackoverflow.com/questions/9300040/unable-to-login-offline-no-such-user-spotify might be relevant...

woostersoz commented 9 years ago

I have the same issue. I run spopd and can see that it's listed in 'pstree'. As soon as I try to access it (either through Volumio's Web UI or running a command such as 'ls' through telnet), the process ends and I get the same 'Unable to login offline' message in the log.

I looked at the SO question and the related answers but still don't have a clue as to how to get spop to work :) Any help would be appreciated

Schnouki commented 9 years ago

Hey, sorry to reply so late and thanks for telling me about this.

The "Unable to login offline: no such user" is actually not an error. It's a message sent by libspotify (hence the [SPTF] tag), but it's normal: if I put an empty directory as settings_path and cache_path, I also have the same message when starting spop for the first time:

2015-02-05 03:11:04 [INFO] Loading plugin savestate...
2015-02-05 03:11:04 [INFO] Loading plugin mpris2...
2015-02-05 03:11:04 [SPTF] 02:11:04.616 I [offline_authorizer.cpp:297] Unable to login offline: no such user
2015-02-05 03:11:04 [INFO] Listening on ::1: 6602
2015-02-05 03:11:04 [INFO] Listening on 127.0.0.1: 6602

Yet everything works fine. So this message is not a cause for concern.

The bug is actually much, much stupider, and completely my fault. In d031e2a3, I added a mutex to make logging thread-safe. But I did it wrong, so if spop is not running in debug mode, this will cause any thread that tries to log a debug message to deadlock. Which causes lots of issues.

This will be fixed in a few minutes; if you don't want to update/recompile, please just run spop in debug mode.

I'm really sorry for this bug and for the long delay it took me to fix it. Sincere apologies!

woostersoz commented 9 years ago

Great, thanks! I haven't updated/recompiled but running the current version in debug mode works well.

jozydapozy commented 9 years ago

Thanks for the fix. I'll give it a try.