SeleniumHQ/selenium · error · Error
Params must be an instance of ContinueResponseParameters. Re
Error message
Params must be an instance of ContinueResponseParameters. Received:'${params}' What it means
Thrown by Network.continueResponse() when params is not an instance of ContinueResponseParameters. The method serializes via params.asMap() to emit the network.continueResponse BiDi command, so only that exact class is accepted. Other types (plain objects, ContinueRequestParameters, etc.) fail the instanceof check.
Source
Thrown at javascript/selenium-webdriver/bidi/network.js:332
const command = {
method: 'network.continueRequest',
params: Object.fromEntries(params.asMap()),
}
await this.bidi.send(command)
}
/**
* Continues the network response with the given parameters.
*
* @param {ContinueResponseParameters} params - The parameters for continuing the response.
* @throws {Error} If params is not an instance of ContinueResponseParameters.
* @returns {Promise<void>} A promise that resolves when the command is sent.
*/
async continueResponse(params) {
if (!(params instanceof ContinueResponseParameters)) {
throw new Error(`Params must be an instance of ContinueResponseParameters. Received:'${params}'`)
}
const command = {
method: 'network.continueResponse',
params: Object.fromEntries(params.asMap()),
}
await this.bidi.send(command)
}
/**
* Provides a response for the network.
*
* @param {ProvideResponseParameters} params - The parameters for providing the response.
* @throws {Error} If params is not an instance of ProvideResponseParameters.
* @returns {Promise<void>} A promise that resolves when the command is sent.
*/
async provideResponse(params) {View on GitHub (pinned to aa36b38e69)
Solutions
- Construct ContinueResponseParameters with the network id, set any overrides (headers, statusCode, reasonPhrase), then call continueResponse(params).
- Pass the Parameters instance, not the bare network/response id.
- Verify you are using ContinueResponseParameters (for continueResponse), not ContinueRequestParameters or ProvideResponseParameters.
Example fix
// before await network.continueResponse(event.response.request) // after const params = new ContinueResponseParameters(event.response.request) .statusCode(200) await network.continueResponse(params)
Defensive patterns
Strategy: type-guard
Validate before calling
if (!(params instanceof ContinueResponseParameters)) {
throw new TypeError('continueResponse requires ContinueResponseParameters')
} Type guard
function isContinueResponseParameters(v) {
return v instanceof ContinueResponseParameters
} Try / catch
try {
await network.continueResponse(params)
} catch (e) {
if (/instance of ContinueResponseParameters/.test(e.message)) {
// rebuild as ContinueResponseParameters
} else throw e
} Prevention
- Confirm the class matches the method: ContinueResponseParameters for continueResponse.
- Build the parameters from the event's network/response id in the handler.
- Avoid reusing a request-parameters object for a response call.
When it happens
Trigger: Calling network.continueResponse({...}) with a plain object; passing the request id string directly; passing a ProvideResponseParameters or ContinueRequestParameters object by mistake.
Common situations: Handling a responseStarted/authRequired event and passing the raw event object instead of a ContinueResponseParameters instance; confusing continueResponse with continueRequest or provideResponse.
Related errors
- Params must be an instance of AddInterceptParameters. Receiv
- Params must be an instance of ContinueRequestParameters. Rec
- Params must be an instance of ProvideResponseParameters. Rec
- Pattern must be an instance of UrlPattern. Received: '${patt
- Pattern must be an instance of UrlPattern. Received:'${patte
AI-assisted analysis of SeleniumHQ/selenium@aa36b38e69 (2026-08-14).
Data as JSON: /api/errors/2d2bc55469a3cdeb.
Report an issue: GitHub.