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

WebUI stopped working, Networking error? #2035

Open
FaNt4zMa opened this issue Mar 2, 2024 · 3 comments
Open

WebUI stopped working, Networking error? #2035

FaNt4zMa opened this issue Mar 2, 2024 · 3 comments
Labels
Bug Unexpected problem or unintended behavior that needs to be fixed

Comments

@FaNt4zMa
Copy link

FaNt4zMa commented Mar 2, 2024

System OS

Windows

Python Version

3.11 (CPython)

Install Source

pip / PyPi

Install version / commit hash

4.2.4

Expected Behavior vs Actual Behavior

Expected Behavior: Fetches the song and downloads it.

Actual Behavior: Doesn't fetch the song, unable to download.

Steps to reproduce - Ensure to include actual links!

  1. Launch WebUI (I use this specific command as I run SpotDL as a service: spotdl web --config --keep-alive --web-use-output-dir
  2. Paste a spotify song link and press enter

Traceback

C:\Users\Fantaz\Desktop>spotdl web
Updating web app

Files are stored in temporary directory and will be deleted after the program exits to save them to current directory
permanently enable the `web_use_output_dir` option
Starting web server

INFO:     Started server process [9452]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://192.168.2.55:8098 (Press CTRL+C to quit)
INFO:     192.168.2.55:50072 - "GET / HTTP/1.1" 200 OK
INFO:     192.168.2.55:50548 - "GET /search/https%3A//open.spotify.com/track/0OIed6UFpfT2nW4BffD7Js%3Fsi%3D60f0f18a5ad64757 HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 408, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\uvicorn\middleware\proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\fastapi\applications.py", line 292, in __call__
    await super().__call__(scope, receive, send)
  File "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\starlette\applications.py", line 122, in __call__
    await self.middleware_stack(scope, receive, send)
  File "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\starlette\middleware\errors.py", line 184, in __call__
    raise exc
  File "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\starlette\middleware\errors.py", line 162, in __call__
    await self.app(scope, receive, _send)
  File "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\starlette\middleware\cors.py", line 83, in __call__
    await self.app(scope, receive, send)
  File "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\starlette\middleware\exceptions.py", line 79, in __call__
    raise exc
  File "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\starlette\middleware\exceptions.py", line 68, in __call__
    await self.app(scope, receive, sender)
  File "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\fastapi\middleware\asyncexitstack.py", line 20, in __call__
    raise e
  File "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\fastapi\middleware\asyncexitstack.py", line 17, in __call__
    await self.app(scope, receive, send)
  File "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\starlette\routing.py", line 718, in __call__
    await route.handle(scope, receive, send)
  File "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\starlette\routing.py", line 443, in handle
    await self.app(scope, receive, send)
  File "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\starlette\staticfiles.py", line 103, in __call__
    response = await self.get_response(path, scope)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\spotdl\utils\web.py", line 96, in get_response
    response = await super().get_response(path, scope)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\starlette\staticfiles.py", line 121, in get_response
    full_path, stat_result = await anyio.to_thread.run_sync(
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\anyio\to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\anyio\_backends\_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\starlette\staticfiles.py", line 177, in lookup_path
    return full_path, os.stat(full_path)
                      ^^^^^^^^^^^^^^^^^^
OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: 'C:\\Users\\Fantaz\\.spotdl\\dist\\search\\https:\\open.spotify.com\\track\\0OIed6UFpfT2nW4BffD7Js?si=60f0f18a5ad64757'
INFO:     Shutting down
INFO:     Waiting for application shutdown.
INFO:     Removing sessions directories
INFO:     Application shutdown complete.
INFO:     Finished server process [9452]

C:\Users\Fantaz\Desktop>

Other details

I've had this setup working for about a year now, never had issues.. I dont know what could have changed on my system for it to stop working... I've allowed spotdl.exe in my firewall a long time ago and doing it again didnt fix it. Should I do Uvicorn instead/also? Using the .exe for the WebUI (version 4.2.0) was able to fetch song and download it. Could it be that the client ID/secret of my config need to be changed/updated? Thanks for any help!
image
image

@FaNt4zMa FaNt4zMa added the Bug Unexpected problem or unintended behavior that needs to be fixed label Mar 2, 2024
@pinkgoatlol
Copy link

pinkgoatlol commented Mar 10, 2024

Hello, i just installed and got the same error, is there a solution?
image

i also got this error when i was changing some setting on casaos

image

@cumal
Copy link

cumal commented Mar 30, 2024

Hi, I noticed the same error. I found in the "inspect/developer mode" that some calls were going to port 8800, instead of 8877. I am using the docker image, so instead of publishing the port 8877 to 8877, I published the port 8800 to 8877 and started working again.

Edit:
When I run the docker image, I use the port 8877 "--port 8877".

fabfabretti added a commit to fabfabretti/CasaOS-Coolstore that referenced this issue Apr 10, 2024
This should solve issue WisdomSky#60. As noted by issue spotDL/spotify-downloader#2035 of the original project, at the moment there seems sto be an issue with the port used by the container, as it (wrongly) connects to port 8800 regardless of the port specified when looking for songs. A user suggested (and I personally verified that it works on my installation) changing the port to 8800, and it does indeed fix the issue.
@FaNt4zMa
Copy link
Author

So I just updated and made a new config.. @cumal is definitly onto something because when using the default port 8800, I'm able to fetch and download songs from the WebUI, changing the port to anything else breaks it.. I don't know why that is the case, I've had it working on port 8098 for a very long time. Also, am I dumb or is there a way to run the WebUI in a docker container? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Unexpected problem or unintended behavior that needs to be fixed
Projects
None yet
Development

No branches or pull requests

3 participants