Anki-android: HTML/CSS rendering error: chromium error "Failed to read the 'rules' property"

Created on 28 Jan 2018  路  5Comments  路  Source: ankidroid/Anki-Android

Research

Enter an [ x ] character to confirm the points below:

[ x] I have read the support page and am reporting a bug or enhancement request specific to AnkiDroid

[ x] I have checked the manual and the FAQ and could not find a solution to my issue

[ x] I have searched for similar existing issues here and on the user forum

Reproduction Steps

Anki 2.8.3

  1. Import this deck: https://ankiweb.net/shared/info/1907668496
  2. Preview/display any card
Expected Result

Pinyin should be tone-marked (which is generated from tone-numbered pinyin by JS).

Actual Result

Pinyin is tone-numbered instead

Debug info

I/chromium: [INFO:CONSOLE(82)] "Uncaught SecurityError: Failed to read the 'rules' property from 'CSSStyleSheet': Cannot access rules", source: file:///storage/emulated/0/AnkiDroid/collection.media/__viewer__.html (82)

Note - this problem does not occur on the Anki desktop app for Mac (2.0.47).

Maybe this is useful: https://stackoverflow.com/a/24473183/1275265

Most helpful comment

I downloaded the new shared deck and merged the updated functions into the deck and it resolved the issue. Thank you!

All 5 comments

Having the same issue. Not only is the pinyin ignored, but the Chinese characters are showing in Simplified instead of Traditional. Please help, this makes it impossible to continue studying and my backlog is getting quite huge...

If you are using Hanping dictionary, then please reset your templates/styles (from Hanping's AnkiDroid Setttings screen). If you are using the Hanping Chinese HSK shared deck then please redownload (because the latest version has fixed templates). Otherwise, please email our support.

I downloaded the new shared deck and merged the updated functions into the deck and it resolved the issue. Thank you!

Is this still an issue? In current alpha local/debug builds I've opened up HTML/CSS/JS debugging greatly by spitting out the rendered HTML onto the device filesystem every time HTML is rendered, and turning on remote webview debugging (docs to use it are on the wiki)

I didn't hear feedback but please reopen if this is an AnkiDroid issue - the new HTML debugging capabilities can be used to demonstrate the problem https://github.com/ankidroid/Anki-Android/wiki/Development-Guide#html-javascript-inspection

Was this page helpful?
0 / 5 - 0 ratings