dvx / lofi

🎵🔉 A mini Spotify player with WebGL visualizations.
http://lofi.rocks
MIT License
1.18k stars 67 forks source link

Add log out button in Settings (was Lofi not connecting to spotify, displays blinking spotify logo as if I don't have it open.) #134

Closed shubhambhatnag closed 1 year ago

shubhambhatnag commented 3 years ago

Windows 10, recently got spotify premium on a different account that I used to use lofi on, and lofi player does not recognize spotify whether I have music playing or not.

k8seren commented 3 years ago

Same issue here; MacOS 11.5.1. I only have one Spotify account and Lofi doesn't detect Spotify is running. Reboots/quit & re-open have no effect. Reset Lofi to factory settings as well. Bummed I can't get it to work; this app is exactly what i've been looking for!

stamoun commented 3 years ago

If you enable debug from the settings, what does the console looks like on startup?

stamoun commented 2 years ago

Fixed in v1.6.0

k8seren commented 2 years ago

This is still happening in 1.6. I just updated and it's doing the same thing. I can open in Debug - what info do you want from the Debug window? I don't know what I'm looking at to send it to you but happy to paste in whatever info is helpful.

stamoun commented 2 years ago

Not fixed in v1.6.0, needs to be tested on Mac.

Could you provide the contents of the debug window (the console), if any?

k8seren commented 2 years ago

Here is what I see in the console - not much unfortunately. Let me know if you need more info

Screen Shot 2021-09-16 at 12 43 42 PM

.

k8seren commented 2 years ago

Now it's showing more activity, looks like it might be hitting API too often

Screen Shot 2021-09-16 at 12 51 51 PM

?

stamoun commented 2 years ago

FWIW, I cannot repro this on MacOS 11.5.2 (Big Sur).

So `429' errors are from Spotify throttling the API calls (we perform one call each second for track info and one each 5 seconds for like status).

As long as you have 429 errors Lofi won't be able to update the cover and track info. That being said, you shouldn't be throttled that often (it's very spurious and most often when you change the volume via the scroll wheel).

What does the Network tab show? It should look like the following: network

k8seren commented 2 years ago

The network page does look something like that. It's probably the office VPN and/or security causing the issues on my Mac. I thought maybe the update might fix that. Thanks for taking a look - no need to spend more time when it's probably not something wrong with Lofi.

stamoun commented 2 years ago

Something I thought that you may not know that would trigger the pulsing Spotify logo... Lofi is not a standalone player, you still need to run Spotify in the background.

It may be a could idea to check if there is a Spotify process running when launching Lofi. If not, we could launch Spotify 🤔This is probably harder than it sounds because process interaction is very OS specific.

SpagettJP commented 2 years ago

Not sure if this should be a separate issue but I was having the same issue. It turns out I had the wrong Spotify account connected. This was not easy to change. I had to go to ..APPDATA\ROAMING\lofi to edit the "Access Token" in the settings file to reset my login. This should be easier, unless I am missing something.

KatyaraBlackstone commented 2 years ago

I had to go to ..APPDATA\ROAMING\lofi to edit the "Access Token" in the settings file to reset my login.

This fix worked in my case. Many thanks!

shubhambhatnag commented 2 years ago

How do I access my Spotify account's access token? What do I do exactly in the settings file?

shubhambhatnag commented 2 years ago

Okay, I deleted the token from the file and relogged in through lofi, but the situation did not resolve. I still see the blinking spotify logo, even though I'm playing music through Spotify. Works with web player though.

SpagettJP commented 2 years ago

@BlobKnight did you have to sign back into spotify or give it permission again after you relogged the settings file?

shubhambhatnag commented 2 years ago

I deleted the token, and when I relaunched lofi it asked me to sign in. I gave Spotify the permission but nothing changed.

SpagettJP commented 2 years ago

image also this is the location of the settings file and the text that needs to be removed to reset the access token. @BlobKnight you must be having a different issue. You are using the Spotify desktop client right?

Edit: I deleted the photo with my Spotify access token lol, don't want to put that out there even though it looks like a pain in the ass to type.

SpagettJP commented 2 years ago

@BlobKnight make sure your web client and desktop clients are signed into the same account if you are using the desktop client.

shubhambhatnag commented 2 years ago

@SpagettJP They are on the same account

SpagettJP commented 2 years ago

FWIW, I cannot repro this on MacOS 11.5.2 (Big Sur).

So `429' errors are from Spotify throttling the API calls (we perform one call each second for track info and one each 5 seconds for like status).

As long as you have 429 errors Lofi won't be able to update the cover and track info. That being said, you shouldn't be throttled that often (it's very spurious and most often when you change the volume via the scroll wheel).

What does the Network tab show? It should look like the following: network

Have you followed along with this troubleshooting? If so, are you getting the 429 error?

stamoun commented 2 years ago

Not sure if this should be a separate issue but I was having the same issue. It turns out I had the wrong Spotify account connected. This was not easy to change. I had to go to ..APPDATA\ROAMING\lofi to edit the "Access Token" in the settings file to reset my login. This should be easier, unless I am missing something.

There should be a log out button in the settings window that could zap the access token from the settings file. I will reuse this issue in that regards.

stamoun commented 1 year ago

Currently fixed in the electron upgrade branch. If you reset the settings to default, it will log you out.