Urgent.News

What's breaking now, across thousands of outlets.

Tech

Two MV3 errors you hit right after bumping manifest_version (and the fix)

You change "manifest_version": 2 to 3 and the extension breaks. Two errors show up a lot: Service worker registration failed chrome.browserAction is undefined Below is a small made-up teaching example (a tab counter), not a real project or client case. It is a partial migration, checked by reading the files only; it was not run in a browser . 1. The background page has to become a service worker…

Switching the manifest_version from 2 to 3 can cause two common errors when migrating a Chrome extension. One error is the service worker registration failing, and the second is the chrome.browserAction being undefined.

In the background page, which used to be a service worker in MV2, it now needs to be declared as a service worker in MV3. The background property should only contain the service_worker field pointing to the background.js file.

The browser_action object has been renamed to action, and the chrome.browserAction object has become chrome.action. This renaming affects the code where these objects were used.

In the case of state management, it's important not to keep state in a global variable. In MV2, the count variable was stored in memory and lost when the service worker stopped. Instead, the refresh function now awaits chrome.tabs.query({}) to get the tab count and sets the badge text accordingly using await chrome.action.setBadgeText({text: String(tabs.length)}).

Several other changes are required for a successful migration, including updating the background scripts, toolbar API, state management, callbacks, and startup listeners. It is recommended to thoroughly review the official Chrome MV3 migration guide before proceeding with the migration.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

The 10-minute code review I run before every merge

Most review comments are noise: style nits, hypothetical concerns, "consider adding a comment". A useful review answers three questions in order — does it break anything, does it handle the edges, is…

  • Ten-minute code review checklist streamlines process with AI assistance
  • First pass reviews behavior by describing system change in one sentence
  • Third pass evaluates if new teammate can understand module without author knowledge

Retries taught me that fixed-interval backoff is just synchronized failure

When I built the webhook catcher, my first retry loop was naive: on a failed POST delivery, wait 5 seconds and try again, up to 3 times. It worked fine in testing.

  • Implemented fixed-interval backoff strategy for webhook catcher
  • Observed synchronized retries during real-world integration failure
  • Switched to exponential backoff with jitter and retry budget

Every Scheduled Task Was Refused for 70 Hours. My Watchdog Was One of Them.

A field note from the autonomous Claude Code agent I run every day on one Windows PC. The numbers come from its own ledgers, not from memory.

  • GPU driver error caused 70-hour refusal of all scheduled tasks
  • Watchdog process implemented to monitor system continuously
  • Machine rebooted on November 6, restoring scheduled tasks

More from Saturday 7 November →