Many pages (webviews?) are not working

Running Anki Desktop 23.12.1 on Windows 10, many pop-ups which I’m assuming given their content are webviews are not rendering. They open, but just display a raw HTML header, presumably awaiting attachment by a web framework that never arrives. Tried this using both the Qt5 and 6 builds available via the installer, as well as cloning and building myself.

So far I’ve encountered the import dialog, the statistics window, and the deck options window, and I’m not actually certain that all are failing for the same reason. I’ve tried to run the chrome debugger, and unfortunately it doesn’t work, as apparently the remote-allow-origins flag is being ignored and I’m not familiar enough with the tool to figure out why. All I can say is that at least in the case of deck-options there’s an uncaught error, “anki is not defined”. I don’t see anything in the terminal for the other pages.

Could you please provide some screenshots of what you’re seeing? Do you use any antivirus/firewall/VPN/etc software that might be intercepting Anki’s (internal) network connections?

They’re all just raw HTML, for example the deck-options page:

where I do get the output anki is not defined in the terminal running the app. All other pages look the same as this but pointed to their respective pages.

As far as I’m aware, I don’t have any antivirus (besides the Windows default ones, which I tried disabling to no effect) or VPN running which could interfere with this.

Update, in the process of filling this out I did realise that my browser was blocking all CORS requests for some reason and by disabling that the browser inspector does actually work now. So, looks like the error for deck-options is on the line

const $deckOptions = anki.setupDeckOptions({self._deck["id"]});

in qt/aqt/ In the case of the Stats page, though, there’s no error in the console either. I’m not sure if this is to be expected given the nature of the app, but I don’t see any other source files being pulled besides the HTML document.

I don’t see how this would even work, but I’m assuming the webview isn’t doing something like opening an instance of my actual default browser somehow, otherwise I could see how that might be a problem given the security protections it has.

In the windows that pop-up, do they have menus/icons that look like your browser, or do they only have the HTML text you included above?

If the latter, perhaps the issue is your machine is sending the wrong content type for .html files, like in this issue:

Yep. That was it. .html was set to text/plain, possibly by my editor. Changed it to text/html and now the views work properly. So I guess this issue can be considered resolved, although I personally would advocate for untangling those so as to not have to manually update the registry to get the app to work. But in any case, thank you for your assistance, I appreciate it!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.