JabRef / JabRef/JabRef-Browser-Extension
Firefox: No translator paths provided when importing a generic web page
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 96
- Forks
- 28
- Avg merge
- 2h 50m
- Merged PRs (30d)
- 14
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the background.js message-handling path that consumes translatorsInfo, and reproduce the example URL in Firefox to confirm the empty-array case. Done means a page with no applicable translator no longer leaves the popup stuck and instead produces the simple web-page reference fallback.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100