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

404 after playing one song #95

Open
wosrediinanatour opened this issue Feb 25, 2019 · 15 comments
Open

404 after playing one song #95

wosrediinanatour opened this issue Feb 25, 2019 · 15 comments

Comments

@wosrediinanatour
Copy link

Dear all,

After playing a song using Librespot, playing stops (404 error). Then I have to stop and restart Librespot for the next song. (latest versions).
Haven't success to start and authorize Librespot manually yet.

By the way: if in the settings automatically start/stop at launch/stop of Hutspot is enabled, I have to restart Librespot manually for success.

@wosrediinanatour
Copy link
Author

PS: it semms to work better, when Librespot has been started at console.

@wosrediinanatour
Copy link
Author

ok, got the same problem when trying to start a new song. Hutspot writes Error 404, but Librespot doesn't show any reaction, it continues to a play current song without any logging. I guess thats a problem between Hutspot and Librespot.

@wdehoog
Copy link
Collaborator

wdehoog commented Feb 25, 2019

Could you check, when the error occurs, what is shown on the Devices page? Is Librespot still present and active?
Does the logs show anything helpfull (devel-su journalctl -af and then start hutspot)?

@wosrediinanatour
Copy link
Author

wosrediinanatour commented Feb 25, 2019

After restarting Hutspot and trying a little bit, Librespot got the error Invalid Session with "code 104, Connection reset by peer".

No, Librespot wasn't present & active (it was grey).

I will check journal again when I can connect by SSH (skimming over the logs at time of last directly use on my device, doesn't show me anything relevant.)

@wdehoog
Copy link
Collaborator

wdehoog commented Feb 25, 2019

Make sure you have only one librespot instance running (ps aux | grep librespot).

You say 'Librespot got the error Invalid Session with "code 104, Connection reset by peer".' what does it mean? How does librespot 'got the error'?
The message you give "code 104, Connection reset by peer" does not sound familiar. Google does not give much info as well. Are you sure it originates from librespot?

@wosrediinanatour
Copy link
Author

I will.

"code 104, Connection reset by peer" was in the Librespot's output, when started at the console (before I could see that Librespot was streaming the file it played). The message was part of a JSON message, so I guess it was by/from the Spotify server.

@wosrediinanatour
Copy link
Author

wosrediinanatour commented Feb 25, 2019

Next try: It worked for some songs. But then, when changing song, 404 Error is shown in Hutspot and Librespot continue playing (does not show errors). Journal::
`Feb 25 18:54:20 Sailfish [13508]: [D] :201 - number of AlbumTracks: 18

Feb 25 18:54:20 Sailfish [13508]: [D] :244 - number of ArtistAlbums: 32
Feb 25 18:54:23 Sailfish [13508]: [D] :201 - number of AlbumTracks: 18
Feb 25 18:54:30 Sailfish [13508]: [W] unknown:38 - file:///usr/share/hutspot/qml/components/PlaybackState.qml:38: TypeError: Cannot read property 'images' of undefined
Feb 25 18:54:30 Sailfish [13508]: [W] unknown:694 - file:///usr/share/hutspot/qml/pages/Playing.qml:694: TypeError: Cannot read property 'name' of undefined
Feb 25 18:54:34 Sailfish [13508]: [W] unknown:38 - file:///usr/share/hutspot/qml/components/PlaybackState.qml:38: TypeError: Cannot read property 'images' of undefined
Feb 25 18:54:34 Sailfish [13508]: [W] unknown:694 - file:///usr/share/hutspot/qml/pages/Playing.qml:694: TypeError: Cannot read property 'name' of undefined
Feb 25 18:54:34 Sailfish [13508]: [W] unknown:38 - file:///usr/share/hutspot/qml/components/PlaybackState.qml:38: TypeError: Cannot read property 'images' of undefined
Feb 25 18:54:34 Sailfish [13508]: [W] unknown:694 - file:///usr/share/hutspot/qml/pages/Playing.qml:694: TypeError: Cannot read property 'name' of undefined
Feb 25 18:54:35 Sailfish [13508]: [W] unknown:38 - file:///usr/share/hutspot/qml/components/PlaybackState.qml:38: TypeError: Cannot read property 'images' of undefined
Feb 25 18:54:35 Sailfish [13508]: [W] unknown:694 - file:///usr/share/hutspot/qml/pages/Playing.qml:694: TypeError: Cannot read property 'name' of undefined
Feb 25 18:54:35 Sailfish [13508]: [W] unknown:38 - file:///usr/share/hutspot/qml/components/PlaybackState.qml:38: TypeError: Cannot read property 'images' of undefined
Feb 25 18:54:35 Sailfish [13508]: [W] unknown:694 - file:///usr/share/hutspot/qml/pages/Playing.qml:694: TypeError: Cannot read property 'name' of undefined
Feb 25 18:54:35 Sailfish [13508]: [W] unknown:38 - file:///usr/share/hutspot/qml/components/PlaybackState.qml:38: TypeError: Cannot read property 'images' of undefined
Feb 25 18:54:35 Sailfish [13508]: [W] unknown:694 - file:///usr/share/hutspot/qml/pages/Playing.qml:694: TypeError: Cannot read property 'name' of undefined
Feb 25 18:54:37 Sailfish [13508]: [W] unknown:38 - file:///usr/share/hutspot/qml/components/PlaybackState.qml:38: TypeError: Cannot read property 'images' of undefined
Feb 25 18:54:37 Sailfish [13508]: [W] unknown:694 - file:///usr/share/hutspot/qml/pages/Playing.qml:694: TypeError: Cannot read property 'name' of undefined
Feb 25 18:54:50 Sailfish [13508]: [C] :94 - _performRequest: 404: Device not found
Feb 25 18:54:50 Sailfish [13508]: [C] :94 - _performRequest: 404: Device not found
Feb 25 18:54:54 Sailfish [13508]: [C] :94 - _performRequest: 404: Device not found
Feb 25 18:54:54 Sailfish [13508]: [C] :94 - _performRequest: 404: Device not found
Feb 25 18:54:55 Sailfish [13508]: [C] :94 - _performRequest: 404: Device not found
Feb 25 18:54:55 Sailfish [13508]: [C] :94 - _performRequest: 404: Device not found`

I attached journal and console output.
librespot_console.txt
journal.txt

@wdehoog
Copy link
Collaborator

wdehoog commented Feb 25, 2019

The log shows hutspot has restarted. Did you do that?
Sorry but I have no idea what is causing hutspot to loose connection with librespot (no current device).

What phone do you use it on?
Could you try to test a more recent version? See http://repo.merproject.org/obs/home:/wdehoog:/hutspot/sailfish_latest_armv7hl/armv7hl/

@wosrediinanatour
Copy link
Author

I hit CTRL+C...

I am using Sony Xperia X.
Thx, I will try.

@wosrediinanatour
Copy link
Author

wosrediinanatour commented Feb 27, 2019

@wdehoog: Maybe I missunderstood you. I think that you mean that Librespot restarted, when the connection got lost. I played around with Hutspot/Librespot and reinstalled the latest versions of Hutspot and Librespot. First it worked quite well, but after about 10 or 15 songs, it happend again: Hutspot/Librespot plays only one song. Then I had to restart Librespot from the settings page, and it worked for the next song only (but the next song is no that one I choose).

Update: It is quite interesting: I wanted to test again connected with SSH and devel-su journalctl -af, but it works . The only difference I see is that the phone does not move...(I usually use/try Hutspot/Librespot in the train or when walking).

Update 2: I found some problems (issues) on Librespots Github site. Maybe it is this: librespot-org/librespot#291

@wdehoog
Copy link
Collaborator

wdehoog commented Feb 27, 2019

Losing network connection is problematic. Hutspot can detect it and quit. Auto reconnect/start or whatever is needed is not implemented.
Hutspot would probably need to reregister with Spotify and with the Librespot instance.

@wdehoog
Copy link
Collaborator

wdehoog commented Feb 27, 2019

The issue you refer to is about another problem. The version of Librespot on openrepos.net already contains this fix.

@wosrediinanatour
Copy link
Author

Ok, thx

@wdehoog
Copy link
Collaborator

wdehoog commented Feb 27, 2019

Does not look good. Librespot cannot recover from a broken network connection see librespot-org/librespot#134.

I suppose we can't do more then stop the librespot service, wait for a network connection, reconnect to spotify, start Librespot and reregister with it. Which in the end gives not much more then just quit and let the user restart hutspot.

@wosrediinanatour
Copy link
Author

That seems to be the root cause, yes. (And maybe even high latency in mobile networks)

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

No branches or pull requests

2 participants