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

Web UI stops working after 1-6 songs

Open sussum2432 opened this issue 2 years ago • 5 comments

System OS

Windows

Python Version

3.10 (CPython)

Install Source

pip / PyPi

Install version / commit hash

3.9.6

Expected Behavior vs Actual Behavior

it stops working after 4-6 songs and it doesnt work again until restarted program image image

Steps to reproduce - Ensure to include actual links!

1.open spotdl 2.download some songs of spotify 3.after 4-6 it dont working

Traceback

Updating web app
INFO:     Started server process [11008]
14:41:20 - INFO - Started server process [11008]
INFO:     Waiting for application startup.
14:41:20 - INFO - Waiting for application startup.
INFO:     Application startup complete.
14:41:20 - INFO - Application startup complete.
INFO:     Uvicorn running on http://127.0.0.1:8800 (Press CTRL+C to quit)
14:41:20 - INFO - Uvicorn running on http://127.0.0.1:8800 (Press CTRL+C to quit)
INFO:     127.0.0.1:62534 - "GET / HTTP/1.1" 200 OK
INFO:     127.0.0.1:62534 - "GET /assets/index.fe127150.js HTTP/1.1" 200 OK
INFO:     127.0.0.1:62534 - "GET /assets/index.d96dcc94.css HTTP/1.1" 200 OK
INFO:     127.0.0.1:62534 - "GET /assets/vendor.7698a149.js HTTP/1.1" 200 OK
INFO:     127.0.0.1:62534 - "GET /api/settings HTTP/1.1" 200 OK
INFO:     127.0.0.1:62534 - "GET /assets/spotdl.5dcb64c0.svg HTTP/1.1" 200 OK
INFO:     127.0.0.1:62534 - "GET /favicon.ico HTTP/1.1" 200 OK
INFO:     ('127.0.0.1', 62539) - "WebSocket /api/ws" [accepted]
14:41:22 - INFO - ('127.0.0.1', 62539) - "WebSocket /api/ws" [accepted]
INFO:     connection open
14:41:22 - INFO - connection open
INFO:     127.0.0.1:62536 - "GET /api/song/url?url=https:%2F%2Fopen.spotify.com%2Ftrack%2F6RbC38oDCIXD8V2AOU1Tjr%3Fsi%3D189bedac9fed4299 HTTP/1.1" 200 OK
INFO:     127.0.0.1:62537 - "GET /api/song/url?url=https:%2F%2Fopen.spotify.com%2Ftrack%2F22GbAGb80ZZNgm2yrBMnpR%3Fsi%3D99cead2d247c4f98 HTTP/1.1" 200 OK
INFO:     127.0.0.1:62560 - "GET /api/song/url?url=https:%2F%2Fopen.spotify.com%2Ftrack%2F0QV3swr7L8MZr72lL2izV1%3Fsi%3De27a56e0642749ad HTTP/1.1" 200 OK
INFO:     127.0.0.1:62573 - "GET /api/song/url?url=https:%2F%2Fopen.spotify.com%2Ftrack%2F38fIaph07Kd8ZIN6l17ZJs%3Fsi%3D991fc82bcb164067 HTTP/1.1" 200 OK
INFO:     127.0.0.1:62581 - "GET /api/song/url?url=https:%2F%2Fopen.spotify.com%2Ftrack%2F5JAnXx5BBES4FEf4d4t4CC%3Fsi%3D7775855a53e34221 HTTP/1.1" 200 OK
INFO:     127.0.0.1:62581 - "POST /api/download/url?url=https:%2F%2Fopen.spotify.com%2Ftrack%2F5JAnXx5BBES4FEf4d4t4CC&client_id=8f903001-0da0-4124-ac2f-cab95afd8996 HTTP/1.1" 500 Internal Server Error
INFO:     127.0.0.1:62536 - "POST /api/download/url?url=https:%2F%2Fopen.spotify.com%2Ftrack%2F6RbC38oDCIXD8V2AOU1Tjr&client_id=8f903001-0da0-4124-ac2f-cab95afd8996 HTTP/1.1" 200 OK
INFO:     127.0.0.1:62537 - "POST /api/download/url?url=https:%2F%2Fopen.spotify.com%2Ftrack%2F22GbAGb80ZZNgm2yrBMnpR&client_id=8f903001-0da0-4124-ac2f-cab95afd8996 HTTP/1.1" 200 OK
INFO:     127.0.0.1:62573 - "POST /api/download/url?url=https:%2F%2Fopen.spotify.com%2Ftrack%2F38fIaph07Kd8ZIN6l17ZJs&client_id=8f903001-0da0-4124-ac2f-cab95afd8996 HTTP/1.1" 200 OK
INFO:     127.0.0.1:62560 - "POST /api/download/url?url=https:%2F%2Fopen.spotify.com%2Ftrack%2F0QV3swr7L8MZr72lL2izV1&client_id=8f903001-0da0-4124-ac2f-cab95afd8996 HTTP/1.1" 200 OK
INFO:     127.0.0.1:62604 - "GET /api/song/url?url=https:%2F%2Fopen.spotify.com%2Ftrack%2F5JAnXx5BBES4FEf4d4t4CC%3Fsi%3D7775855a53e34221 HTTP/1.1" 200 OK
INFO:     127.0.0.1:62604 - "POST /api/download/url?url=https:%2F%2Fopen.spotify.com%2Ftrack%2F5JAnXx5BBES4FEf4d4t4CC&client_id=8f903001-0da0-4124-ac2f-cab95afd8996 HTTP/1.1" 500 Internal Server Error
INFO:     127.0.0.1:62605 - "GET /api/download/file?file=Metallica,%20Marianne%20Faithfull%20-%20The%20Memory%20Remains.mp3&client_id=8f903001-0da0-4124-ac2f-cab95afd8996 HTTP/1.1" 200 OK
INFO:     127.0.0.1:62605 - "GET /api/download/file?file=Metallica,%20Marianne%20Faithfull%20-%20The%20Memory%20Remains.mp3&client_id=8f903001-0da0-4124-ac2f-cab95afd8996 HTTP/1.1" 200 OK
INFO:     127.0.0.1:62609 - "GET /api/download/file?file=Metallica,%20Marianne%20Faithfull%20-%20The%20Memory%20Remains.mp3&client_id=8f903001-0da0-4124-ac2f-cab95afd8996 HTTP/1.1" 200 OK
INFO:     127.0.0.1:62610 - "GET /api/download/file?file=Metallica%20-%20Wherever%20I%20May%20Roam.mp3&client_id=8f903001-0da0-4124-ac2f-cab95afd8996 HTTP/1.1" 200 OK
INFO:     127.0.0.1:62610 - "GET /api/download/file?file=Metallica%20-%20Wherever%20I%20May%20Roam.mp3&client_id=8f903001-0da0-4124-ac2f-cab95afd8996 HTTP/1.1" 200 OK
INFO:     127.0.0.1:62614 - "GET /api/download/file?file=Metallica%20-%20Wherever%20I%20May%20Roam.mp3&client_id=8f903001-0da0-4124-ac2f-cab95afd8996 HTTP/1.1" 200 OK
INFO:     127.0.0.1:62618 - "GET /api/download/file?file=Metallica%20-%20Hardwired.mp3&client_id=8f903001-0da0-4124-ac2f-cab95afd8996 HTTP/1.1" 200 OK
INFO:     127.0.0.1:62618 - "GET /api/download/file?file=Metallica%20-%20Hardwired.mp3&client_id=8f903001-0da0-4124-ac2f-cab95afd8996 HTTP/1.1" 200 OK
INFO:     127.0.0.1:62622 - "GET /api/download/file?file=Metallica%20-%20Whiplash%20-%20Remastered.mp3&client_id=8f903001-0da0-4124-ac2f-cab95afd8996 HTTP/1.1" 200 OK
INFO:     127.0.0.1:62623 - "GET /api/download/file?file=Metallica%20-%20Whiplash%20-%20Remastered.mp3&client_id=8f903001-0da0-4124-ac2f-cab95afd8996 HTTP/1.1" 200 OK
INFO:     127.0.0.1:62637 - "GET /api/song/url?url=https:%2F%2Fopen.spotify.com%2Ftrack%2F5JAnXx5BBES4FEf4d4t4CC%3Fsi%3D7775855a53e34221 HTTP/1.1" 200 OK
INFO:     127.0.0.1:62637 - "POST /api/download/url?url=https:%2F%2Fopen.spotify.com%2Ftrack%2F5JAnXx5BBES4FEf4d4t4CC&client_id=8f903001-0da0-4124-ac2f-cab95afd8996 HTTP/1.1" 500 Internal Server Error

Other details

No response

sussum2432 avatar Jul 08 '22 12:07 sussum2432

@xnetcat @phcreery When you can, please look into this

Silverarmor avatar Jul 28 '22 11:07 Silverarmor

mmmm, i believe its about ram of device and trash is not taken care of, code didn't specify limit

Oluwapelumide avatar Aug 14 '22 18:08 Oluwapelumide

mmmm, i believe its about ram of device and trash is not taken care of, code didn't specify limit

Nope I think it's a bug in the web API. Python doesn't use that much memory and all ffmpeg processes are immediately closed after finishing. Temporary files are also removed from the disk even when the download fails.

xnetcat avatar Aug 14 '22 20:08 xnetcat

This issue has been automatically marked stale because there hasn't been any activity for the last 30 days.

stale[bot] avatar Sep 17 '22 01:09 stale[bot]

14:05:30 - ERROR - Exception in callback _ProactorBaseWritePipeTransport._loop_writing(<_OverlappedF...hed result=28>)
handle: <Handle _ProactorBaseWritePipeTransport._loop_writing(<_OverlappedF...hed result=28>)>
Traceback (most recent call last):
  File "C:\Users\jakub\AppData\Local\Programs\Python\Python310\lib\asyncio\events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "C:\Users\jakub\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 377, in _loop_writing
    assert f is self._write_fut
AssertionError

@phcreery I've found this error while trying to download some songs using web ui. I can't find the source of this error tho (can't repro with --log-level DEBUG).

xnetcat avatar Sep 18 '22 12:09 xnetcat

This issue has been automatically marked stale because there hasn't been any activity for the last 30 days.

stale[bot] avatar Oct 18 '22 21:10 stale[bot]

Thanks

yssf00 avatar Oct 29 '22 07:10 yssf00

fixed on dev branch

xnetcat avatar Oct 30 '22 20:10 xnetcat