{"record":{"id":"9c122dd1f83c11a2","repo":"microsoft/playwright","slug":"path-channels-are-not-expected-in-sockssupport","errorCode":null,"errorMessage":"${path}: channels are not expected in SocksSupport","messagePattern":"(.+?): channels are not expected in SocksSupport","errorType":"validation","errorClass":"ValidationError","httpStatus":null,"severity":"error","filePath":"packages/playwright-core/src/server/socksInterceptor.ts","lineNumber":87,"sourceCode":"      this._ids.delete(message.id);\n      return true;\n    }\n    if (message.method === '__create__' && message.params.type === 'SocksSupport') {\n      this._socksSupportObjectGuid = message.params.guid;\n      return false;\n    }\n    if (this._socksSupportObjectGuid && message.guid === this._socksSupportObjectGuid) {\n      const validator = findValidator('SocksSupport', message.method, 'Event');\n      const params = validator(message.params, '', { tChannelImpl: tChannelForSocks, binary: 'fromBase64', isUnderTest });\n      this._channel.emit(message.method, params);\n      return true;\n    }\n    return false;\n  }\n}\n\nfunction tChannelForSocks(names: '*' | string[], arg: any, path: string, context: ValidatorContext) {\n  throw new ValidationError(`${path}: channels are not expected in SocksSupport`);\n}\n","sourceCodeStart":69,"sourceCodeEnd":89,"githubUrl":"https://github.com/microsoft/playwright/blob/c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6/packages/playwright-core/src/server/socksInterceptor.ts#L69-L89","documentation":"Playwright's SocksInterceptor validates every SocksSupport protocol message/event against a generated schema. The tChannelForSocks validator hook is invoked when the schema encounters a 'channel' (live object reference) field, but SocksSupport messages deliberately never carry channels. Seeing this error means a SocksSupport message contained a channel-typed field that the schema did not expect, signalling a malformed or out-of-spec message. It is an internal protocol integrity check, not an end-user configuration error.","triggerScenarios":"Triggered inside interceptMessage when findValidator('SocksSupport', method, 'Event') (or the 'Params' validator used for outgoing calls) walks the params and hits a channel-typed property. This can only happen if the remote browser process sends a SocksSupport event whose params include a 'channel'/'guid' object, or if the protocol.yml definition for SocksSupport was edited to add a channel field without updating tChannelForSocks.","commonSituations":"Version mismatch between a client and server build where protocol.yml was regenerated with a channel field on a SocksSupport event; an in-tree change to the SocksSupport protocol surface; a corrupted/intercepted websocket message. Not seen in normal proxy usage (SOCKS connections, browser launches through a proxy).","solutions":["If you modified protocol.yml or the SocksSupport channels, ensure no SocksSupport event/param carries a channel type, or extend tChannelForSocks to whitelist the specific channel.","If running a custom/local build, rebuild (npm run build) so generated channels.d.ts and validators match protocol.yml.","Confirm the client and server run the same Playwright version (mismatched builds emit incompatible message shapes)."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// No caller-side guard: this validates internal protocol integrity.\n// Ensure client and server share the same Playwright version before connecting:\nconst { version } = require('playwright-core/package.json');\nif (version !== expectedVersion) throw new Error(`version skew: ${version} vs ${expectedVersion}`);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep client and server on identical Playwright builds to avoid protocol message-shape drift.","After editing protocol.yml or SocksSupport channels, run npm run build so validators regenerate.","Do not hand-craft SocksSupport messages; always go through the generated channel."],"tags":["protocol","socks","validation","internal"],"backgroundTag":null,"analyzedSha":"c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6","analyzedAt":"2026-08-12T07:26:36.950Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}