openai / openai/codex

[macOS][Codex Desktop][In-app Browser] Browser Use leaves blob: iframes empty after navigation or reload

Open
#42,699 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app browser bug
Dominant language
Rust
Stars
125k
Forks
19.5k
PR merge metrics
PR metrics pending

Description

What version of the Codex App are you using (From “About Codex” dialog)?

26.901.22334 (build 7746)

What subscription do you have?

Pro plan

What platform is your computer?

Darwin 25.6.0 arm64 arm

What issue are you seeing?

When Browser Use controls a navigation or reload in the Codex built-in browser, an iframe whose src is a browser-generated blob: URL can remain on its initial empty about:blank document.

The parent page loads correctly and its JavaScript continues running. The iframe element receives a valid blob:http://... source, but the generated document never becomes available inside it.

The failed iframe consistently has:

  • HTML length: 39 bytes
  • Body children: 0
  • Stylesheets: 0
  • Content: <html><head></head><body></body></html>
  • Document URL: about:blank
  • The iframe src attribute still contains the expected blob:http://... URL

The behavior depends on how navigation happens:

  • Opening the page manually before Browser Use attaches allows the blob iframe to load.
  • Direct navigation performed by Browser Use leaves the blob iframe empty.
  • Reloading a healthy page through Browser Use leaves the new blob iframe empty.
  • Playwright controlling the same installed system Chrome loads blob iframes correctly after direct navigation and reload.

A srcdoc iframe on the same minimal test page renders correctly during Browser Use navigation. The equivalent blob: iframe remains empty.

This suggests the problem is in the Codex Browser Use iframe navigation or instrumentation lifecycle. It does not appear to be a general Chrome or Playwright problem.

What steps can reproduce the bug?
  1. Save the following as index.html:
<!doctype html>
<html>
	<body>
		<h1>Iframe test</h1>

		<h2>srcdoc</h2>
		<iframe id="srcdoc-frame"></iframe>

		<h2>blob</h2>
		<iframe id="blob-frame"></iframe>

		<script>
			const html = `<!doctype html>
				<html>
					<head>
						<style>
							body {
								color: green;
							}
						</style>
					</head>
					<body>
						<p>Iframe loaded</p>
					</body>
				</html>`;

			document.querySelector('#srcdoc-frame').srcdoc = html;

			document.querySelector('#blob-frame').src = URL.createObjectURL(
				new Blob([html], { type: 'text/html' })
			);
		</script>
	</body>
</html>
  1. Serve the file over local HTTP:
python3 -m http.server 9421 --bind 127.0.0.1
  1. Ask Browser Use to navigate a Codex built-in browser tab to http://127.0.0.1:9421/.
  2. Observe that the srcdoc iframe renders Iframe loaded.
  3. Observe that the blob iframe remains empty.
  4. Inspect both frames from the parent page:
[...document.querySelectorAll('iframe')].map((iframe) => {
	const document = iframe.contentDocument;

	return {
		id: iframe.id,
		src: iframe.src,
		documentUrl: document?.location.href,
		htmlLength: document?.documentElement?.outerHTML.length,
		bodyChildren: document?.body?.children.length,
		stylesheets: document?.styleSheets.length,
	};
});
  1. Observe that the blob iframe has a blob:http://... source while its document remains the empty 39-byte about:blank document.
  2. Reload the page through Browser Use and observe the same result.
What is the expected behavior?

Browser Use navigation and reload should not change iframe loading behavior. A same-origin blob: iframe should load its generated document and fire the normal lifecycle events, as it does in Chrome without Browser Use instrumentation.

Additional information

This was originally discovered in the WordPress Gutenberg editor. Gutenberg uses a generated blob: iframe for the editor canvas. When the failure occurs, the wp-admin shell loads but the complete visual editor remains blank.

The WordPress reproduction was confirmed on WordPress 7.1:

  • Manual opening: 160,527-byte iframe, 21 body children, 60 stylesheets
  • Browser Use navigation: 39-byte iframe, zero body children, zero stylesheets
  • Browser Use reload: 39-byte iframe, zero body children, zero stylesheets
  • Playwright with system Chrome, direct navigation: 160,538-byte iframe, 21 body children, 60 stylesheets
  • Playwright with system Chrome, reload: 160,538-byte iframe, 21 body children, 60 stylesheets
  • The failure reproduces with every WordPress plugin disabled

Gutenberg issue:

Related Codex issues:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the minimal index.html reproduction and serve it using python3 -m http.server 9421 --bind 127.0.0.1. Compare Browser Use navigation and reload with manual opening and Playwright controlling system Chrome, then inspect the Browser Use iframe navigation and instrumentation lifecycle. Done means same-origin blob: iframes load their generated document and fire normal lifecycle events during navigation and reload.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, playwright
Domain
desktop, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.