fonol / anki-search-inside-add-card

An add-on providing full-text-search and PDF reading functionality to Anki's Add card dialog
https://ankiweb.net/shared/info/1781298089
GNU Affero General Public License v3.0
178 stars 24 forks source link

Reading queue stuck while trying open a pdf file #335

Closed karolszk closed 2 years ago

karolszk commented 2 years ago

When I ran from the Anki menu SIAC/Read first queue the plugin window appeared with centered message box saying " PDF.js was not loaded. Retrying (NaN / 5)" and stuck forever. The problem is repeatable.

Below the Anki's console output:

Starting main loop... [SIAC] on_webview_will_set_content() insert_scripts() on_load_note > right_side_html() JS info /_addons/1781298089/web/dist/siac.min.js:25 [SIAC] cacheFields(): .editing-area not found, retrying in 30ms. JS info /_addons/1781298089/web/dist/siac.min.js:25 [SIAC] cacheFields(): .editing-area not found, retrying in 30ms. JS info :14 [SIAC] right_side_html(): wrapping fields. [106845:106883:0714/222002.472203:ERROR:nss_util.cc(286)] After loading Root Certs, loaded==false: NSS error code: -8018 JS info /_addons/1781298089/web/dist/siac.min.js:25 [SIAC] cacheFields(): .editing-area not found, retrying in 30ms. [SIAC] setup_ui_after_index_built() JS info /_addons/1781298089/web/dist/siac.min.js:29 [SIAC] Mathjax typeset fn not found. JS error /_addons/1781298089/web/pdfjs/2.4.456/pdf.js:1105 Uncaught Error: Invalid parameter object: need either .data, .range or .url

Platform and program details as below:

Anki 2.1.54 (b6a7760c) Python 3.9.10 Qt 6.3.1 PyQt 6.3.1
Platform: Linux
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2022-07-14 20:26:08

===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
Searching PDF Reading  Note-Taking in Add Dialog ['1781298089', 2022-06-29T08:14, 'None', mod]

===IDs of active AnkiWeb add-ons===
1781298089

===Add-ons (inactive)===
(add-on provided name [Add-on folder, installed at, version, is config changed])

Regards,

karolszk commented 2 years ago

Additional remark: But, when I open Anki/Add dialog window, select Notes/Read Queue and select the PDF document then it opens successfully.

karolszk commented 2 years ago

Hello, is there any chance to look at this issue?

karolszk commented 2 years ago

Is it a pdf.js itself problem or siac? pdf.js the newset one is dfjs-2.15.349 in the mainstream.

karolszk commented 2 years ago

Thank you! Now its works.