[GH-ISSUE #93] Login Fails #81

Closed
opened 2026-02-27 04:57:25 +03:00 by kerem · 4 comments
Owner

Originally created by @zimmerma379 on GitHub (Oct 3, 2025).
Original GitHub issue: https://github.com/Googolplexed0/zotify/issues/93

Originally assigned to: @Googolplexed0 on GitHub.

Zotify Version
v0.9.27

Bug Description
Deleted "credentials.json" file to trigger creation of new login credentials. Issue zotify command to download track. Paste login URL presented into Chrome and complete login process. New "credentials.json" file is created. However, noticed "http://127.0.0.1:4381" page that used to be presented at end of login & grant process now gets error ["This site can’t be reached. 127.0.0.1 refused to connect."]. And zotify gets "librespot.mercury.MercuryClient.MercuryException: status: 403" error.
I'm sure it's me doing something incorrectly, but can not figure it out. :-(

Bug Triggering Command
zotify.exe "https://open.spotify.com/track/xxx" --download-real-time TRUE --download-lyrics FALSE

Error Traceback / Logs

   [●∙∙] Logging in...

Traceback (most recent call last):
File "", line 198, in run_module_as_main
File "", line 88, in run_code
File "\smb\Documents[Shared]\Projects(Python)[VENVs]\zotify\Scripts\zotify.exe_main
.py", line 7, in
File "\smb\Documents[Shared]\Projects(Python)[VENVs]\zotify\Lib\site-packages\zotify_main
.py", line 119, in main
args.func(args)
File "\smb\Documents[Shared]\Projects(Python)[VENVs]\zotify\Lib\site-packages\zotify\app.py", line 228, in client
Zotify(args)
File "\smb\Documents[Shared]\Projects(Python)[VENVs]\zotify\Lib\site-packages\zotify\config.py", line 578, in init
Zotify.login(args)
File "\smb\Documents[Shared]\Projects(Python)[VENVs]\zotify\Lib\site-packages\zotify\config.py", line 614, in login
cls.SESSION = session_builder.create()
^^^^^^^^^^^^^^^^^^^^^^^^
File "\smb\Documents[Shared]\Projects(Python)[VENVs]\zotify\Lib\site-packages\librespot\core.py", line 1647, in create
session.authenticate(self.login_credentials)
File "\smb\Documents[Shared]\Projects(Python)[VENVs]\zotify\Lib\site-packages\librespot\core.py", line 955, in authenticate
self.dealer().connect()
File "\smb\Documents[Shared]\Projects(Python)[VENVs]\zotify\Lib\site-packages\librespot\core.py", line 451, in connect
self.__session.tokens().get("playlist-read"),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\smb\Documents[Shared]\Projects(Python)[VENVs]\zotify\Lib\site-packages\librespot\core.py", line 2251, in get
return self.get_token(scope).access_token
^^^^^^^^^^^^^^^^^^^^^
File "\smb\Documents[Shared]\Projects(Python)[VENVs]\zotify\Lib\site-packages\librespot\core.py", line 2271, in get_token
response = self._session.mercury().send_sync_json(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\smb\Documents[Shared]\Projects(Python)[VENVs]\zotify\Lib\site-packages\librespot\mercury.py", line 186, in send_sync_json
raise MercuryClient.MercuryException(response)
librespot.mercury.MercuryClient.MercuryException: status: 403

Config File
{ "SAVE_CREDENTIALS": "True", "CREDENTIALS_LOCATION": "", "OUTPUT": "{track_number} {song_name}", "ROOT_PATH": "C:\\Users\\Bob\\Downloads", "ROOT_PODCAST_PATH": "", "SPLIT_ALBUM_DISCS": "True", "DOWNLOAD_LYRICS": "True", "MD_SAVE_GENRES": "False", "MD_ALLGENRES": "False", "MD_GENREDELIMITER": ",", "DOWNLOAD_FORMAT": "ogg", "DOWNLOAD_QUALITY": "auto", "TRANSCODE_BITRATE": "auto", "SKIP_EXISTING": "False", "SKIP_PREVIOUSLY_DOWNLOADED": "False", "RETRY_ATTEMPTS": "1", "BULK_WAIT_TIME": "1", "CHUNK_SIZE": "20000", "DOWNLOAD_REAL_TIME": "False", "LANGUAGE": "en", "PRINT_SPLASH": "False", "PRINT_SKIPS": "True", "PRINT_DOWNLOAD_PROGRESS": "True", "PRINT_ERRORS": "True", "PRINT_DOWNLOADS": "True", "PRINT_API_ERRORS": "True", "PRINT_PROGRESS_INFO": "True", "PRINT_WARNINGS": "True", "TEMP_DOWNLOAD_DIR": "" }

Additional Context
None.

Originally created by @zimmerma379 on GitHub (Oct 3, 2025). Original GitHub issue: https://github.com/Googolplexed0/zotify/issues/93 Originally assigned to: @Googolplexed0 on GitHub. **Zotify Version** v0.9.27 **Bug Description** Deleted "credentials.json" file to trigger creation of new login credentials. Issue zotify command to download track. Paste login URL presented into Chrome and complete login process. New "credentials.json" file is created. However, noticed "http://127.0.0.1:4381" page that used to be presented at end of login & grant process now gets error ["This site can’t be reached. 127.0.0.1 refused to connect."]. And zotify gets "librespot.mercury.MercuryClient.MercuryException: status: 403" error. **I'm sure it's me doing something incorrectly, but can not figure it out. :-(** **Bug Triggering Command** zotify.exe "https://open.spotify.com/track/xxx" --download-real-time TRUE --download-lyrics FALSE **Error Traceback / Logs** > [●∙∙] Logging in... >Traceback (most recent call last): > File "<frozen runpy>", line 198, in _run_module_as_main > File "<frozen runpy>", line 88, in _run_code > File "\\smb\Documents\[Shared]\Projects\(Python)\[VENVs]\zotify\Scripts\zotify.exe\__main__.py", line 7, in <module> > File "\\smb\Documents\[Shared]\Projects\(Python)\[VENVs]\zotify\Lib\site-packages\zotify\__main__.py", line 119, in main > args.func(args) > File "\\smb\Documents\[Shared]\Projects\(Python)\[VENVs]\zotify\Lib\site-packages\zotify\app.py", line 228, in client > Zotify(args) > File "\\smb\Documents\[Shared]\Projects\(Python)\[VENVs]\zotify\Lib\site-packages\zotify\config.py", line 578, in __init__ > Zotify.login(args) > File "\\smb\Documents\[Shared]\Projects\(Python)\[VENVs]\zotify\Lib\site-packages\zotify\config.py", line 614, in login > cls.SESSION = session_builder.create() ^^^^^^^^^^^^^^^^^^^^^^^^ > File "\\smb\Documents\[Shared]\Projects\(Python)\[VENVs]\zotify\Lib\site-packages\librespot\core.py", line 1647, in create session.authenticate(self.login_credentials) > File "\\smb\Documents\[Shared]\Projects\(Python)\[VENVs]\zotify\Lib\site-packages\librespot\core.py", line 955, in authenticate self.dealer().connect() > File "\\smb\Documents\[Shared]\Projects\(Python)\[VENVs]\zotify\Lib\site-packages\librespot\core.py", line 451, in connect > self.__session.tokens().get("playlist-read"), > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "\\smb\Documents\[Shared]\Projects\(Python)\[VENVs]\zotify\Lib\site-packages\librespot\core.py", line 2251, in get > return self.get_token(scope).access_token > ^^^^^^^^^^^^^^^^^^^^^ > File "\\smb\Documents\[Shared]\Projects\(Python)\[VENVs]\zotify\Lib\site-packages\librespot\core.py", line 2271, in get_token > response = self._session.mercury().send_sync_json( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "\\smb\Documents\[Shared]\Projects\(Python)\[VENVs]\zotify\Lib\site-packages\librespot\mercury.py", line 186, in send_sync_json > raise MercuryClient.MercuryException(response) >librespot.mercury.MercuryClient.MercuryException: status: 403 **Config File** `{ "SAVE_CREDENTIALS": "True", "CREDENTIALS_LOCATION": "", "OUTPUT": "{track_number} {song_name}", "ROOT_PATH": "C:\\Users\\Bob\\Downloads", "ROOT_PODCAST_PATH": "", "SPLIT_ALBUM_DISCS": "True", "DOWNLOAD_LYRICS": "True", "MD_SAVE_GENRES": "False", "MD_ALLGENRES": "False", "MD_GENREDELIMITER": ",", "DOWNLOAD_FORMAT": "ogg", "DOWNLOAD_QUALITY": "auto", "TRANSCODE_BITRATE": "auto", "SKIP_EXISTING": "False", "SKIP_PREVIOUSLY_DOWNLOADED": "False", "RETRY_ATTEMPTS": "1", "BULK_WAIT_TIME": "1", "CHUNK_SIZE": "20000", "DOWNLOAD_REAL_TIME": "False", "LANGUAGE": "en", "PRINT_SPLASH": "False", "PRINT_SKIPS": "True", "PRINT_DOWNLOAD_PROGRESS": "True", "PRINT_ERRORS": "True", "PRINT_DOWNLOADS": "True", "PRINT_API_ERRORS": "True", "PRINT_PROGRESS_INFO": "True", "PRINT_WARNINGS": "True", "TEMP_DOWNLOAD_DIR": "" }` **Additional Context** None.
kerem 2026-02-27 04:57:25 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@zimmerma379 commented on GitHub (Oct 3, 2025):

I see closed bug reports here noting issue with "librespot". Do I have the wrong version of "librespot"? Upon updating "zotify" to v0.9.27 today, the following was noted for "librespot":

Collecting` librespot@ git+https://github.com/kokarare1212/librespot-python.git (from zotify==0.9.27)
Cloning https://github.com/kokarare1212/librespot-python.git to c:\users\bob\appdata\local\temp\pip-install-30qry4l2\librespot_f8563a45bf884b3eaa2196a8a998ab59
Running command git clone --filter=blob:none --quiet https://github.com/kokarare1212/librespot-python.git 'C:\Users\Bob\AppData\Local\Temp\pip-install-30qry4l2\librespot_f8563a45bf884b3eaa2196a8a998ab59'
Resolved https://github.com/kokarare1212/librespot-python.git to commit 7aa377dfb6ec17168d8c327217c39c720bcded44
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done

<!-- gh-comment-id:3363809343 --> @zimmerma379 commented on GitHub (Oct 3, 2025): I see closed bug reports here noting issue with "librespot". Do I have the wrong version of "librespot"? Upon updating "zotify" to v0.9.27 today, the following was noted for "librespot": >Collecting` librespot@ git+https://github.com/kokarare1212/librespot-python.git (from zotify==0.9.27) > Cloning https://github.com/kokarare1212/librespot-python.git to c:\users\bob\appdata\local\temp\pip-install-30qry4l2\librespot_f8563a45bf884b3eaa2196a8a998ab59 > Running command git clone --filter=blob:none --quiet https://github.com/kokarare1212/librespot-python.git 'C:\Users\Bob\AppData\Local\Temp\pip-install-30qry4l2\librespot_f8563a45bf884b3eaa2196a8a998ab59' > Resolved https://github.com/kokarare1212/librespot-python.git to commit 7aa377dfb6ec17168d8c327217c39c720bcded44 > Installing build dependencies ... done > Getting requirements to build wheel ... done > Preparing metadata (pyproject.toml) ... done
Author
Owner

@zimmerma379 commented on GitHub (Oct 3, 2025):

Well, made a little progress. "Force" updated my "librespot" install with these commands:

python.exe -m pip uninstall "librespot"
python.exe -m pip install "git+https://github.com/kokarare1212/librespot-python.git"

Seems login may be working now? But still NOT getting the old "Authorization successful. You can close this window" page after login & grant process on "http://127.0.0.1:4381/" page. Instead get these pages:

This page isn’t working. 127.0.0.1 sent an invalid response.
This site can’t be reached. 127.0.0.1 refused to connect.

And still can NOT download track. Get these errors:

CRITICAL:Librespot:AudioKeyManager:Audio key error, code: 1
ERROR: FAILED TO FETCH AUDIO KEY ###
MAY BE CAUSED BY RATE LIMITS - CONSIDER INCREASING BULK_WAIT_TIME ###
GID: a637822f10634e5da029195a66179f67 - File_ID: 737cf4ccc5c2e54b462e2f34b0c31b08920b2bd2 ###
ERROR: SKIPPING SONG - FAILED TO GET CONTENT STREAM ###`

<!-- gh-comment-id:3363932812 --> @zimmerma379 commented on GitHub (Oct 3, 2025): Well, made a little progress. "Force" updated my "librespot" install with these commands: >python.exe -m pip uninstall "librespot" >python.exe -m pip install "git+https://github.com/kokarare1212/librespot-python.git" Seems login may be working now? But still **NOT** getting the old "_Authorization successful. You can close this window_" page after login & grant process on "http://127.0.0.1:4381/" page. Instead get these pages: >This page isn’t working. 127.0.0.1 sent an invalid response. >This site can’t be reached. 127.0.0.1 refused to connect. And still can **NOT** download track. Get these errors: >CRITICAL:Librespot:AudioKeyManager:Audio key error, code: 1 >ERROR: FAILED TO FETCH AUDIO KEY ### >MAY BE CAUSED BY RATE LIMITS - CONSIDER INCREASING `BULK_WAIT_TIME` ### >GID: a637822f10634e5da029195a66179f67 - File_ID: 737cf4ccc5c2e54b462e2f34b0c31b08920b2bd2 ### >ERROR: SKIPPING SONG - FAILED TO GET CONTENT STREAM ###`
Author
Owner

@zimmerma379 commented on GitHub (Oct 3, 2025):

So guess this bug was initially a duplicate of #48, but now a duplicate of #86?

<!-- gh-comment-id:3367560525 --> @zimmerma379 commented on GitHub (Oct 3, 2025): So guess this bug was initially a duplicate of [#48](https://github.com/Googolplexed0/zotify/issues/48), but now a duplicate of [#86](https://github.com/Googolplexed0/zotify/issues/86)?
Author
Owner

@Googolplexed0 commented on GitHub (Oct 4, 2025):

Unfortunately, yes.

<!-- gh-comment-id:3367750196 --> @Googolplexed0 commented on GitHub (Oct 4, 2025): Unfortunately, yes.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/zotify#81
No description provided.