GoogleChrome / GoogleChrome/chrome-extensions-samples
Debugger Example does not work
- Dominant language
- JavaScript
- Stars
- 17.8k
- Forks
- 9k
- Avg merge
- 21h
- Merged PRs (30d)
- 28
Description
**Describe the bug**
The debugger example gives: Unchecked runtime.lastError: Cannot access a chrome-extension:// URL of different extension.
Im pretty sure ```await chrome.debugger.sendCommand({ tabId }, 'Fetch.enable', { patterns: [/*...*/]})``` Is exactly what causes this.
```tabId``` comes from ```chrome.devtools.inspectedWindow.tabId```
**To Reproduce**
Clone the repo.
Install the debugger example
Go to a website.
Click the extension
Make a network request.
Notice this prints "Unchecked runtime.lastError: Cannot access a chrome-extension:// URL of different extension"
**Expected behavior**
This should work
**Screenshots**

Anything additional here. 🌈
This does not happen with Microsoft Edge.
Contributor guide
Research direction
Install and run the debugger example, then reproduce the error by opening a website, clicking the extension, and making a network request. Start at the chrome.debugger.sendCommand call using chrome.devtools.inspectedWindow.tabId; done means the request completes without the cross-extension runtime error, matching the behavior reported in Microsoft Edge.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100