fow5040 / Flow.Launcher.Plugin.SpotifyPremium

Spotify Premium plug-in for Flow Launcher
MIT License
31 stars 2 forks source link

No active device Issue #9

Closed WizenPainter closed 2 years ago

WizenPainter commented 2 years ago

Issue Description

Unable to use the plugin. When I setup my Security.Store file as well as the URI I get the issue of "No active device" and when I go to see the issue it tells me there are "No devices found on Spotify". I do have Spotify premium, but I don't believe that to be the issue. This issue is similar to issue #6 but the solution there didn't help here.

Functionality Affected

Please mark the functionality of the plugin that is affected by the issue:

Software Versions

Please fill in the following information:

Please also make sure you're running the latest version of Flow.Launcher.Plugin.SpotifyPremium

fow5040 commented 2 years ago

Do you see this issue while spotify is actively playing music?

WizenPainter commented 2 years ago

Yes, I see it both when spotify is playing music as well as when spotify is not playing anything or even open. The last time I tried to use the plugin I got the following error:

Flow Launcher version: 1.9.3 OS Version: Microsoft Windows NT 10.0.19044.0 IntPtr Length: 8 x64: True

Date: 05/11/2022 13:45:36 Exception: SpotifyAPI.Web.APIException: invalid_client at SpotifyAPI.Web.Http.APIConnector.ProcessErrors(IResponse response) at SpotifyAPI.Web.Http.APIConnector.DoRequest(IRequest request) at SpotifyAPI.Web.Http.APIConnector.DoSerializedRequest[T](IRequest request) at SpotifyAPI.Web.Http.APIConnector.SendAPIRequest[T](Uri uri, HttpMethod method, IDictionary2 parameters, Object body, IDictionary2 headers) at Flow.Launcher.Plugin.SpotifyPremium.SpotifyPluginClient.ConnectWebClient(Boolean keepRefreshToken) in C:\Repos\Flow.Launcher.Plugin.SpotifyPremium\SpotifyPluginClient.cs:line 262 at Flow.Launcher.Plugin.SpotifyPremium.SpotifyPlugin.ReconnectAsync(Boolean keepRefreshToken) in C:\Repos\Flow.Launcher.Plugin.SpotifyPremium\SpotifyPlugin.cs:line 447 at Flow.Launcher.Plugin.SpotifyPremium.SpotifyPlugin.QueryAsync(Query query, CancellationToken token) in C:\Repos\Flow.Launcher.Plugin.SpotifyPremium\SpotifyPlugin.cs:line 101 at Flow.Launcher.Core.Plugin.PluginManager.<>cDisplayClass22_0.<b0>d.MoveNext() in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 192 --- End of stack trace from previous location --- at Flow.Launcher.Infrastructure.Stopwatch.DebugAsync(String message, Func`1 action) in C:\projects\flow-launcher\Flow.Launcher.Infrastructure\Stopwatch.cs:line 34 at Flow.Launcher.Core.Plugin.PluginManager.QueryForPluginAsync(PluginPair pair, Query query, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 191 at Flow.Launcher.ViewModel.MainViewModel.<>cDisplayClass137_0.<gQueryTask|2>d.MoveNext() in C:\projects\flow-launcher\Flow.Launcher\ViewModel\MainViewModel.cs:line 613 --- End of stack trace from previous location --- at Flow.Launcher.ViewModel.MainViewModel.QueryResults() in C:\projects\flow-launcher\Flow.Launcher\ViewModel\MainViewModel.cs:line 587 at System.Threading.Tasks.Task.<>c.b__140_0(Object state) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

fow5040 commented 2 years ago

One more thing before examining your security store file - can youttype sp reconnect to force clear the refresh token?

WizenPainter commented 2 years ago

I tried the command and it worked. Thank you very much for the suggestion.

fow5040 commented 2 years ago

No problem! Let me note this down somewhere (Readme? Wiki?) as I suspect this isn't the only time the issue will come up 🙂