Couldn't connect to Anki! Check console for error message

I tried to sync Anki and Obsidian but it didn’t work. I followed the steps and installed the plugin successfully but couldn’t get to the configuration step. I keep getting these msgs “Need to connect to Anki generate default settings”, “Couldn’t connect to Anki! Check console for error message”.

Have you tried opening an issue in the plugin repository? I’m not sure what the preferred way to report problems or ask questions is for @Pseudonium.

Is Anki open in the background?

Yea… I’m super new to obsidian and its forum so I don’t really know where to start…

Anki2

Did you check the console? Ctrl/Cmd + Shift + I should help. Anki should be open in the background as far as I know

Here’s what I got

Is anki open?

Yes

Then I’m at a loss. I suggest opening an issue in the plugin repository.

1 Like

I followed the steps and installed the plugin successfully but couldn’t get to the configuration step.

You said that you couldn’t get to the configuration step. Did you install the plugin AnkiConnect in Anki and set it up according to the instructions given by the author of the Obsidian to Anki plugin?

Yes, I did everything exactly the same

So your AnkiConnect configuration looks like this?
(I ask this because the screenshot you sent shows that you activated the plugin, for it to work you have to configure Anki as well.)

Got it!!! I added the wrong add-on so it didn’t work back then. Thank you so much.

1 Like

In case someone has properly configured their Anki Connect and runs into this issue later on, you can add this to your config in Anki:
"Referrer-Policy": "origin",

So, your whole Config for AnkiConnect would look like:

{
    "Referrer-Policy": "origin",
    "apiKey": null,
    "apiLogPath": null,
    "ignoreOriginList": [],
    "webBindAddress": "127.0.0.1",
    "webBindPort": 8765,
    "webCorsOrigin": "http://localhost",
    "webCorsOriginList": [
        "http://localhost",
        "app://obsidian.md"
    ]
}
1 Like

Got same problem but solved now.
This line was missing on Ankiconnect configurations.
“app://obsidian.md”

Many thanks!! This works for me