[🐛 Bug]: network.continueRequest() hangs navigation in Chrome
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- javascript, node.js
- Domain
- networking, testing-qa
Research direction
Start by running test/chrome-bug/index.js with the reported Chrome version and compare its output with Firefox. Trace the network.beforeRequestSent() and network.continueRequest() entry points shown in the reproduction. Done means Chrome navigation completes after the intercepted request is continued with the added header, without regressing Firefox.
Written by the indexing model from the issue text.
Description
Description
When intercepting a request in network.beforeRequestSent() and calling network.continueRequest(), Chrome hangs on navigation.
The same script works correctly in Firefox.
My Chrome version: 147.0.7727.117 (Official Build) (arm64)
Reproducible Code
/**
* Reproduction of the bug in Chrome with network interception.
* Usage:
* node test/chrome-bug/index.js
*/
import { before, after, it } from 'node:test';
import { setTimeout as delay } from 'timers/promises';
import { Builder } from 'selenium-webdriver';
import { Network as getNetwork } from 'selenium-webdriver/bidi/network.js';
import chrome from 'selenium-webdriver/chrome.js';
import firefox from 'selenium-webdriver/firefox.js';
import { Header, BytesValue } from 'selenium-webdriver/bidi/networkTypes.js';
import { AddInterceptParameters } from 'selenium-webdriver/bidi/addInterceptParameters.js';
import { ContinueRequestParameters } from 'selenium-webdriver/bidi/continueRequestParameters.js';
import { InterceptPhase } from 'selenium-webdriver/bidi/interceptPhase.js';
const driver = await new Builder()
.forBrowser('chrome')
.setChromeOptions(new chrome.Options().enableBidi())
// Uncomment to check with firefox
// .forBrowser('firefox')
// .setFirefoxOptions(new firefox.Options().enableBidi())
.build();
const network = await getNetwork(driver);
const url = 'https://httpbin.org/headers';
await network.addIntercept(
new AddInterceptParameters(InterceptPhase.BEFORE_REQUEST_SENT).urlStringPattern(url),
);
await network.beforeRequestSent(async (event) => {
const request = event.request;
const requestId = request.request;
console.log('Intercepted request:', request.url, requestId);
const params = new ContinueRequestParameters(requestId).headers([
...request.headers,
new Header('X-Test-Header', new BytesValue('string', 'TestValue')),
]);
await network.continueRequest(params);
});
await driver.get(url);
Debugging Logs
Logs when using Chrome:
node test/chrome-bug/index.js
Intercepted request: https://httpbin.org/headers C591722C28CC191789B1E6978DDC1B79
^C
Logs when using Firefox:
node test/chrome-bug/index.js
Intercepted request: https://httpbin.org/headers 11-3038625a-6b4d-4704-9e1c-096a4119c324
Intercepted request: https://httpbin.org/favicon.ico 35-3038625a-6b4d-4704-9e1c-096a4119c324
^C
- Dominant language
- Java
- Stars
- 34.6k
- Forks
- 8.7k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 107
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SeleniumHQ/selenium
-
C-py I-defect
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
SeleniumHQ/selenium#18438 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
SeleniumHQ/selenium#18323 · 1 comment ·
Maintainers usually reply within 1 day
-
B-build C-py I-enhancement
Difficulty 4/5 3-5 days Newbie friendliness 68/100
SeleniumHQ/selenium#18435 · 1 comment ·
Maintainers usually reply within 1 day
-
[🐛 Bug]: Bindings change the user's options when Selenium Manager supplies a browserPossibly taken @Liz-Lian claimed this 2 days ago. OpenC-dotnet C-java C-nodejs C-py C-rb I-defect
Difficulty 4/5 3-5 days Newbie friendliness 45/100
SeleniumHQ/selenium#18428 ·
Maintainers usually reply within 1 day
-
[🐛 Bug]: [rust] Selenium Manager can return a browser from the cache before it finishes copyingPossibly taken @Liz-Lian claimed this 2 days ago. OpenC-rust I-defect
Difficulty 3/5 1-2 days Newbie friendliness 65/100
SeleniumHQ/selenium#18427 ·
Maintainers usually reply within 1 day
All issues in SeleniumHQ/selenium
Similar issues
-
area-integrations
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
? - Needs Triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
NVIDIA/cudf-spark-jni#5598 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
oracle/graalvm-reachability-metadata#12264 ·
Maintainers usually reply within 1 day
-
[source-facebook-pages] post stream never returns attachments.media_typePossibly taken @v-k-data claimed this today. Openarea/connectors needs-triage type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
[BUG] AppSync: GetIntrospectionSchema wraps the schema in JSON instead of returning the raw SDL bodyOpen
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
floci-io/floci#10107 · 1 comment ·
Maintainers usually reply within 1 day