[Bug]: Recurring error breaks functionality

Author: PrimeGoatCreated Jan 24, 2026Updated Apr 13, 2026
Labelsbugneeds-triage

Nanobrowser Version

0.1.13

Bug Description

I just got this extension and upon trying to use it, I randomly get this error:

` Cannot access a chrome-extension:// URL of different extension.

This is likely due to conflicting extensions. Please use Nanobrowser in a new profile.`

I think that some extra checks should be implemented to prevent this error from occurring. There's gotta be some way to avoid triggering it and skipping over whatever's access attempt is causing it to occur. After discussing it with ChatGPT, it ended up provising some suggestions. I will include them here just in case any of them are of use. I'm not famliar enough with your codebase to know how valid the suggestions are, and am including them just in case it contains anything helpful/useful. I don't know if you guys are already familiar with this kind of error or not, etc, so here it is: (AI generated content below):

  • Treat chrome-extension:// as a toxic origin everywhere: never navigate, attach, execute, or select as active frame.
  • Enforce a single global URL-scheme gate (allow only http/https) used by all subsystems.
  • Default to main-frame-only operations; never infer “current context” from focus or overlays.
  • Pin the main frame ID at navigation start; change frames only via explicit, whitelisted logic.
  • When enumerating frames or using CDP, drop any frame whose URL scheme is not http/https.
  • Handle about:blank defensively; resolve parent origin before touching.
  • On error "Cannot access a chrome-extension:// URL of different extension", mark context poisoned and fall back to shallow mode instead of aborting.
  • Isolate deep observation (frame trees, CDP eval) so failure degrades gracefully.
  • Prefer shallow observation paths (main DOM text, visible nodes, a11y tree, screenshot+vision).
  • Never select active frame based on “topmost” or injected UI.
  • Detect extension iframes by reading iframe.src in the main document only; never descend into them.
  • Add internal breadcrumbs before risky ops (API, tabId, frameId, best-known URL).
  • Provide a user-facing “safe mode” (main frame only, no frame enumeration/CDP).
  • Whitelist frames strictly by same-origin + http/https if frame support is required.

Steps to Reproduce

Just speaking to the AI or trying to do anything.

LLM Service Provider

OpenAI

Models Used

gpt-5.2

Screenshots

Image