[Bug]: First navigation aborts in headless mode with a fresh profile #2891

Open
opened 2026-11-11 00:16:59 +00:00 by nathaniel-yuri · 0 comments
nathaniel-yuri commented 2026-11-11 00:16:59 +00:00 (Migrated from github.com)

Operating system

Linux

Version

0.21.2.1 (Chromium 157.0.8103.50).

Have you tested that this is not an upstream issue or an issue with your configuration?

  • I have tried reproducing this issue in Chrome and it could not be reproduced there
  • I have tried reproducing this issue in ungoogled-chromium and it could not be reproduced there
  • I have tried reproducing this issue in Helium with a new and empty profile using --user-data-dir command line argument and it could not be reproduced there

Description

In headless mode with a fresh profile, the first CDP navigation can abort with net::ERR_ABORTED. The request does not reach the server.

Crash ID

No response

How to Reproduce?

Requires Linux, Node.js 22 or later, Python 3, and OpenSSL. In an empty working directory, save this as nav.mjs:

const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
let targets;
while (!targets) try { targets = await (await fetch("http://127.0.0.1:9222/json/list")).json(); } catch { await sleep(50); }
await sleep(500);
const ws = new WebSocket(targets.find((t) => t.type === "page").webSocketDebuggerUrl);
ws.onopen = () => ws.send(JSON.stringify({ id: 1, method: "Page.navigate", params: { url: "https://repro.test/" } }));
ws.onmessage = (e) => { console.log(e.data); process.exit(0); };

Run:

openssl req -x509 -newkey rsa:2048 -nodes -keyout k.pem -out c.pem -days 1 -subj /CN=repro.test
python3 -c 'import http.server as h,ssl;s=h.HTTPServer(("127.0.0.1",8443),h.SimpleHTTPRequestHandler);c=ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER);c.load_cert_chain("c.pem","k.pem");s.socket=c.wrap_socket(s.socket,server_side=True);s.serve_forever()' &
./helium-0.21.2.1-x86_64_linux/helium-wrapper --headless=new --remote-debugging-port=9222 --user-data-dir="$(mktemp -d)" --no-first-run --ignore-certificate-errors "--host-resolver-rules=MAP repro.test 127.0.0.1:8443, MAP * ~NOTFOUND" about:blank &
node nav.mjs

The bug only occurs on a profile's first launch. To repeat, stop helium and the server, then rerun the command (it creates a new profile each time).

Actual behavior

In both cases, uBlock reloads the tab once about 3 seconds after launch. The outcome depends on when navigation starts:

  • With the 500 ms wait: uBlock is already holding requests. When it releases the pending navigation and reloads the tab, the navigation is canceled with net::ERR_ABORTED. The tab stays on about:blank, and the server receives no GET /.
  • Without the wait: the navigation completes before requests are held. The page loads and the server receives GET /. The later reload causes a second GET /.

Expected behavior

One navigation, one GET /, no abort, and no reload.

Additional context

  • Replacing only the bundled uBlock component with a minimal manifest with the same extension ID and no background page, scripts, or permissions made the navigation succeed 5/5.
  • --disable-extensions does not unload the bundled uBlock component.
  • A hook showed the abort coincides with uBlock calling vAPI.tabs.reload from vAPI.Net.unsuspendAllRequests (vapi-background-dns.js:314), when it releases requests held during first-run startup; making that call a no-op made the navigation succeed 5/5.
  • This may be the same as #2673.
  • In headed Xvfb runs, a CDP navigation at about 0.5 seconds was held about 3 seconds, without an abort or reload. A URL passed on the command line loaded immediately. A real desktop was not tested.
### Operating system Linux ### Version 0.21.2.1 (Chromium 157.0.8103.50). ### Have you tested that this is not an upstream issue or an issue with your configuration? - [x] I have tried reproducing this issue in Chrome and it could not be reproduced there - [x] I have tried reproducing this issue in ungoogled-chromium and it could not be reproduced there - [ ] I have tried reproducing this issue in Helium with a new and empty profile using `--user-data-dir` command line argument and it could not be reproduced there ### Description In headless mode with a fresh profile, the first CDP navigation can abort with `net::ERR_ABORTED`. The request does not reach the server. ### Crash ID _No response_ ### How to Reproduce? Requires Linux, Node.js 22 or later, Python 3, and OpenSSL. In an empty working directory, save this as `nav.mjs`: ```js const sleep = (ms) => new Promise((r) => setTimeout(r, ms)); let targets; while (!targets) try { targets = await (await fetch("http://127.0.0.1:9222/json/list")).json(); } catch { await sleep(50); } await sleep(500); const ws = new WebSocket(targets.find((t) => t.type === "page").webSocketDebuggerUrl); ws.onopen = () => ws.send(JSON.stringify({ id: 1, method: "Page.navigate", params: { url: "https://repro.test/" } })); ws.onmessage = (e) => { console.log(e.data); process.exit(0); }; ``` Run: ```sh openssl req -x509 -newkey rsa:2048 -nodes -keyout k.pem -out c.pem -days 1 -subj /CN=repro.test python3 -c 'import http.server as h,ssl;s=h.HTTPServer(("127.0.0.1",8443),h.SimpleHTTPRequestHandler);c=ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER);c.load_cert_chain("c.pem","k.pem");s.socket=c.wrap_socket(s.socket,server_side=True);s.serve_forever()' & ./helium-0.21.2.1-x86_64_linux/helium-wrapper --headless=new --remote-debugging-port=9222 --user-data-dir="$(mktemp -d)" --no-first-run --ignore-certificate-errors "--host-resolver-rules=MAP repro.test 127.0.0.1:8443, MAP * ~NOTFOUND" about:blank & node nav.mjs ``` The bug only occurs on a profile's first launch. To repeat, stop helium and the server, then rerun the command (it creates a new profile each time). ### Actual behavior In both cases, uBlock reloads the tab once about 3 seconds after launch. The outcome depends on when navigation starts: - **With the 500 ms wait:** uBlock is already holding requests. When it releases the pending navigation and reloads the tab, the navigation is canceled with `net::ERR_ABORTED`. The tab stays on `about:blank`, and the server receives no `GET /`. - **Without the wait:** the navigation completes before requests are held. The page loads and the server receives `GET /`. The later reload causes a second `GET /`. ### Expected behavior One navigation, one `GET /`, no abort, and no reload. ### Additional context - Replacing only the bundled uBlock component with a minimal manifest with the same extension ID and no background page, scripts, or permissions made the navigation succeed 5/5. - `--disable-extensions` does not unload the bundled uBlock component. - A hook showed the abort coincides with uBlock calling `vAPI.tabs.reload` from `vAPI.Net.unsuspendAllRequests` (`vapi-background-dns.js:314`), when it releases requests held during first-run startup; making that call a no-op made the navigation succeed 5/5. - This may be the same as [#2673](https://github.com/imputnet/helium/issues/2673). - In headed Xvfb runs, a CDP navigation at about 0.5 seconds was held about 3 seconds, without an abort or reload. A URL passed on the command line loaded immediately. A real desktop was not tested.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
imputnet/helium#2891
No description provided.