mirror of
https://github.com/Googolplexed0/zotify.git
synced 2026-04-24 22:05:53 +03:00
[GH-ISSUE #27] OAuth Awaiting Token Timeout #22
Labels
No labels
bug
considering
discussion
documentation
enhancement
enhancement
good first issue
help wanted
pull-request
question
stale
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/zotify#22
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 @fafamobile on GitHub (Jun 27, 2025).
Original GitHub issue: https://github.com/Googolplexed0/zotify/issues/27
Hi,
I am having an issue authenticating, I am wondering if anyone has the same issue?
Thanks
@Kussh commented on GitHub (Jun 27, 2025):
I had the same issue. After authenticating Zotify works at first, but after PC reboot I start getting the authentication error.
I temporarily solved it by deleting the .json files located in
C:\User[User name]\AppData\Roaming\Zotifyand the login in with zotify again.@kartik-binzade commented on GitHub (Jul 7, 2025):
If you see this, don't worry! Just try logging back in. If you see the incorrect username or token error, delete your credentials.json and you should be able to log back in.
Navigate to this location (make sure to set your USERNAME):
C:\Users<USERNAME>\AppData\Roaming\Zotify\
@fafamobile commented on GitHub (Jul 7, 2025):
I have tried logging in multiple times and will not authenticate. Not bad credentials but does not even populate a credentials.json
@Googolplexed0 commented on GitHub (Jul 8, 2025):
Something may have changed on the OAuth side, but without a specific error log/message there is not much I can do to investigate or help.
@fafamobile commented on GitHub (Jul 21, 2025):
Sorry this is the error message:
Traceback (most recent call last):
File "", line 198, in run_module_as_main
File "", line 88, in run_code
File "c:\users\USER.local\bin\zotify.exe_main.py", line 7, in
sys.exit(main())
~~~~^^
File "C:\Users\USER\pipx\venvs\zotify\Lib\site-packages\zotify_main.py", line 115, in main
args.func(args)
~~~~~~~~~^^^^^^
File "C:\Users\USER\pipx\venvs\zotify\Lib\site-packages\zotify\app.py", line 241, in client
Zotify(args)
~~~~~~^^^^^^
File "C:\Users\USER\pipx\venvs\zotify\Lib\site-packages\zotify\zotify.py", line 26, in init
Zotify.login(args)
~~~~~~~~~~~~^^^^^^
File "C:\Users\USER\pipx\venvs\zotify\Lib\site-packages\zotify\zotify.py", line 52, in login
cls.SESSION = Session.from_oauth(
~~~~~~~~~~~~~~~~~~^
oauth, cls.CONFIG.get_credentials_location(), cls.CONFIG.get_language()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "C:\Users\USER\pipx\venvs\zotify\Lib\site-packages\zotify_init_.py", line 137, in from_oauth
token = oauth.await_token()
File "C:\Users\USER\pipx\venvs\zotify\Lib\site-packages\zotify_init_.py", line 295, in await_token
self.__server_thread.join()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "C:\Users\USER\scoop\apps\python\current\Lib\threading.py", line 1094, in join
self._handle.join(timeout)
~~~~~~~~~~~~~~~~~^^^^^^^^^
KeyboardInterrupt
@Googolplexed0 commented on GitHub (Jul 25, 2025):
Not sure what is causing this error, the traceback makes it seem like an issue between the OAuth library and your specific setup. I don't think it's a problem with this tool in particular. If you can get more data or find a method for me to replicate it, I could be more helpful.
@Forest-Exe commented on GitHub (Jul 30, 2025):
Hi, I was having the same issue actually but I found a weird little work around I think it has to do with soemthing with the account username fuction all I did was type "zotify output" in the terminal and it made the credentials.json for me
@fafamobile commented on GitHub (Jul 30, 2025):
Alright, I will have a play around now and get back to you. Thank you!
@fafamobile commented on GitHub (Jul 30, 2025):
I am still getting the error. I type 'zotify output' into windows powershell and try login and it still generates the error. Any other suggestions?
@fafamobile commented on GitHub (Jul 30, 2025):
Is there any particular thing thats stopping the authentication from my set up?
@Googolplexed0 commented on GitHub (Aug 8, 2025):
Please try updating librespot (see #44) and Zotify to Release v0.9.11. Run with the
--debugflag in the command line and attach the resulting .log file here. This may give some extra insight into what is going wrong.@fafamobile commented on GitHub (Aug 8, 2025):
config_DEBUG.json
@Googolplexed0 commented on GitHub (Aug 8, 2025):
This is your config, which is useful, but the log will have a filename like:
zotify_DEBUG_{Zotify.DATETIME_LAUNCH}.logand should be found in your root path.@fafamobile commented on GitHub (Aug 8, 2025):
sorry, what do i need to run with --debug?
@Googolplexed0 commented on GitHub (Aug 8, 2025):
Add
--debugto your command line call.@fafamobile commented on GitHub (Aug 20, 2025):
there is a new error
Traceback (most recent call last):
File "", line 198, in run_module_as_main
File "", line 88, in run_code
File "c:\users\USER.local\bin\zotify.exe_main.py", line 7, in
sys.exit(main())
~~~~^^
File "C:\Users\USER\pipx\venvs\zotify\Lib\site-packages\zotify_main.py", line 119, in main
args.func(args)
~~~~~~~~~^^^^^^
File "C:\Users\USER\pipx\venvs\zotify\Lib\site-packages\zotify\app.py", line 226, in client
Zotify(args)
~~~~~~^^^^^^
File "C:\Users\USER\pipx\venvs\zotify\Lib\site-packages\zotify\config.py", line 577, in init
Zotify.login(args)
~~~~~~~~~~~~^^^^^^
File "C:\Users\USER\pipx\venvs\zotify\Lib\site-packages\zotify\config.py", line 611, in login
session_builder.login_credentials = OAuth(CLIENT_ID, redirect_url, oauth_print).flow()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "C:\Users\USER\pipx\venvs\zotify\Lib\site-packages\librespot\oauth.py", line 117, in flow
self.request_token()
~~~~~~~~~~~~~~~~~~^^
File "C:\Users\USER\pipx\venvs\zotify\Lib\site-packages\librespot\oauth.py", line 54, in request_token
raise RuntimeError("You need to provide a code before!")
RuntimeError: You need to provide a code b
and now I get a "site cannot be reached" error on chrome when I try log in after using OAuth link
@fafamobile commented on GitHub (Aug 20, 2025):
also found the debug location
zotify_DEBUG_2025-08-21_09-42-06.log
@Googolplexed0 commented on GitHub (Aug 22, 2025):
From what I can tell, this error means the server that is listening for auth credentials on your computer never hears anything (doesn't get info back from you clicking the link) and eventually times out. Makes sense if you see "Site cannot be reached" on your browser. Reaching the site is necessary to send auth info back to that server.
Try troubleshooting your browser, you may have something running that restricts you from accessing local sites. I am now a lot more certain the issue lies outside of this library's code.
@fafamobile commented on GitHub (Aug 22, 2025):
I am able to log in through spotify on my browser, before it redirects to the error after successfully logging in. I haven’t had a problem with “site cannot be reached” before. It has come back with “authentication successful” before the recent update. I will try troubleshooting my browser again but have tried removing firewall, etc. and did not work. Could it maybe do something with my IP?
@Googolplexed0 commented on GitHub (Aug 22, 2025):
IP is your external network, it wouldn't have any effect.
This was the error you were getting before the big update (you commented this on July 20th), your system was waiting for a response but not seeing anything.
This means that you reach the external site correctly, but the redirect is failing to reaching back to your local listening oauth server. No idea why this would be the case. Are you running this in Docker or some other containerized setup?
@fafamobile commented on GitHub (Aug 22, 2025):
Ah ok thank you, I can have a play around and can let you know if I find a solution. Sorry that this issue is not to do with your code. No not a Docker, it is just a normal PC - Windows 10, Chrome as browser, burner spotify account w/o premium.
@fafamobile commented on GitHub (Aug 22, 2025):
I managed to fix but unsure how I did it. Troubleshooted many things so it may have been a combination.
@fafamobile commented on GitHub (Aug 22, 2025):
Just quick question - is there a way I can change the default downloading location and audio output? I tried changing in the config.json but it just downloads as defaults.
also - when i download audio is kinda quiet in comparison to other songs I already had. is there a way that the audio volume can be downloaded at a higher level?
edit: would "ffmpeg_args": "-af volume=+3dB" make any difference in the config.json?
@Googolplexed0 commented on GitHub (Aug 23, 2025):
Editing the config.json should work. It's possible the config is being saved to an alternate default path if you aren't setting the
-ccmd arg with a path to the config.json file you are editing.Not currently, no. There isn't support for custom FFMPEG arguments, although you can hard-code something in yourself if you're comfortable modifying
track.py convert_audio_format() output_params. This may be a good feature addition! You can make a feature request issue if you'd like. If the OAuth issue has been solved, I will close this one.@fafamobile commented on GitHub (Aug 24, 2025):
Solved issue - was using an old config.json. just needed to delete the file and force reinstall. thanks for ur help :)