Skip to content

"DOMParser is not defined" in service worker after recent update (Brave/Chrome) - Pages fail to be saved #558

@cjgb

Description

@cjgb

Bug description

After the most recent extension update (2026-05-01 to version 1.23.3), saving pages fails with the following error in the service worker console:

Error in event handler: ReferenceError: DOMParser is not defined
    at listener (chrome-extension://.../js/browser-content-fetch/browser-content-fetch.js:32:28)

Steps to reproduce

  1. Install/update Wallabagger on a Chromium-based browser (Brave)
  2. Navigate to any page
  3. Click the W icon to save the page

Expected behaviour

Page is saved to wallabag.

Actual behaviour

Save fails silently. The error above appears in the service worker DevTools
(brave://extensions → Wallabagger → Service Worker → Console).

Root cause?

DOMParser is a DOM API unavailable in MV3 service workers. It was available
in MV2 background pages, so this is likely a regression introduced when
browser-content-fetch logic was moved to or called from the service worker context.

Environment

  • Wallabagger version: 1.23.3
  • Browser: Brave
  • OS: ArchLinux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions