andrei7c4/espspotifydisplay

Errors reported on debug port

Closed this issue · 2 comments

I have the app running and displaying the Spotify logo on the OLed display. But I can't get it to show any Spotify playback info.

I get this on the debug port when I start it up:
pm open,type:2 0
þvalid config found
Built on Jun 30 2018 15:53:33
SDK version 2.2.0-dev(9422289)
free heap 34208
mpu6500_init failed
dispInitDone
appState 1
mode : sta(84:f3:eb:0c:35:24)
add if0
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 1
cnt

connected with ORBI28, channel 13
dhcp client start...
ip:192.168.1.16,mask:255.255.255.0,gw:192.168.1.1
please start sntp first !
pm open,type:2 0

Then, if I press one of the buttons, I get this:
appState 2
getHostByNameCb ip: 104.199.64.136
espconn_secure_connect 0
client handshake start.
client handshake ok!
appState 3
onTcpConnected

requestLen 333
POST /api/token HTTP/1.1
Accept: /
Connection: keep-alive
User-Agent: ESP8266
Content-Type: application/x-www-form-urlencoded
Authorization: Basic ...
Content-Length: 39
Host: accounts.spotify.com

grant_type=refresh_token&refresh_token=

appState 4
onTcpDataSent
onTcpDataRecv 261
appState 5
parseAuthReply, len 261
parseTokens failed
HTTP/1.1 400 Bad Request
Server: nginx
Date: Mon, 02 Jul 2018 10:20:08 GMT
Content-Type: application/json
Content-Length: 80
Connection: keep-alive
Keep-Alive: timeout=600

{"error":"invalid_request","error_description":"refresh_token must be supplied"}

Try to obtain a new authorization code. The code is valid for a few minutes only, so when you get it, just copy-paste it into device right away. Also, do not post the code or the string generated from it (Authorization: Basic ...) publicly.

I think I must have not been careful enough with my cut and pasting somewhere. It's working now. Thank you for the great app.