KamWithK/AnkiconnectAndroid

Failed to fetch guiDeckReview

Closed this issue · 2 comments

I installed AnkiTab in Kiwi browser. When something went wrong.

request

curl 'http://localhost:8765/' \
  -H 'Accept: */*' \
  -H 'Accept-Language: zh-CN,zh;q=0.9,ja-JP;q=0.8,ja;q=0.7' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: text/plain;charset=UTF-8' \
  -H 'Origin: chrome-extension://ihoaepdiibjbifnhcjoaddgcnfgjmjdk' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Site: none' \
  -H 'User-Agent: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36' \
  -H 'sec-ch-ua: "Not-A.Brand";v="99", "Chromium";v="124"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "Android"' \
  --data-raw '{"action":"guiDeckReview","version":6,"params":{"name":"default"}}' \
  --compressed

response

{
  "result": null,
  "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 $\n\tat com.google.gson.JsonParser.parseReader(JsonParser.java:66)\n\tat com.google.gson.JsonParser.parseString(JsonParser.java:47)\n\tat com.kamwithk.ankiconnectandroid.routing.AnkiAPIRouting.findRouteHandleError(AnkiAPIRouting.java:103)\n\tat com.kamwithk.ankiconnectandroid.routing.APIHandler.chooseAPI(APIHandler.java:33)\n\tat com.kamwithk.ankiconnectandroid.routing.RouteHandler.get(RouteHandler.java:70)\n\tat fi.iki.elonen.router.RouterNanoHTTPD$DefaultStreamHandler.post(RouterNanoHTTPD.java:100)\n\tat fi.iki.elonen.router.RouterNanoHTTPD$UriResource.process(RouterNanoHTTPD.java:386)\n\tat fi.iki.elonen.router.RouterNanoHTTPD$UriRouter.process(RouterNanoHTTPD.java:596)\n\tat fi.iki.elonen.router.RouterNanoHTTPD.serve(RouterNanoHTTPD.java:671)\n\tat fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:945)\n\tat fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:192)\n\tat java.lang.Thread.run(Thread.java:1012)\nCaused by: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 14 path $\n\tat com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1597)\n\tat com.google.gson.stream.JsonReader.checkLenient(JsonReader.java:1404)\n\tat com.google.gson.stream.JsonReader.doPeek(JsonReader.java:542)\n\tat com.google.gson.stream.JsonReader.peek(JsonReader.java:425)\n\tat com.google.gson.JsonParser.parseReader(JsonParser.java:61)\n\t... 11 more\n"

Outside of the malformed JSON error message which could be some other issue, that extension is relying on a API call that AnkiconnectAndroid doesn't support, and I don't know think it's possible to support it - the functionality to get that feature to work probably isn't present in the Android version of Anki.

Outside of the malformed JSON error message which could be some other issue, that extension is relying on a API call that AnkiconnectAndroid doesn't support, and I don't know think it's possible to support it - the functionality to get that feature to work probably isn't present in the Android version of Anki.

Correct, I'm closing this as it won't be implemented