entriphy / sp-playcount-librespot

Modification of librespot-java to provide play count info from Spotify
Apache License 2.0
120 stars 18 forks source link

/artistInfo endpoint returns 403 #21

Closed fikrifirat closed 2 years ago

fikrifirat commented 2 years ago

Describe the bug As of today, /artistInfo endpoint started returning 403 Forbidden as API response. It also logs a 403 MercuryException to the console. All other endpoints including /artistInsights work perfectly fine.

To Reproduce Make a request to /artistInfo endpoint on a running local deployment OR test via the public API at https://api.t4ils.dev/. For example; Björk : do a GET to https://api.t4ils.dev/artistInfo?artistid=6TwO05VN5ZM3DYVEsP9vjK or http://localhost:{{YOUR PORT}}/artistInfo?artistid=6TwO05VN5ZM3DYVEsP9vjK

Expected behavior The endpoint was working as expected until yesterday and returned also the artist's release info.

Screenshots/Stracktraces/Logs Error logged to console to a GET request to /artistInfo 2022-09-23 16:43:02,294 TRACE MercuryClient:156 - Send Mercury request, seq: 2, uri: hm://artist/v1/57vWImR43h4CaDao012Ofp/desktop?format=json&locale=en&cat=1, method: GET 2022-09-23 16:43:02,351 TRACE MercuryClient:199 - Handling packet, cmd: MercuryReq, seq: 2, flags: 1, parts: 1 xyz.gianlu.librespot.mercury.MercuryClient$MercuryException: status: 403 at xyz.gianlu.librespot.mercury.MercuryClient.sendSync(MercuryClient.java:106) at dev.t4ils.handler.ArtistInfoHandler.handle(ArtistInfoHandler.java:56) at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79) at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83) at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:82) at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:713) at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79) at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:682) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750)

Version/Commit Latest version 1.4.1, by running the compiled script with USER and PASS

fikrifirat commented 2 years ago

This seems to be intermittent and started working again after a while..