Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] JSON occasionally fails to parse #2

Open
entriphy opened this issue Apr 18, 2020 · 6 comments
Open

[bug] JSON occasionally fails to parse #2

entriphy opened this issue Apr 18, 2020 · 6 comments
Labels
bug Something isn't working

Comments

@entriphy
Copy link
Owner

Stack trace:

com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 5 path $
 at com.google.gson.JsonParser.parseReader(JsonParser.java:66)
 at xyz.gianlu.librespot.mercury.JsonMercuryRequest.instantiate(JsonMercuryRequest.java:26)
 at xyz.gianlu.librespot.mercury.MercuryClient.sendSync(MercuryClient.java:82)
 at xyz.gianlu.librespot.HTTPSServer$PlayCountHandler.handle(HTTPSServer.java:88)
 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:675)
 at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
 at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:647)
 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:748)
Caused by: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 5 path $
 at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1564)
 at com.google.gson.stream.JsonReader.checkLenient(JsonReader.java:1405)
 at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:543)
 at com.google.gson.stream.JsonReader.peek(JsonReader.java:426)
 at com.google.gson.JsonParser.parseReader(JsonParser.java:61)
 ... 12 more
@entriphy entriphy added the bug Something isn't working label Apr 18, 2020
@slapheadted
Copy link

slapheadted commented Apr 20, 2020

What's the response code that you get back from the server for this issue @evilarceus ? Would it result in a 500? (As I mentioned in response to another issue here) I'm experiencing intermittent 500s from the public server.

@entriphy
Copy link
Owner Author

The status code should be 500 for this issue. If you're getting random status code 500s, it's most likely because of this issue.

@annadnl
Copy link

annadnl commented Apr 29, 2020

i'm also getting intermittent 500s on the artistInfo endpoint

2020/04/29 09:09:41 [warn] 4576#0: *1244 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/1/00/0000000001 while reading upstream, client: 87.9.212.241, server: , request: "GET /artistInfo?artistid=0SfsnGyD8FpIN4U4WCkBZ5 HTTP/1.1", upstream: "http://xxx/artistInfo?artistid=0SfsnGyD8FpIN4U4WCkBZ5", host: "xxx", referrer: "http://xxx/artistInfo?artistid=0SfsnGyD8FpIN4U4WCkBZ5"

@Stoley
Copy link

Stoley commented Apr 29, 2020

i'm also getting intermittent 500s on the artistInfo endpoint

2020/04/29 09:09:41 [warn] 4576#0: *1244 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/1/00/0000000001 while reading upstream, client: 87.9.212.241, server: , request: "GET /artistInfo?artistid=0SfsnGyD8FpIN4U4WCkBZ5 HTTP/1.1", upstream: "http://xxx/artistInfo?artistid=0SfsnGyD8FpIN4U4WCkBZ5", host: "xxx", referrer: "http://xxx/artistInfo?artistid=0SfsnGyD8FpIN4U4WCkBZ5"

That's a playlist

@annadnl
Copy link

annadnl commented Apr 29, 2020

it is not, it's armin van buuren :-)

spotify:artist:0SfsnGyD8FpIN4U4WCkBZ5

but you are correct, if you search for "0SfsnGyD8FpIN4U4WCkBZ5" on the platform it does return a playlist. could this be a hint towards where the problem comes from? that a playlist and an artist have the same handle?

@Stoley
Copy link

Stoley commented Apr 29, 2020

ah you're right, never seen that before

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants