dotnet / dotnet/runtime

[Browser] System.InvalidOperationException: A command response was not received: Target.setAutoAttach

Open
#130,054 4 comments 0 reactions 0 assignees View on GitHub
arch-wasm area-Infrastructure-libraries Known Build Error os-browser
Dominant language
C#
Stars
18.3k
Forks
5.6k
PR merge metrics
PR metrics pending

Description

```
[17:11:42] info: Closing 1 browser tabs before setting the main tab to config page and quitting.
[17:11:54] crit: OpenQA.Selenium.WebDriverException: Unexpected error creating WebSocket DevTools session.
---> System.InvalidOperationException: A command response was not received: Target.setAutoAttach
at OpenQA.Selenium.DevTools.DevToolsSession.SendCommand(String commandName, JToken params, CancellationToken cancellationToken, Nullable`1 millisecondsTimeout, Boolean throwExceptionIfResponseNotReceived)
at OpenQA.Selenium.DevTools.DevToolsSession.SendCommand[TCommand,TCommandResponse](TCommand command, CancellationToken cancellationToken, Nullable`1 millisecondsTimeout, Boolean throwExceptionIfResponseNotReceived)
at OpenQA.Selenium.DevTools.Target.TargetAdapter.SetAutoAttach(SetAutoAttachCommandSettings command, CancellationToken cancellationToken, Nullable`1 millisecondsTimeout, Boolean throwExceptionIfResponseNotReceived)
at OpenQA.Selenium.Chromium.ChromiumDriver.CreateDevToolsSession()
--- End of inner exception stack trace ---
at OpenQA.Selenium.Chromium.ChromiumDriver.CreateDevToolsSession()
at Microsoft.DotNet.XHarness.CLI.Commands.Wasm.WasmBrowserTestRunner.RunTestsWithWebDriver(DriverService driverService, IWebDriver driver) in /_/src/Microsoft.DotNet.XHarness.CLI/Commands/WASM/Browser/WasmBrowserTestRunner.cs:line 75
at Microsoft.DotNet.XHarness.CLI.Commands.Wasm.WasmTestBrowserCommand.InvokeInternal(ILogger logger) in /_/src/Microsoft.DotNet.XHarness.CLI/Commands/WASM/Browser/WasmTestBrowserCommand.cs:line 86
at Microsoft.DotNet.XHarness.CLI.Commands.Wasm.WasmTestBrowserCommand.InvokeInternal(ILogger logger) in /_/src/Microsoft.DotNet.XHarness.CLI/Commands/WASM/Browser/WasmTestBrowserCommand.cs:line 152
at Microsoft.DotNet.XHarness.CLI.Commands.XHarnessCommand`1.Invoke(IEnumerable`1 arguments) in /_/src/Microsoft.DotNet.XHarness.CLI/Commands/XHarnessCommand.cs:line 145
XHarness exit code: 71 (GENERAL_FAILURE)
```

## Build Information
Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1488119
Build error leg or test failing: WasmTestOnChrome-CLR-ST-Batch-2.WorkItemExecution
Pull request: https://github.com/dotnet/runtime/pull/130015

## Error Message

**DO NOT USE JSON BELOW IF THIS IS A BUILD BREAK** otherwise build analysis will allow pull requests to merge that break the build worse. For a build break, do not use this issue form. Make a regular new issue.

Fill the error message using [step by step known issues guidance](https://github.com/dotnet/arcade/blob/main/Documentation/Build%20Analysis/KnownIssueJsonStepByStep.md).

```json
{
"ErrorMessage": "System.InvalidOperationException: A command response was not received: Target.setAutoAttach",
"ErrorPattern": "",
"BuildRetry": true,
"ExcludeConsoleLog": false
}
```

### Known issue validation
**Build: :mag_right:** https://dev.azure.com/dnceng-public/public/_build/results?buildId=1488119
**Error message validated:** `[System.InvalidOperationException: A command response was not received: Target.setAutoAttach`]
**Result validation:** :white_check_mark: Known issue matched with the provided build.
**Validation performed at:** 6/30/2026 8:00:12 PM UTC

### Report

|Build|Repository|Test|Pull Request|
|---|---|---|---|
|[1488119](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1488119)|dotnet/runtime|[WasmTestOnChrome-CLR-ST-Batch-2.WorkItemExecution](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1488119&view=ms.vss-test-web.build-test-results-tab&runId=41058388&resultId=178212)|dotnet/runtime#130015|
#### Summary
|24-Hour Hit Count|7-Day Hit Count|1-Month Count|
|---|---|---|
|0|1|1|

### Report
#### Summary
|24-Hour Hit Count|7-Day Hit Count|1-Month Count|
|---|---|---|
|0|0|0|

Contributor guide

Open the contributing guide

Research direction

Start with WasmBrowserTestRunner.cs at line 75 and WasmTestBrowserCommand.cs at lines 86 and 152, then inspect the WasmTestOnChrome-CLR-ST-Batch-2.WorkItemExecution failure. Reproduce or analyze the WebDriver DevTools session error around Target.setAutoAttach; done means the browser test leg completes without this exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, wasm
Domain
testing-qa, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.