Anki Forums

[Bug?] clicking on links in cards opens browser three times

I have a few dictionary links in some of my cards and noticed on Anki Desktop that clicking on these links opens this link three times in my browser.

This seems not to be browser specific (tried with qutebrowser and brave, so could technically still be a chromium issue)

The same does not happen on AnkiDroid. Thus I believe it to be an Anki-Desktop issue. The same behaviour also occurs with links from decks I have not created. The same behaviour also occurs with all Add-ons disabled.

My setup:

  • Anki 2.1.43-1
  • uname -a: Linux arch 5.11.16-arch1-1 #1 SMP PREEMPT Wed, 21 Apr 2021 17:22:13 +0000 x86_64 GNU/Linux
  • Python 3.9.4

The links I use are just simple a-tags, so for example:
<a href="http://jisho.org/search/誤">jisho</a>

I remember not having this issue a few months back, but tbh with Arch the question is always whether the bug might be from a different source.

I can’t reproduce it here. Have you tried the standard packaged build?
https://faqs.ankiweb.net/when-problems-occur.html

1 Like

The error persists with the standard build. I’ve noticed an error that I somehow missed until now:

xdg-open: no method available for opening 'https://kanji.koohii.com/study/kanji/%E5%B1%95'

So I might just have messed up my xdg-open config… I’ll look into that.

Edit: Alright, I’ve looked into xdg-open. I get no such error message with xdg-open when using it normally. Executing
xdg-open 'https://kanji.koohii.com/study/kanji/%E5%B1%95'
just simply opens my browser once as intended. No errors whatsoever. Configs for xdg-open also look okay, but that’s such an unintuitive mess that I might just missed something.

I’ve looked a bit more into it. I think this is definitely an issue of my peculiar setup and has little to do with Anki itself.

1 Like

If someone for some reason has a similar issue to mine:
consider using either community/anki from the default Arch repsotories or anki-git from the AUR. anki-official binary-bundle from the AUR uses slightly outdated Qt libraries at compile time. At least outdated for idiots who use a bleeding edge distro like myself.

Multiple starts could be removed by invoking a wrapper script in .local/share/applications/browser.desktop to execute a script like this:

#!/bin/sh
qutebrowser $1 &

Yes it’s ugly and do not ask me why it works. But at least it does work.