spotify-downloader icon indicating copy to clipboard operation
spotify-downloader copied to clipboard

Web UI searches not loading

Open Silverarmor opened this issue 2 years ago • 1 comments

System OS

Windows

Python Version

3.10 (CPython)

Install Source

pip / PyPi

Install version / commit hash

v4 rc2

Expected Behavior vs Actual Behavior

Web UI.

so i search up a song and it works fine. and then i search up for another song (different names) the page shows the first song results

Steps to reproduce - Ensure to include actual links!

After downloading song, search for second song which will not load sometimes.

On page reload, only json returned {"detail":"Not Found"}

Traceback

Updating web app
INFO:     Started server process [12240]
17:11:25 - INFO - Started server process [12240]
INFO:     Waiting for application startup.
17:11:25 - INFO - Waiting for application startup.
INFO:     Application startup complete.
17:11:25 - INFO - Application startup complete.
INFO:     Uvicorn running on http://127.0.0.1:8800 (Press CTRL+C to quit)
17:11:25 - INFO - Uvicorn running on http://127.0.0.1:8800 (Press CTRL+C to quit)
INFO:     127.0.0.1:5829 - "GET / HTTP/1.1" 200 OK
INFO:     127.0.0.1:5829 - "GET /assets/index.fe127150.js HTTP/1.1" 200 OK
INFO:     127.0.0.1:5829 - "GET /assets/index.d96dcc94.css HTTP/1.1" 200 OK
INFO:     127.0.0.1:5829 - "GET /assets/vendor.7698a149.js HTTP/1.1" 200 OK
INFO:     127.0.0.1:5829 - "GET /api/settings HTTP/1.1" 200 OK
INFO:     127.0.0.1:5829 - "GET /assets/spotdl.5dcb64c0.svg HTTP/1.1" 200 OK
INFO:     ('127.0.0.1', 5836) - "WebSocket /api/ws" [accepted]
17:11:26 - INFO - ('127.0.0.1', 5836) - "WebSocket /api/ws" [accepted]
INFO:     connection open
17:11:26 - INFO - connection open
INFO:     127.0.0.1:5829 - "GET /favicon.ico HTTP/1.1" 200 OK
INFO:     127.0.0.1:5847 - "GET /api/songs/search?query=survival+tactics HTTP/1.1" 200 OK
INFO:     127.0.0.1:5847 - "POST /api/download/url?url=https:%2F%2Fopen.spotify.com%2Ftrack%2F4pNT8XTKWb2vhcsqwzdXCT&client_id=1779a702-6f1b-4056-b995-2e8e962a176d HTTP/1.1" 200 OK
INFO:     127.0.0.1:5870 - "GET /api/songs/search?query=flashing+lights HTTP/1.1" 200 OK
INFO:     127.0.0.1:5874 - "GET /search/flashing%20lights HTTP/1.1" 404 Not Found
INFO:     connection closed
17:13:25 - INFO - connection closed
INFO:     127.0.0.1:5874 - "GET /favicon.ico HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:5875 - "GET / HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:5875 - "GET /assets/index.fe127150.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:5875 - "GET /assets/index.d96dcc94.css HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:5875 - "GET /assets/vendor.7698a149.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:5875 - "GET /api/settings HTTP/1.1" 200 OK
INFO:     127.0.0.1:5875 - "GET /assets/spotdl.5dcb64c0.svg HTTP/1.1" 304 Not Modified
INFO:     ('127.0.0.1', 5882) - "WebSocket /api/ws" [accepted]
17:13:33 - INFO - ('127.0.0.1', 5882) - "WebSocket /api/ws" [accepted]
INFO:     connection open
17:13:33 - INFO - connection open
INFO:     127.0.0.1:5886 - "GET /api/songs/search?query=survival+tactics HTTP/1.1" 200 OK
INFO:     127.0.0.1:5886 - "POST /api/download/url?url=https:%2F%2Fopen.spotify.com%2Ftrack%2F4pNT8XTKWb2vhcsqwzdXCT&client_id=7f1a4190-8d20-44af-ba08-cb284b67e14c HTTP/1.1" 200 OK
INFO:     127.0.0.1:5898 - "GET /api/songs/search?query=flashing+lights HTTP/1.1" 200 OK
INFO:     127.0.0.1:5902 - "GET /api/download/file?file=Joey%20Bada$$,%20Capital%20Steez%20-%20Survival%20Tactics.mp3&client_id=7f1a4190-8d20-44af-ba08-cb284b67e14c HTTP/1.1" 200 OK
INFO:     127.0.0.1:5902 - "GET /api/songs/search?query=flashing+lights HTTP/1.1" 200 OK
INFO:     127.0.0.1:5906 - "GET /api/songs/search?query=flashing+lights HTTP/1.1" 200 OK
INFO:     127.0.0.1:5914 - "GET /api/songs/search?query=Kanye HTTP/1.1" 200 OK
INFO:     127.0.0.1:6059 - "GET /search/Kanye HTTP/1.1" 404 Not Found
INFO:     connection closed
17:28:27 - INFO - connection closed
INFO:     127.0.0.1:6059 - "GET /favicon.ico HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:6086 - "GET / HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:6086 - "GET /assets/index.fe127150.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:6086 - "GET /assets/index.d96dcc94.css HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:6086 - "GET /assets/vendor.7698a149.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:6086 - "GET /api/settings HTTP/1.1" 200 OK
INFO:     127.0.0.1:6086 - "GET /assets/spotdl.5dcb64c0.svg HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:6086 - "GET /favicon.ico HTTP/1.1" 304 Not Modified
INFO:     ('127.0.0.1', 6093) - "WebSocket /api/ws" [accepted]
17:30:53 - INFO - ('127.0.0.1', 6093) - "WebSocket /api/ws" [accepted]
INFO:     connection open
17:30:53 - INFO - connection open
INFO:     127.0.0.1:6090 - "GET /api/songs/search?query=Kanye HTTP/1.1" 200 OK

Other details

User reported on Discord https://discord.com/channels/771628785447337985/1007941869252116580

Silverarmor avatar Aug 13 '22 09:08 Silverarmor

can confirm. trying v4.rc3 on a mac and the same happens. I will have to stop the process and rerun spotdl web

jonathan-chin avatar Sep 12 '22 15:09 jonathan-chin

Looks like the issue is that, when entering the index page directly through the / path, as is done after executing spotdl web, the Vue app is initialized, and any subsequent navigation in the web UI is handled by Vue itself. When reloading the page, the navigation is not handled by Vue, routing the request to the FastAPI backend instead, which leads to the 404 error. I'm not quite sure what the solution would be, though :/

neolight1010 avatar Oct 02 '22 23:10 neolight1010

looks fixed on v4.0.1

xnetcat avatar Oct 30 '22 12:10 xnetcat