Description
The JabRef Browser Extension fails to import some generic web pages when no specific Zotero translator appears to be detected.
For the example below, the extension popup remains stuck on:
Searching for bibliographic data...
The extension console reports:
JabRef: Error handling message in background.js Error: No translator paths provided
and:
Failed to send popupOpened message Error: No translator paths provided
Example URL
https://www.martinfowler.com/articles/exploring-gen-ai/tdd-in-the-agent-loop.html
Steps to reproduce
- Open the URL above in Firefox.
- Click the JabRef Browser Extension button.
- The popup remains stuck on
Searching for bibliographic data....
- Inspect the extension via
about:debugging.
- The extension console reports
Error: No translator paths provided.
Expected behavior
If no specific translator is available for the page, the extension should fall back to importing it as a simple web page reference instead of leaving the popup stuck.
Additional observations
- Importing an arXiv article with the same JabRef Browser Extension installation works correctly.
- Importing the example URL with the Zotero Firefox extension also works correctly.
- Zotero creates a web-page entry containing fields such as title, author, website title, URL, access date, abstract, and snapshot.
- This suggests that the communication between Firefox and JabRef is working correctly.
- The issue therefore appears to be specific to pages for which the JabRef Browser Extension does not find an applicable translator.
Possible cause
Looking at the handling of translatorsInfo, an empty translator array may be treated differently from a missing or undefined translatorsInfo.
If translatorsInfo is [], a check such as:
if (!info.translatorsInfo)
does not match, because an empty array is truthy in JavaScript/TypeScript.
If execution then reaches code that expects at least one translator, this could explain the observed:
Error: No translator paths provided
It may therefore be worth checking whether the fallback condition should also handle an empty translator array, for example:
if (!info?.translatorsInfo?.length)
so that pages without an applicable translator are handled by the simple web-page fallback.
This is only a suggested cause based on the observed behavior and the current control flow.
Environment
- JabRef: 5.15
- JabRef Browser Extension: 3.2.2
- Firefox: 154.0
- OS: macOS Tahoe
Description
The JabRef Browser Extension fails to import some generic web pages when no specific Zotero translator appears to be detected.
For the example below, the extension popup remains stuck on:
Searching for bibliographic data...The extension console reports:
and:
Example URL
https://www.martinfowler.com/articles/exploring-gen-ai/tdd-in-the-agent-loop.html
Steps to reproduce
Searching for bibliographic data....about:debugging.Error: No translator paths provided.Expected behavior
If no specific translator is available for the page, the extension should fall back to importing it as a simple web page reference instead of leaving the popup stuck.
Additional observations
Possible cause
Looking at the handling of
translatorsInfo, an empty translator array may be treated differently from a missing or undefinedtranslatorsInfo.If
translatorsInfois[], a check such as:does not match, because an empty array is truthy in JavaScript/TypeScript.
If execution then reaches code that expects at least one translator, this could explain the observed:
It may therefore be worth checking whether the fallback condition should also handle an empty translator array, for example:
so that pages without an applicable translator are handled by the simple web-page fallback.
This is only a suggested cause based on the observed behavior and the current control flow.
Environment