JabRef / JabRef/JabRef-Browser-Extension

Firefox: No translator paths provided when importing a generic web page

Open Beginner friendly
#720 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Open the URL above in Firefox.
  2. Click the JabRef Browser Extension button.
  3. The popup remains stuck on Searching for bibliographic data....
  4. Inspect the extension via about:debugging.
  5. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.