Error: Token file was not created
btosh32 opened this issue · 2 comments
Hello,
I'm struggling with the node first_auth.json command. I get the below response when I press enter.
[SPOTIFY - Xxxx's Account] Spotify version 2.2.1 Initialized...
[SPOTIFY - Xxxx's Account] AUTH: Opening browser for authentication on Spotify...
[SPOTIFY - Xxxx's Account] AUTH: express app started and listening on port 8888
[SPOTIFY - Xxxx's Account] Error in authentication:
[SPOTIFY - Xxxx's Account] Error: Token file was not created ("/home/pi/MagicMirror/modules/MMM-Spotify/XxxxsAccount_token.json")
at Spotify.waitForFileExists (/home/pi/MagicMirror/modules/MMM-Spotify/Spotify.js:240:39)
at Spotify.authFlow (/home/pi/MagicMirror/modules/MMM-Spotify/Spotify.js:318:23)
at async authorize (/home/pi/MagicMirror/modules/MMM-Spotify/first_auth.js:17:10)
at async authorizations (/home/pi/MagicMirror/modules/MMM-Spotify/first_auth.js:26:5)
[SPOTIFY] Authorization process failed
What happens is that a browser pops up on Chromium and has a spotify page that says would you like to start. When clicking continue, I instead get directed to a 'localhost refused to connect' page. How do I resolve this?
My environment is Raspbian.
Do you have something else running on port 8888?
To answer: No, port 8888 was open.
Thankfully, I was able to solve the issue, but I don't know why it worked. I simply closed the browser that I set up the redirect URI http on, and let node first_auth.json open a browser for me.