Skip to content

Error when adding a card with "suspend new cards" on #75

@curtisbarnard

Description

@curtisbarnard

Thanks a bunch for the work on this. I just got it up and running with Firefox Android and Yomitan and was able to add some cards to my Anki deck. I did notice that if I have the "Suspend new cards" option turned on in yomitan that I get an error in the Yomitan popup after the card is added:

An error occured:

Anki error: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 14 path $com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 14 path $ 	at com.google.gson.JsonParser.parseReader(JsonParser.java:66) 	at com.google.gson.JsonParser.parseString(JsonParser.java:47) 	at com.kamwithk.ankiconnectandroid.routing.AnkiAPIRouting.findRouteHandleError(AnkiAPIRouting.java:106) 	at com.kamwithk.ankiconnectandroid.routing.APIHandler.chooseAPI(APIHandler.java:33) 	at com.kamwithk.ankiconnectandroid.routing.RouteHandler.get(RouteHandler.java:70) 	at fi.iki.elonen.router.RouterNanoHTTPD$DefaultStreamHandler.post(RouterNanoHTTPD.java:100) 	at fi.iki.elonen.router.RouterNanoHTTPD$UriResource.process(RouterNanoHTTPD.java:386) 	at fi.iki.elonen.router.RouterNanoHTTPD$UriRouter.process(RouterNanoHTTPD.java:596) 	at fi.iki.elonen.router.RouterNanoHTTPD.serve(RouterNanoHTTPD.java:671) 	at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:945) 	at fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:192) 	at java.lang.Thread.run(Thread.java:1012) Caused by: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 14 path $ 	at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1597) 	at com.google.gson.stream.JsonReader.checkLenient(JsonReader.java:1404) 	at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:542) 	at com.google.gson.stream.JsonReader.peek(JsonReader.java:425) 	at com.google.gson.JsonParser.parseReader(JsonParser.java:61) 	... 11 more 

Log debug info to console

I checked my Anki deck and the card got added fine and it has all the correct fields filled in (expression, reading, audio, tags, etc.), the only issue is that it is not in a suspended state.

I'm not sure if this is a known issue, but I wanted to report it anyway. It's not critical to my study workflow, but would be nice to have if anyone gets around to it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions