Problème Spotify - WebapiError

Bonjour

J’ai un problème ces jours-ci, je n’arrive pas à récupérer les informations spotify de mon compte. Ce qui est amusant, c’est que parfois, il parvient à capturer l’information, mais seulement pendant un certain temps.

J’ai essayé de mettre à jour le jeton, de changer le jeton, de supprimer le plugin… Je n’arrive pas à trouver autre chose à faire.

J’ai même restauré une copie de l’ensemble de la machine virtuelle que j’avais il y a un mois et elle ne fonctionne plus correctement. C’est comme s’il y avait eu une sorte de changement…

Merci beaucoup !

(node:17002) UnhandledPromiseRejectionWarning: 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1905)
[2021:09:18 02:03:55][DEBUG][spotifyLoop         ] ========================================== LOOP ================================================================
[2021:09:18 02:03:55][DEBUG][spotifyLoop         ] CURRENT TIME (0)= 1631959435
[2021:09:18 02:03:55][DEBUG][spotifyLoop         ] EXPIRE TIME (0)= 1631962350
[2021:09:18 02:03:55][DEBUG][spotifyLoop         ] COUNTER[0] = 21
[2021:09:18 02:03:55][DEBUG][spotifyLoop         ] STATUS POLLING ACCOUNT (0)
[2021:09:18 02:03:55][DEBUG][statusPollingRequest] BEGIN
[2021:09:18 02:03:55][INFO-][statusPollingRequest] >> getMyCurrentPlaybackState()
[2021:09:18 02:03:55][DEBUG][statusPollingRequest] END
[2021:09:18 02:03:55][DEBUG][spotifyLoop         ] DEVICE POLLING ACCOUNT (0)
[2021:09:18 02:03:55][DEBUG][devicePollingRequest] BEGIN
[2021:09:18 02:03:55][INFO-][devicePollingRequest] >> getUserPlaylists()
[2021:09:18 02:03:55][DEBUG][devicePollingRequest] END
(node:17002) UnhandledPromiseRejectionWarning: WebapiError: [object Object]
at _toError (/var/www/html/plugins/spotify/ressources/node_modules/spotify-web-api-node/src/http-manager.js:47:10)
at /var/www/html/plugins/spotify/ressources/node_modules/spotify-web-api-node/src/http-manager.js:71:25
at Request.callback (/var/www/html/plugins/spotify/ressources/node_modules/spotify-web-api-node/node_modules/superagent/lib/node/index.js:905:3)
at IncomingMessage.<anonymous> (/var/www/html/plugins/spotify/ressources/node_modules/spotify-web-api-node/node_modules/superagent/lib/node/index.js:1127:20)
at Stream.emit (events.js:314:20)
at Unzip.<anonymous> (/var/www/html/plugins/spotify/ressources/node_modules/spotify-web-api-node/node_modules/superagent/lib/node/unzip.js:53:12)
at Unzip.emit (events.js:326:22)
at endReadableNT (_stream_readable.js:1241:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:17002) UnhandledPromiseRejectionWarning: 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1906)
(node:17002) UnhandledPromiseRejectionWarning: WebapiError: [object Object]
at _toError (/var/www/html/plugins/spotify/ressources/node_modules/spotify-web-api-node/src/http-manager.js:47:10)
at /var/www/html/plugins/spotify/ressources/node_modules/spotify-web-api-node/src/http-manager.js:71:25
at Request.callback (/var/www/html/plugins/spotify/ressources/node_modules/spotify-web-api-node/node_modules/superagent/lib/node/index.js:905:3)
at IncomingMessage.<anonymous> (/var/www/html/plugins/spotify/ressources/node_modules/spotify-web-api-node/node_modules/superagent/lib/node/index.js:1127:20)
at Stream.emit (events.js:314:20)
at Unzip.<anonymous> (/var/www/html/plugins/spotify/ressources/node_modules/spotify-web-api-node/node_modules/superagent/lib/node/unzip.js:53:12)
at Unzip.emit (events.js:326:22)
at endReadableNT (_stream_readable.js:1241:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:17002) UnhandledPromiseRejectionWarning: 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1907)
Début d'nstallation des dependances
npm WARN saveError ENOENT: no such file or directory, open '/var/www/html/plugins/spotify/ressources/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/var/www/html/plugins/spotify/ressources/package.json'
npm WARN ressources No description
npm WARN ressources No repository field.
npm WARN ressources No README data
npm WARN ressources No license field.
+ spotify-web-api-node@5.0.2
updated 1 package and audited 57 packages in 1.794s
5 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
npm WARN saveError ENOENT: no such file or directory, open '/var/www/html/plugins/spotify/ressources/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/var/www/html/plugins/spotify/ressources/package.json'
npm WARN ressources No description
npm WARN ressources No repository field.
npm WARN ressources No README data
npm WARN ressources No license field.
+ https@1.0.0
updated 1 package and audited 57 packages in 1.349s
7 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
npm WARN saveError ENOENT: no such file or directory, open '/var/www/html/plugins/spotify/ressources/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/var/www/html/plugins/spotify/ressources/package.json'
npm WARN ressources No description
npm WARN ressources No repository field.
npm WARN ressources No README data
npm WARN ressources No license field.
+ dateformat@4.5.1
updated 1 package and audited 57 packages in 1.539s
7 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
Fin d'nstallation des dependances

Bonjour,
Exactement, le même soucis.
Pas moyen de garder le deamon activé.

WebapiError: [object Object]
at _toError (/var/www/html/plugins/spotify/ressources/node_modules/spotify-web-api-node/src/http-manager.js:47:10)
at /var/www/html/plugins/spotify/ressources/node_modules/spotify-web-api-node/src/http-manager.js:71:25
at Request.callback (/var/www/html/plugins/spotify/ressources/node_modules/superagent/lib/node/index.js:905:3)
at IncomingMessage.<anonymous> (/var/www/html/plugins/spotify/ressources/node_modules/superagent/lib/node/index.js:1127:20)
at Stream.emit (node:events:369:20)
at Unzip.<anonymous> (/var/www/html/plugins/spotify/ressources/node_modules/superagent/lib/node/unzip.js:53:12)
at Unzip.emit (node:events:369:20)
at endReadableNT (node:internal/streams/readable:1307:12)
at processTicksAndRejections (node:internal/process/task_queues:81:21) {
body: {},
headers: {
'cache-control': 'private, max-age=0',
'retry-after': '2531',
'access-control-allow-origin': '*',
'access-control-allow-headers': 'Accept, App-Platform, Authorization, Content-Type, Origin, Retry-After, Spotify-App-Version, X-Cloud-Trace-Context, client-token, content-access-token',
'access-control-allow-methods': 'GET, POST, OPTIONS, PUT, DELETE, PATCH',
'access-control-allow-credentials': 'true',
'access-control-max-age': '604800',
'content-encoding': 'gzip',
'strict-transport-security': 'max-age=31536000',
'x-content-type-options': 'nosniff',
date: 'Sun, 19 Sep 2021 08:37:39 GMT',
server: 'envoy',
via: 'HTTP/2 edgeproxy, 1.1 google',
'alt-svc': 'clear',
connection: 'close',
'transfer-encoding': 'chunked'
},
statusCode: 429

Merci de votre aide.

Dans votre cas, je pense que le problème est que vous faites trop de demandes et qu’il vous rejette… Avez-vous vérifié les paramètres API, ID_CLIENT et SECRET_KEY ? Sinon, essayez de recharger le jeton.

Dans mon cas, cela fonctionne de temps en temps.
Dans ce cas, le « UnhandledPromiseRejectionWarning » semble être causé par une erreur dans une demande d’API.
Si l’API Spotify ne donne pas d’erreur maintenant, vous n’aurez pas cette erreur. Il y a peut-être un problème d’authentification ou quelque chose de similaire. Je ne sais pas. Ça me rend fou.

Le problème a été résolu en créant un nouveau projet dans le dashboard de Spotify.

Ce sujet a été automatiquement fermé après 24 heures suivant le dernier commentaire. Aucune réponse n’est permise dorénavant.