spotify / web-playback-sdk

This issue tracker is no longer used. Join us in the Spotify for Developers forum for support with the Spotify Web Playback SDK ➡️ https://community.spotify.com/t5/Spotify-for-Developers/bd-p/Spotify_Developer
106 stars 7 forks source link

Web Playback SDK - /v1/track-playback/v1/devices - HTTP 504 #121

Open cc-plm opened 4 years ago

cc-plm commented 4 years ago

Issue found on 2020-05-06 10:00 PM PDT.

Scope(s):

https://api.spotify.com/v1/track-playback/v1/devices

Steps to reproduce:

  1. Create a new Spotify.Player()
  2. Attempt to player.connect()

Player POSTS to Spotify API: HTTP POST https://api.spotify.com/v1/track-playback/v1/devices {"device":{"device_id":"REDACTED","device_type":"computer","brand":"public_js-sdk","model":"harmony-chrome.81-cros","name":"REDACTED","metadata":{},"capabilities":{"change_volume":true,"audio_podcasts":true,"enable_play_token":true,"play_token_lost_behavior":"pause","disable_connect":false,"manifest_formats":["file_urls_mp3","file_urls_external","file_ids_mp4","file_ids_mp4_dual"]}},"connection_id":"REDACTED","client_version":"harmony:3.19.1-441cc8f","previous_session_state":null,"volume":65535}

Expected behaviour:

Player should get HTTP 2xx from /track-playback/v1/devices resource

Actual behaviour:

Player gets HTTP 504 Gateway Timeout from /track-playback/v1/devices resource Response: HTTP 504 { "error": { "status": 504, "message": "Service didn't reply before timeout" } }

Player Logs error: HTTP POST https://api.spotify.com/v1/melody/v1/logging/jssdk_error {"sdk_id":"harmony:3.19.1-441cc8f","platform":"Partner public_js-sdk harmony-chrome.81-cros","source":"tpapi-client","source_version":"unknown","type":"TP_REGISTRATION_FAILED_WITH_STATUS","message":"track-playback service responded with status 504 when registering device","stack":"\"TrackPlayerAPIClientError\n at Object. (https://sdk.scdn.co/embedded/index.js:2:39264)\\n at e (https://sdk.scdn.co/embedded/index.js:2:101)\\n at Object. (https://sdk.scdn.co/embedded/index.js:9:195753)\\n at e (https://sdk.scdn.co/embedded/index.js:2:101)\\n at Object. (https://sdk.scdn.co/embedded/index.js:9:76167)\\n at e (https://sdk.scdn.co/embedded/index.js:2:101)\\n at Object. (https://sdk.scdn.co/embedded/index.js:9:6416)\\n at e (https://sdk.scdn.co/embedded/index.js:2:101)\\n at Object. (https://sdk.scdn.co/embedded/index.js:2:54215)\\n at e (https://sdk.scdn.co/embedded/index.js:2:101)\"","json_data":"{}","json_data_version":"1.0.0"}

vietnt-uet commented 4 years ago

I got the same issue today: https://github.com/spotify/web-playback-sdk/issues/120

nguyennk commented 4 years ago

seems like the sdk is failing if the connection is from US, CAD I tried to test it with different region ip (EU) --> everything run fine

vietnt-uet commented 4 years ago

seems like the sdk is failing if the connection is from US, CAD I tried to test it with different region ip (EU) --> everything run fine

I have issue with almost SEA region countries :(

nguyennk commented 4 years ago

from EU image

from US or CAD image

from SEA (Singapore) image

cc-plm commented 4 years ago

FYI - This seems to be resolved now, at least for my PWA on mobile here in CA USA.

vietnt-uet commented 4 years ago

FYI - This seems to be resolved now, at least for my PWA on mobile here in CA USA.

It seems also working well for SEA regions users now.

nguyennk commented 4 years ago

Yup, working fine again now :)