Fork me on GitHub
#hyperfiddle
<
2023-06-11
>
Vincent22:06:44

I'm working on adding an embedded Spotify player to my Electric project. user hits a URL that gives me an o-auth token that I can use to instantiate a local web player (token valid for 1 hour) But I get some strange errors

Vincent22:06:31

index.js:33     GET  401
r.request @ index.js:33
(anonymous) @ index.js:33
Promise.then (async)
(anonymous) @ index.js:33
e._tick @ index.js:3
e.start @ index.js:3
t._sendRetriedRequest @ index.js:33
(anonymous) @ index.js:33
Promise.then (async)
t._sendRequest @ index.js:33
t.request @ index.js:33
t.request @ index.js:33
e._verifyToken @ index.js:50
Promise.then (async)
e._getToken @ index.js:50
(anonymous) @ index.js:33
token @ index.js:33
(anonymous) @ index.js:33
t._refreshToken @ index.js:33
(anonymous) @ index.js:33
e._tick @ index.js:3
(anonymous) @ index.js:3
setTimeout (async)
e._failure @ index.js:3
(anonymous) @ index.js:3
Promise.catch (async)
e._tick @ index.js:3
e.start @ index.js:3
e.init @ index.js:3
t._authenticate @ index.js:33
t.authenticate @ index.js:33
(anonymous) @ index.js:50
Promise.then (async)
e._onConnect @ index.js:50
e._handleMessages @ index.js:50
e._receiveMessage @ index.js:50
index.js:33     GET  401
r.request @ index.js:33
(anonymous) @ index.js:33
Promise.then (async)
(anonymous) @ index.js:33
e._tick @ index.js:3
(anonymous) @ index.js:3
setTimeout (async)
e._failure @ index.js:3
(anonymous) @ index.js:3
Promise.catch (async)
e._tick @ index.js:3
e.start @ index.js:3
t._sendRetriedRequest @ index.js:33
(anonymous) @ index.js:33
Promise.then (async)
t._sendRequest @ index.js:33
t.request @ index.js:33
t.request @ index.js:33
e._verifyToken @ index.js:50
Promise.then (async)
e._getToken @ index.js:50
(anonymous) @ index.js:33
token @ index.js:33
(anonymous) @ index.js:33
t._refreshToken @ index.js:33
(anonymous) @ index.js:33
e._tick @ index.js:3
(anonymous) @ index.js:3
setTimeout (async)
e._failure @ index.js:3
(anonymous) @ index.js:3
Promise.catch (async)
e._tick @ index.js:3
e.start @ index.js:3
e.init @ index.js:3
t._authenticate @ index.js:33
t.authenticate @ index.js:33
(anonymous) @ index.js:50
Promise.then (async)
e._onConnect @ index.js:50
e._handleMessages @ index.js:50
e._receiveMessage @ index.js:50
index.js:33     GET  401
r.request @ index.js:33
(anonymous) @ index.js:33
Promise.then (async)
(anonymous) @ index.js:33
e._tick @ index.js:3
(anonymous) @ index.js:3
setTimeout (async)
e._failure @ index.js:3
(anonymous) @ index.js:3
Promise.catch (async)
e._tick @ index.js:3
(anonymous) @ index.js:3
setTimeout (async)
e._failure @ index.js:3
(anonymous) @ index.js:3
Promise.catch (async)
e._tick @ index.js:3
e.start @ index.js:3
t._sendRetriedRequest @ index.js:33
(anonymous) @ index.js:33
Promise.then (async)
t._sendRequest @ index.js:33
t.request @ index.js:33
t.request @ index.js:33
e._verifyToken @ index.js:50
Promise.then (async)
e._getToken @ index.js:50
(anonymous) @ index.js:33
token @ index.js:33
(anonymous) @ index.js:33
t._refreshToken @ index.js:33
(anonymous) @ index.js:33
e._tick @ index.js:3
(anonymous) @ index.js:3
setTimeout (async)
e._failure @ index.js:3
(anonymous) @ index.js:3
Promise.catch (async)
e._tick @ index.js:3
e.start @ index.js:3
e.init @ index.js:3
t._authenticate @ index.js:33
t.authenticate @ index.js:33
(anonymous) @ index.js:50
Promise.then (async)
e._onConnect @ index.js:50
e._handleMessages @ index.js:50
e._receiveMessage @ index.js:50
index.js:33     GET  401
r.request @ index.js:33
(anonymous) @ index.js:33
Promise.then (async)
(anonymous) @ index.js:33
e._tick @ index.js:3
e.start @ index.js:3
t._sendRetriedRequest @ index.js:33
(anonymous) @ index.js:33
Promise.then (async)
t._sendRequest @ index.js:33
t.request @ index.js:33
t.request @ index.js:33
e._verifyToken @ index.js:50
Promise.then (async)
e._getToken @ index.js:50
(anonymous) @ index.js:33
token @ index.js:33
(anonymous) @ index.js:33
t._refreshToken @ index.js:33
(anonymous) @ index.js:33
e._tick @ index.js:3
(anonymous) @ index.js:3
setTimeout (async)
e._failure @ index.js:3
(anonymous) @ index.js:3
Promise.catch (async)
e._tick @ index.js:3
(anonymous) @ index.js:3
setTimeout (async)
e._failure @ index.js:3
(anonymous) @ index.js:3
Promise.catch (async)
e._tick @ index.js:3
e.start @ index.js:3
e.init @ index.js:3
t._authenticate @ index.js:33
t.authenticate @ index.js:33
(anonymous) @ index.js:50
Promise.then (async)
e._onConnect @ index.js:50
e._handleMessages @ index.js:50
e._receiveMessage @ index.js:50
index.js:33     GET  401
r.request @ index.js:33
(anonymous) @ index.js:33
Promise.then (async)
(anonymous) @ index.js:33
e._tick @ index.js:3
(anonymous) @ index.js:3
setTimeout (async)
e._failure @ index.js:3
(anonymous) @ index.js:3
Promise.catch (async)
e._tick @ index.js:3
e.start @ index.js:3
t._sendRetriedRequest @ index.js:33
(anonymous) @ index.js:33
Promise.then (async)
t._sendRequest @ index.js:33
t.request @ index.js:33
t.request @ index.js:33
e._verifyToken @ index.js:50
Promise.then (async)
e._getToken @ index.js:50
(anonymous) @ index.js:33
token @ index.js:33
(anonymous) @ index.js:33
t._refreshToken @ index.js:33
(anonymous) @ index.js:33
e._tick @ index.js:3
(anonymous) @ index.js:3
setTimeout (async)
e._failure @ index.js:3
(anonymous) @ index.js:3
Promise.catch (async)
e._tick @ index.js:3
(anonymous) @ index.js:3
setTimeout (async)
e._failure @ index.js:3
(anonymous) @ index.js:3
Promise.catch (async)
e._tick @ index.js:3
e.start @ index.js:3
e.init @ index.js:3
t._authenticate @ index.js:33
t.authenticate @ index.js:33
(anonymous) @ index.js:50
Promise.then (async)
e._onConnect @ index.js:50
e._handleMessages @ index.js:50
e._receiveMessage @ index.js:50
index.js:33     GET  401
r.request @ index.js:33
(anonymous) @ index.js:33
Promise.then (async)
(anonymous) @ index.js:33
e._tick @ index.js:3
(anonymous) @ index.js:3
setTimeout (async)
e._failure @ index.js:3
(anonymous) @ index.js:3
Promise.catch (async)
e._tick @ index.js:3
(anonymous) @ index.js:3
setTimeout (async)
e._failure @ index.js:3
(anonymous) @ index.js:3
Promise.catch (async)
e._tick @ index.js:3
e.start @ index.js:3
t._sendRetriedRequest @ index.js:33
(anonymous) @ index.js:33
Promise.then (async)
t._sendRequest @ index.js:33
t.request @ index.js:33
t.request @ index.js:33
e._verifyToken @ index.js:50
Promise.then (async)
e._getToken @ index.js:50
(anonymous) @ index.js:33
token @ index.js:33
(anonymous) @ index.js:33
t._refreshToken @ index.js:33
(anonymous) @ index.js:33
e._tick @ index.js:3
(anonymous) @ index.js:3
setTimeout (async)
e._failure @ index.js:3
(anonymous) @ index.js:3
Promise.catch (async)
e._tick @ index.js:3
(anonymous) @ index.js:3
setTimeout (async)
e._failure @ index.js:3
(anonymous) @ index.js:3
Promise.catch (async)
e._tick @ index.js:3
e.start @ index.js:3
e.init @ index.js:3
t._authenticate @ index.js:33
t.authenticate @ index.js:33
(anonymous) @ index.js:50
Promise.then (async)
e._onConnect @ index.js:50
e._handleMessages @ index.js:50
e._receiveMessage @ index.js:50
index.js:18 WebSocket connection to '' failed: 
lots of 401s which is "unauthorized" but then a web socket connection, which might make sense. I'm wondering if it's just because I'm working at playing it from localhost:8080 instead of on the web, but I think that shouldn't matter :thinking_face:

Dustin Getz02:06:09

doesn’t seem to be electric related, i’d try to get the spotify client working in a simple index.html with javascript