ioBroker.spotify-premium icon indicating copy to clipboard operation
ioBroker.spotify-premium copied to clipboard

playlist error 504 / Unhandled promise rejection

Open Zaetti opened this issue 2 years ago • 7 comments

Since Update 1.2.1 my spotify-premium adapter keeps restarting with the error shown in the loogfiles down below. On the same day i updated js and node. I already deleted the instance and re-added it - no success. I then tried to remove all special characters like äöü oder unerlines etc., re-added again with no success.

`host.raspberrypi 2022-09-04 09:49:52.526 error instance system.adapter.spotify-premium.0 terminated with code 6 (UNCAUGHT_EXCEPTION) host.raspberrypi 2022-09-04 09:49:52.526 error Caught by controller[1]: at processTicksAndRejections (node:internal/process/task_queues:96:5) host.raspberrypi 2022-09-04 09:49:52.526 error Caught by controller[1]: at /opt/iobroker/node_modules/iobroker.spotify-premium/main.js:925:52 host.raspberrypi 2022-09-04 09:49:52.526 error Caught by controller[1]: TypeError: Cannot read properties of undefined (reading 'trackIds') host.raspberrypi 2022-09-04 09:49:52.525 error Caught by controller[0]: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:

spotify-premium.0 2022-09-04 09:49:51.854 warn Terminated (UNCAUGHT_EXCEPTION): Without reason

spotify-premium.0 2022-09-04 09:49:51.852 info terminating

spotify-premium.0 2022-09-04 09:49:51.782 error Cannot read properties of undefined (reading 'trackIds')

spotify-premium.0 2022-09-04 09:49:51.781 error TypeError: Cannot read properties of undefined (reading 'trackIds') at /opt/iobroker/node_modules/iobroker.spotify-premium/main.js:925:52 at processTicksAndRejections (node:internal/process/task_queues:96:5)

spotify-premium.0 2022-09-04 09:49:51.780 error unhandled promise rejection: Cannot read properties of undefined (reading 'trackIds')

spotify-premium.0 2022-09-04 09:49:51.780 error Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().

spotify-premium.0 2022-09-04 09:49:51.777 warn error on load tracks(getPlaylistTracks): 504 owner: zät id: 4PXQ3juDvehA6KFeh71blF

spotify-premium.0 2022-09-04 09:49:51.777 warn Error: at /opt/iobroker/node_modules/iobroker.spotify-premium/main.js:360:38 at processTicksAndRejections (node:internal/process/task_queues:96:5)

spotify-premium.0 2022-09-04 09:49:51.776 warn Error: at sendRequest (/opt/iobroker/node_modules/iobroker.spotify-premium/main.js:248:21) at getPlaylistTracks (/opt/iobroker/node_modules/iobroker.spotify-premium/main.js:1047:12) at /opt/iobroker/node_modules/iobroker.spotify-premium/main.js:917:25

spotify-premium.0 2022-09-04 09:49:51.775 warn http request error not handled, please debug

spotify-premium.0 2022-09-04 09:49:49.978 error playlist error 504

spotify-premium.0 2022-09-04 09:49:49.977 warn Error: at /opt/iobroker/node_modules/iobroker.spotify-premium/main.js:360:38 at processTicksAndRejections (node:internal/process/task_queues:96:5)

spotify-premium.0 2022-09-04 09:49:49.976 warn Error: at sendRequest (/opt/iobroker/node_modules/iobroker.spotify-premium/main.js:248:21) at getUsersPlaylist (/opt/iobroker/node_modules/iobroker.spotify-premium/main.js:1004:16) at reloadUsersPlaylist (/opt/iobroker/node_modules/iobroker.spotify-premium/main.js:824:12) at /opt/iobroker/node_modules/iobroker.spotify-premium/main.js:196:21 at processTicksAndRejections (node:internal/process/task_queues:96:5)

spotify-premium.0 2022-09-04 09:49:49.974 warn http request error not handled, please debug`

Versions:

  • Adapter version: 1.2.1
  • JS-Controller version: 4.0.23
  • Node version: 16.15.1
  • Operating system: Debian

Additional context
I also tried to set the playlist refresh intervall to 0 without success. Is there any chance for me to debug the http request? Loglevel is on debug but there is not that much information.

A few days ago the adapter juzst threw the playlist error. Now it is crashing immediatly with unhandled promise exception.

Maybe i can send you my client id and secret if u want to test it out?

EDIT: I just tried the adapter version 1.2.1 on an old Windows-iobroker instance (js 2.1.1 / node v10.17.0) with exactly the same errors. `

       
spotify-premium.0 2022-09-04 10:06:21.532 warn (22316) error on load tracks(getPlaylistTracks): 504 owner: zät id: 4PXQ3juDvehA6KFeh71blF
spotify-premium.0 2022-09-04 10:06:21.532 warn (22316) Error at request.then.response (C:\Program Files\iobroker\iOBrokerZWindows\node_modules\iobroker.spotify-premium\main.js:360:38) at process._tickCallback (internal/process/next_tick.js
spotify-premium.0 2022-09-04 10:06:21.532 warn (22316) Error at sendRequest (C:\Program Files\iobroker\iOBrokerZWindows\node_modules\iobroker.spotify-premium\main.js:248:21) at getPlaylistTracks (C:\Program Files\iobroker\iOBrokerZWindows\
spotify-premium.0 2022-09-04 10:06:21.532 warn (22316) http request error not handled, please debug
`

Thank you Zaetti

Zaetti avatar Sep 04 '22 08:09 Zaetti

Any news on this one? :)

Zaetti avatar Oct 01 '22 13:10 Zaetti

same issue here

xmace avatar Oct 03 '22 14:10 xmace

same here

kekzmobile avatar Oct 06 '22 18:10 kekzmobile

sorry for asking again 🙈 any news ? :)

Zaetti avatar Oct 22 '22 07:10 Zaetti

I also have problems with restart loops after api errors:

2022-10-23 13:11:33.660 - warn: spotify-premium.0 (401130) unexpected api response http 503; continue polling
2022-10-23 13:11:33.727 - info: spotify-premium.0 (401130) State value to set for "spotify-premium.0.player.playlist.tracksTotal" has to be type "string" but received type "number"
2022-10-23 13:11:44.149 - info: spotify-premium.0 (401130) State value to set for "spotify-premium.0.player.playlist.tracksTotal" has to be type "string" but received type "number"
2022-10-23 13:12:31.801 - info: chromecast.0 (559825) NestHub - Playing - spotify:track:2XNaKS5wO5rPdgpPYVKria
2022-10-23 13:12:31.974 - warn: spotify-premium.0 (401130) State "spotify-premium.0.playlists.spotify-37i9dQZF1EQpj7X7UK8OOF.trackList" has no existing object, this might lead to an error in future versions
2022-10-23 13:16:24.635 - info: chromecast.0 (559825) NestHub - Playing - spotify:track:3ovjw5HZZv43SxTwApooCM
2022-10-23 13:16:24.959 - warn: spotify-premium.0 (401130) State "spotify-premium.0.playlists.spotify-37i9dQZF1EQpj7X7UK8OOF.trackList" has no existing object, this might lead to an error in future versions
2022-10-23 13:18:39.667 - error: spotify-premium.0 (401130) Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().
2022-10-23 13:18:39.668 - error: spotify-premium.0 (401130) unhandled promise rejection: undefined
2022-10-23 13:18:39.668 - error: spotify-premium.0 (401130) undefined
2022-10-23 13:18:39.675 - info: spotify-premium.0 (401130) terminating
2022-10-23 13:18:39.675 - warn: spotify-premium.0 (401130) Terminated (UNCAUGHT_EXCEPTION): Without reason
2022-10-23 13:18:39.836 - warn: spotify-premium.0 (401130) error on load tracks(getPlaylistTracks): 503 owner: spotify id: 37i9dQZF1DWX7rdRjOECPW
2022-10-23 13:18:40.227 - error: host.iobroker Caught by controller[1]: TypeError: Cannot read properties of undefined (reading 'stateString')
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[1]: at eval (eval at loadOrDefault (/opt/iobroker/node_modules/iobroker.spotify-premium/main.js:372:19), :3:12)
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[1]: at loadOrDefault (/opt/iobroker/node_modules/iobroker.spotify-premium/main.js:373:13)
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[1]: at /opt/iobroker/node_modules/iobroker.spotify-premium/main.js:937:32
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[1]: at runMicrotasks ()
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[1]: at processTicksAndRejections (node:internal/process/task_queues:96:5)
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[2]: TypeError: Cannot read properties of undefined (reading 'listNumber')
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[2]: at eval (eval at loadOrDefault (/opt/iobroker/node_modules/iobroker.spotify-premium/main.js:372:19), :3:12)
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[2]: at loadOrDefault (/opt/iobroker/node_modules/iobroker.spotify-premium/main.js:373:13)
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[2]: at createOrDefault (/opt/iobroker/node_modules/iobroker.spotify-premium/main.js:387:13)
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[2]: at /opt/iobroker/node_modules/iobroker.spotify-premium/main.js:958:21
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[2]: at runMicrotasks ()
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[2]: at processTicksAndRejections (node:internal/process/task_queues:96:5)
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[3]: TypeError: Cannot read properties of undefined (reading 'listString')
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[3]: at eval (eval at loadOrDefault (/opt/iobroker/node_modules/iobroker.spotify-premium/main.js:372:19), :3:12)
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[3]: at loadOrDefault (/opt/iobroker/node_modules/iobroker.spotify-premium/main.js:373:13)
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[3]: at createOrDefault (/opt/iobroker/node_modules/iobroker.spotify-premium/main.js:387:13)
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[3]: at /opt/iobroker/node_modules/iobroker.spotify-premium/main.js:961:21
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[3]: at runMicrotasks ()
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[3]: at processTicksAndRejections (node:internal/process/task_queues:96:5)
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[4]: TypeError: Cannot read properties of undefined (reading 'stateString')
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[4]: at eval (eval at loadOrDefault (/opt/iobroker/node_modules/iobroker.spotify-premium/main.js:372:19), :3:12)
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[4]: at loadOrDefault (/opt/iobroker/node_modules/iobroker.spotify-premium/main.js:373:13)
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[4]: at createOrDefault (/opt/iobroker/node_modules/iobroker.spotify-premium/main.js:387:13)
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[4]: at /opt/iobroker/node_modules/iobroker.spotify-premium/main.js:964:21
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[4]: at runMicrotasks ()
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[4]: at processTicksAndRejections (node:internal/process/task_queues:96:5)
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[5]: TypeError: Cannot read properties of undefined (reading 'trackIdMap')
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[5]: at eval (eval at loadOrDefault (/opt/iobroker/node_modules/iobroker.spotify-premium/main.js:372:19), :3:12)
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[5]: at loadOrDefault (/opt/iobroker/node_modules/iobroker.spotify-premium/main.js:373:13)
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[5]: at createOrDefault (/opt/iobroker/node_modules/iobroker.spotify-premium/main.js:387:13)
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[5]: at /opt/iobroker/node_modules/iobroker.spotify-premium/main.js:967:21
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[5]: at runMicrotasks ()
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[5]: at processTicksAndRejections (node:internal/process/task_queues:96:5)
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[6]: TypeError: Cannot read properties of undefined (reading 'trackIds')
2022-10-23 13:18:40.228 - error: host.iobroker Caught by controller[6]: at eval (eval at loadOrDefault (/opt/iobroker/node_modules/iobroker.spotify-premium/main.js:372:19), :3:12)
2022-10-23 13:18:40.229 - error: host.iobroker Caught by controller[6]: at loadOrDefault (/opt/iobroker/node_modules/iobroker.spotify-premium/main.js:373:13)
2022-10-23 13:18:40.229 - error: host.iobroker Caught by controller[6]: at createOrDefault (/opt/iobroker/node_modules/iobroker.spotify-premium/main.js:387:13)
2022-10-23 13:18:40.229 - error: host.iobroker Caught by controller[6]: at /opt/iobroker/node_modules/iobroker.spotify-premium/main.js:970:21
2022-10-23 13:18:40.229 - error: host.iobroker Caught by controller[6]: at runMicrotasks ()
2022-10-23 13:18:40.229 - error: host.iobroker Caught by controller[6]: at processTicksAndRejections (node:internal/process/task_queues:96:5)
2022-10-23 13:18:40.229 - error: host.iobroker Caught by controller[7]: TypeError: Cannot read properties of undefined (reading 'songs')
2022-10-23 13:18:40.229 - error: host.iobroker Caught by controller[7]: at eval (eval at loadOrDefault (/opt/iobroker/node_modules/iobroker.spotify-premium/main.js:372:19), :3:12)
2022-10-23 13:18:40.229 - error: host.iobroker Caught by controller[7]: at loadOrDefault (/opt/iobroker/node_modules/iobroker.spotify-premium/main.js:373:13)
2022-10-23 13:18:40.229 - error: host.iobroker Caught by controller[7]: at createOrDefault (/opt/iobroker/node_modules/iobroker.spotify-premium/main.js:387:13)
2022-10-23 13:18:40.229 - error: host.iobroker Caught by controller[7]: at /opt/iobroker/node_modules/iobroker.spotify-premium/main.js:973:21
2022-10-23 13:18:40.229 - error: host.iobroker Caught by controller[7]: at runMicrotasks ()
2022-10-23 13:18:40.229 - error: host.iobroker Caught by controller[7]: at processTicksAndRejections (node:internal/process/task_queues:96:5)
2022-10-23 13:18:40.229 - error: host.iobroker instance system.adapter.spotify-premium.0 terminated with code 6 (UNCAUGHT_EXCEPTION)
2022-10-23 13:18:40.229 - info: host.iobroker Restart adapter system.adapter.spotify-premium.0 because enabled```

petterpet avatar Oct 23 '22 11:10 petterpet

same issue here

Martin-int01 avatar Nov 23 '22 14:11 Martin-int01

Reproducable for me by playing playlist "Christmas Hits" (The biggest Christmas songs of all time) (and... yeah I know... :D ).

`

spotify-premium.0 2022-12-04 18:02:04.818 warn Terminated (UNCAUGHT_EXCEPTION): Without reason
spotify-premium.0 2022-12-04 18:02:04.817 info terminating
spotify-premium.0 2022-12-04 18:02:04.722 error undefined
spotify-premium.0 2022-12-04 18:02:04.722 error unhandled promise rejection: undefined
spotify-premium.0 2022-12-04 18:02:04.721 error Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().
spotify-premium.0 2022-12-04 18:02:03.530 info starting. Version 1.2.2 in /opt/iobroker/node_modules/iobroker.spotify-premium, node: v16.17.0, js-controller: 4.0.23
spotify-premium.0 2022-12-04 18:02:00.458 warn Terminated (UNCAUGHT_EXCEPTION): Without reason
spotify-premium.0 2022-12-04 18:02:00.457 info terminating
spotify-premium.0 2022-12-04 18:02:00.368 error undefined
spotify-premium.0 2022-12-04 18:02:00.368 error unhandled promise rejection: undefined
spotify-premium.0 2022-12-04 18:02:00.368 error Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().
`

Sadly, the adapter is not very communicative in terms of debugging.. :)

cavernerg avatar Dec 04 '22 17:12 cavernerg

Anybody found a temporary solution for this till now? `

spotify-premium.0 2023-01-22 09:37:37.086 error playlist error 504
spotify-premium.0 2023-01-22 09:37:37.086 warn Error: at /opt/iobroker/node_modules/iobroker.spotify-premium/main.js:360:38 at runMicrotasks () at processTicksAndRejections (node:internal/process/task_queues:96:5)
spotify-premium.0 2023-01-22 09:37:37.085 warn Error: at sendRequest (/opt/iobroker/node_modules/iobroker.spotify-premium/main.js:248:21) at getUsersPlaylist (/opt/iobroker/node_modules/iobroker.spotify-premium/main.js:1004:16) at reloadUsersPlaylist (/opt/iobroker/node_modules/iobroker.spotify-premium/main.js:824:12) at Timeout.pollPlaylistApi [as _onTimeout] (/opt/iobroker/node_modules/iobroker.spotify-premium/main.js:1650:5) at listOnTimeout (node:internal/timers:559:17) at processTimers (node:internal/timers:502:7)
spotify-premium.0 2023-01-22 09:37:37.085 warn http request error not handled, please debug
`

Zaetti avatar Jan 22 '23 08:01 Zaetti

Any news on this one? Adapter became unusable 😔

Zaetti avatar Apr 07 '23 08:04 Zaetti

I changed to calling the official Spotify app. Adapter crashes way to often

cavernerg avatar Apr 07 '23 09:04 cavernerg

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days. Please check if the issue is still relevant in the most current version of the adapter and tell us. Also check that all relevant details, logs and reproduction steps are included and update them if needed. Thank you for your contributions. Dieses Problem wurde automatisch als veraltet markiert, da es in letzter Zeit keine Aktivitäten gab. Es wird geschlossen, wenn nicht innerhalb der nächsten 7 Tage weitere Aktivitäten stattfinden. Bitte überprüft, ob das Problem auch in der aktuellsten Version des Adapters noch relevant ist, und teilt uns dies mit. Überprüft auch, ob alle relevanten Details, Logs und Reproduktionsschritte enthalten sind bzw. aktualisiert diese. Vielen Dank für Eure Unterstützung.

stale[bot] avatar Aug 10 '23 05:08 stale[bot]

Moin ! Ist dieses Problem noch aktuell ? Ich würde mich gerne darum kümmern, aber ich kann es aktuell nicht nachvollziehen.

aruttkamp avatar Sep 11 '23 21:09 aruttkamp

Guten Morgen,

Ich habe wegen des Fehlers den Adapter deaktiviert und springe in der vis in die Spotify App ab. Ich könnte in 3 Wochen nach dem Urlaub nochmal schauen, ob das Problem noch besteht

cavernerg avatar Sep 12 '23 05:09 cavernerg

Guten Morgen,

Ich habe wegen des Fehlers den Adapter deaktiviert und springe in der vis in die Spotify App ab. Ich könnte in 3 Wochen nach dem Urlaub nochmal schauen, ob das Problem noch besteht

Vielen Dank für Dein Feedback. Dann gehe ich davon aus , dass das Problem noch besteht. Ich versuche mal das nachzuvollziehen ( und zu beheben ) .

aruttkamp avatar Sep 12 '23 05:09 aruttkamp

Ich kann dies nicht nachvollziehen. Wie genau kann ich es reproduzieren ?

aruttkamp avatar Oct 31 '23 17:10 aruttkamp

Ich habe den Adapter Mal reaktiviert. Früher wurde es in Zusammenhang mit nicht mehr existierenden Playlisten und Songs gebracht in der Bibliothek, zu denen dann keine Infos mehr abgerufen werden konnten.

cavernerg avatar Oct 31 '23 20:10 cavernerg

Ich gehe nun davon aus , dass dieses Problem nicht mehr existiert und schliesse diesen Issue !

aruttkamp avatar Nov 30 '23 22:11 aruttkamp