waaverecords / PowerToys-Run-Spotify

Search and control Spotify from PowerToys Run.
MIT License
179 stars 12 forks source link

doesn't seem to work suddenly? #21

Closed Dziggify closed 7 months ago

Dziggify commented 7 months ago

Hi,

So when I installed it a few months ago, it work flawlessly. But then it stopped working, I tried updating powertoys to latest, also install the latest plugin. Whenever I typed 'Sp', it shows the control (pause, next, etc) but it doesn't work. If I typed 'Sp [artist name]' it just doesn't show anything.

waaverecords commented 7 months ago

Can't do much without more info.

Can you look into the PowerToys logs to see what's going on? Usually at %LocalAppData%\Microsoft\PowerToys\PowerToys Run\Logs

Typing the following for people who would run into a similiar issue:

Make sure your PowerToys version is v0.79.0 and that your PowerToys-Run-Spotify version is also v0.79.0.

waaverecords commented 7 months ago

It could also be caused by your Spotify account no longer being on the premium plan.

Dziggify commented 7 months ago

Hi @waaverecords , thanks for replying.

I just upgraded to v.0.80 and also using spotify plugin v.0.80.

I have premium family plan.

Here's a snippet from the log :

[2024-04-06 10:39:55.4845] [ERROR] [C:\a_work\1\s\src\modules\launcher\PowerLauncher\Plugin\PluginManager.cs::239] -------------------------- Begin exception -------------------------- Message: Exception for plugin when query

Exception full name : SpotifyAPI.Web.APIException Exception message : invalid_grant Exception stack trace: at SpotifyAPI.Web.Http.APIConnector.ProcessErrors(IResponse response) at SpotifyAPI.Web.Http.APIConnector.DoRequest(IRequest request, CancellationToken cancel) at SpotifyAPI.Web.Http.APIConnector.DoSerializedRequest[T](IRequest request, CancellationToken cancel) at SpotifyAPI.Web.Http.APIConnector.SendAPIRequest[T](Uri uri, HttpMethod method, IDictionary2 parameters, Object body, IDictionary2 headers, CancellationToken cancel) at SpotifyAPI.Web.PKCEAuthenticator.Apply(IRequest request, IAPIConnector apiConnector) at SpotifyAPI.Web.Http.APIConnector.ApplyAuthenticator(IRequest request) at SpotifyAPI.Web.Http.APIConnector.DoRequest(IRequest request, CancellationToken cancel) at SpotifyAPI.Web.Http.APIConnector.DoSerializedRequest[T](IRequest request, CancellationToken cancel) at SpotifyAPI.Web.Http.APIConnector.SendAPIRequest[T](Uri uri, HttpMethod method, IDictionary2 parameters, Object body, IDictionary2 headers, CancellationToken cancel) at PowerToys_Run_Spotify.Main.Query(Query query) in C:\Users\m_sno\PowerToys-Run-Spotify\Main.cs:line 118 at PowerLauncher.Plugin.PluginManager.<>c__DisplayClass23_0.b__0() at Wox.Infrastructure.Stopwatch.Debug(String message, Action action) at PowerLauncher.Plugin.PluginManager.QueryForPlugin(PluginPair pair, Query query, Boolean delayedExecution) Exception source : SpotifyAPI.Web Exception target site: Void ProcessErrors(SpotifyAPI.Web.Http.IResponse) Exception HResult : -2146233088 -------------------------- End exception --------------------------

waaverecords commented 7 months ago

Most likely related to your Spotify token. Going through the login process again might resolve your problem.

Go to %LocalAppData%\PowerToys-Run-Spotify and delete the credentials.json file. Then, activate PowerToys Run and type sp. You should see a result asking you to login to your Spotify account. Hit enter and go through the login process.

If it still doesn't work after that, you might have to create a new application on your Spotify API dashboard and use that new client Id.

Dziggify commented 7 months ago

That does the trick! Thank you @waaverecords