Menu

#1667 Fix debugger example to use Fetch.enable with URL patterns to prevent…

open
nobody
None
2026-04-18
2026-04-18
Anonymous
No

Originally created by: Shreyans-704

Closes [#1236]

Summary

Fix the debugger sample to prevent the runtime error:
"Unchecked runtime.lastError: Cannot access a chrome-extension:// URL of different extension."

Problem

The current implementation uses Fetch.enable without restricting URL patterns, causing it to intercept all requests — including chrome-extension:// URLs.

Chrome does not allow extensions to access resources of other extensions, which leads to the runtime error when such requests are intercepted.

Solution

Restrict Fetch.enable to only intercept valid web requests (http and https) by updating the URL patterns:

javascript
patterns: [
{ urlPattern: 'http:///*' }
]

Related

Tickets: #1236

Discussion


Log in to post a comment.