mirror of
https://github.com/kokarare1212/librespot-python.git
synced 2026-04-25 00:25:49 +03:00
[GH-ISSUE #241] [BUG] ValueError: invalid literal for int() with base 10 and Max retries exceeded with url #38
Labels
No labels
bug
dependencies
duplicate
enhancement
invalid
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot-python-kokarare1212#38
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @BluDood on GitHub (Oct 19, 2023).
Original GitHub issue: https://github.com/kokarare1212/librespot-python/issues/241
Describe the bug
While loading a song to then download it, I seem to randomly get an error saying this:
ValueError: invalid literal for int() with base 10: 'Expires=1697802182~FullPath~hmac=Ne8qK1vrknzKhgnDJvCTLDydUxDCxW9'I also seem to get this other error, but thats a lot more rare:
(Caused by SSLError(CertificateError("hostname 'audio4-gm-fb.spotifycdn.com' doesn't match 'audio-gm-off.spotifycdn.com'")))To Reproduce
Steps to reproduce the behavior:
session.content_feeder(), for exampleExpected behavior
The stream should start, and get the bytes for downloading.
Logs
Client Information (please complete the following information):
Additional context
It has worked perfecly before, maybe spotify have made some changes?
@BluDood commented on GitHub (Oct 19, 2023):
Same error occurs on macOS using a Mac Mini M1, however this time it always returns one of the errors
@kokarare1212 commented on GitHub (Oct 19, 2023):
Perhaps the audio CDN URL specification has changed.
I'll look into this in more detail.
@HubertMatusik commented on GitHub (Oct 21, 2023):
Same problem, it doesn't happen every time. Actually, timestamp is wrong, but who knows why.
@kokarare1212 commented on GitHub (Oct 22, 2023):
github.com/kokarare1212/librespot-python@f97b6b2fe1There seems to be a similar problem with librespot-java.
The code was changed based on this pull request.
*The behavior has not been verified yet.
@tagdara commented on GitHub (Oct 22, 2023):
My follow up comment in the other project still applies - you may still encounter errors when getting a chunk from a server with “audio4” in the name. It’s probably either got a bad cert/missing SAN or it’s a canary for this new format.
@KagChi commented on GitHub (Oct 22, 2023):
Yeah, the new Expires are working. but we still get missmatch cert.
@wizjany commented on GitHub (Oct 22, 2023):
For people running into this and finding themselves here, as a local and temporary workaround you can turn off SSL verification (e.g., by inserting
client.verify = Falsehere) until the server starts returning the correct certificate. Standard disclaimer that turning off SSL verification is bad etc etc.@kokarare1212 commented on GitHub (Oct 23, 2023):
Waiting for more information as there is no positive solution at the moment...
@KagChi commented on GitHub (Oct 25, 2023):
Maybe can we just exclude audio4-gm-fb.spotifycdn.com for time being? the url cant be accessed through browser too (404)
@tagdara commented on GitHub (Oct 28, 2023):
@KagChi is correct that the only real solution for the time being is to exclude audio4-gm-fb from the pool.
I made the following temporary change to librespot-java that has been working for several hours today. I'm sure someone can supply an equivalent fix over here.
@kokarare1212 commented on GitHub (Oct 28, 2023):
I'll adopt that idea for now.
2bef6c4a5d@richteas75 commented on GitHub (Nov 6, 2023):
The same issue happens for me as of today, Mon, Nov. 06, 2023 with the host
audio-gm-fb.spotifycdn.com
Replacing the line
while "audio4-gm-fb" in selected_url:with
while "audio4-gm-fb" in selected_url or "audio-gm-fb" in selected_url:helped fix the issue for me today.
Even simply using
while "audio-gm-fb" in selected_url:worked today
@floodwayprintco commented on GitHub (Apr 1, 2024):
I use Spocon with Owntone and have been have been trying to track down why it's randomly pausing.
Do you think this issue is the same? https://github.com/spocon/spocon/issues/62
I posted a log and there are some failed CDN things in there.