Open precondition opened 6 months ago
You should go to the Network tab in the browser dev tools and click on the request, then look at the json and make sure it's correctly formatted or post it here.
I'm seeing this payload in the POST request:
{
action: "notesInfo",
version: 6,
params: {
notes: [<ID obtained from response of previous `findNotes` query>]}
}
Judging from the existence of #46, I'm guessing that Ankiconnect does not support the notesInfo
action and this might be the source of my issue?
Yeah that's correct, notesInfo isn't implemented yet.
When using the HTML files provided by Mokuro (not to be confused with the separate Mokuro Reader app) and enabling Anki integration in the advanced settings, I can successfully create new cards by pressing the green button in the Yomibaba/Yomitan pop-up but I can't add a picture to the card.
Screenshot of the advanced settings
![image](https://github.com/KamWithK/AnkiconnectAndroid/assets/57645186/39def33c-f9b0-4446-9fe1-1aa71fc10a60)Looking at the dev console of the Kiwi Browser mobile app that I use, I can see the following stack trace when I press "Complete":
(I didn't find a way to copy the contents of the error from the Kiwi browser console so this was transcribed by hand on the basis of the screenshots in the spoiler)
Screenshots of error
![image](https://github.com/KamWithK/AnkiconnectAndroid/assets/57645186/6fd14e33-661f-4d1b-bd37-d2bf0cd56005) ![image](https://github.com/KamWithK/AnkiconnectAndroid/assets/57645186/252d9561-2ee3-4f0b-9346-7ec1d832e4ef)I made sure to open AnkiDroid, start the Ankiconnect (v1.12) service and added
https://mokuro.moe
to theCORS host
in the settings. I also disabled battery optimizations on the Ankiconnect app and the Kiwi Browser app.I tested doing the exact same steps on desktop (open the same web page, highlight the same word, create the card, add an image via mokuro) and it worked fine so it is not as if the mokuro file is serving bad JSON data that Ankiconnect can't do anything about, since it seems like the desktop version of Ankiconnect has no issue with the commands received from mokuro.