Skip to content

Synchronizing failed: MalformedJsonException #91

@do0f

Description

@do0f

Before creating an issue, please check if you're using the most up-to-date version of the plugin! Reinstall it if necessary.

If you're using a non stable KOReader version (one of the nightly builds), you may want to use the nightly branch instead.

  • KOReader version:
    KOReader 2025.10 "Ghost"

Describe the Issue
Synching offline notes leads to the following error: "Synchronizing failed: MalformedJsonException"

Full log from KOReader (I copied it with OCR so it can be a little messed up):

Synchronizing failed!
com.google.gson.stream.MalformedJsonException: Use
JsonReader.setLenient(true) to accept malformed JSON at line 1 column 14 path com.googie.gson.jsonSyntaxException:
com.googie.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.findRouteHandl
@Error(AnkiAPIRouting.java:106)
com.kamwithk.ankiconnectandroid.routing.APIHandier.chooseAPIAPIHandi
er.java:33)
at com.kamwithk.ankiconnectandroid.routing.RouteHandier.get(RouteHandier
java:73)
at
fi.iki.elonen.router.RouterNanoHTTPD$DefaultStreamHandier.post(RouterN
anoHTTPD.java:100)
at fi.iki.elonen.router.RouterNanoHTTPD$UriResource.process(RouterNanoHT
TPD.java:386)
at fi.iki.elonen.router.RouterNanoHTTPD$UriRouter.process(RouterNanoHTTP
D.java:596)
at fl.iki.elonen.router.RouterNanoHTTPD.serve(RouterNanoHTTPD.java:671)
f.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:945)
at fi.iki.elonen.NanoHTTPD$ClientHandier.run(NanoHTTPD.java:192)
at java.lang.Thread.run(Thread.java:923)
Caused by: com.google.gson.stream.Malformed/sonException: Use
JsonReader.setLenient(true) to accept malformed JSON at line 1 column 14 path at
com.google.gson.stream.jsonReader.syntaxError(JsonReader.java:1597)
com.google.gson.stream.JsonReader.checkLenient/sonReader.java:1404)
at com.google.gson.stream.JsonReader.doPeeK/sonReaderjava:542)
at com.google.gson.stream.JsonReader.peek/sonReader.java:425)
at com.google.gson./sonParser.parseReader(JsonParser.java:61)
... 11 more

I extracted anki.koplugin_notes.json and JSON there seems valid:

{"identifier":"Expression","data":{"modelName":"Lapis","tags":["KOReader"],"options":{"duplicateScope":"deck","allowDuplicate":false},"fields":{"MiscInfo":"Agatha Christie - And Then There Were None (195/351)","Sentence":"She and Philip Lombard sat on the <b>windowsill</b> of the living-room.","Expression":"windowsill","MainDefinition":"<div class=\"definition\"><ol>\n<i>noun</i><br><ol><li>(architecture) The horizontal member protruding from the base of a window frame.</li></ol></ol></div>"},"deckName":"English"},"field_callbacks":{"picture":{"func":"set_image_data","args":{}},"audio":{"field_name":"ExpressionAudio","func":"set_forvo_audio","args":["windowsill","en"]},"fields":{"func":"set_translated_context","args":["She and Philip Lombard sat on the <b>windowsill</b> of the living-room.","en"]}}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions