skuethe / MMM-Spotify

Spotify display and controller for MagicMirror
MIT License
68 stars 17 forks source link

web page auth fails, cannot connect #192

Closed sdetweil closed 1 year ago

sdetweil commented 2 years ago

timeout for web response set to 0, so first_auth.js(actually Spotify.js) doesn't wait for user

Spotify.js change line 250 from

    let waitForFileTimeout = 0

to

    let waitForFileTimeout = 60*1000  // some reasonable user delay time
skuethe commented 2 years ago

Actually, it does. If you are on the same system it opens a browser and waits until you finished the auth flow and close the browser. After that it works with waitForFileTimeout = 0.

If you are using a remote URL for the auth flow, it will set a timeout of 5 mins: https://github.com/skuethe/MMM-Spotify/blob/c18a57d60b31e39f9adc600fbe15345feeca31d6/Spotify.js#L313-L315

So changing the default timeout to one minute will just create unnecessary waiting time after you already finished the auth flow on a local system.

If you still run into problems, please enable debugging and provide more insights via log outputs.

sdetweil commented 2 years ago

ok, this is on local system, browser does not open, will get debug

skuethe commented 1 year ago

Closing due to inactivity. Feel free to re-open if something else is unclear.