{"record":{"id":"2cc588daacfbf385","repo":"microsoft/playwright","slug":"object-with-guid-arg-guid-was-not-bound-in-the","errorCode":null,"errorMessage":"Object with guid ${arg.guid} was not bound in the connection","messagePattern":"Object with guid (.+?) was not bound in the connection","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/playwright-core/src/client/connection.ts","lineNumber":305,"sourceCode":"    const validator = findValidator(object._type, method, 'Event');\n    (object._channel as any).emit(method, validator(params, '', this._validatorFromWireContext()));\n  }\n\n  close(cause?: string) {\n    if (this._closedError)\n      return;\n    this._closedError = new TargetClosedError(cause);\n    for (const callback of this._callbacks.values())\n      callback.reject(this._closedError);\n    this._callbacks.clear();\n    this.emit('close');\n  }\n\n  private _tChannelImplFromWire(names: '*' | string[], arg: any, path: string, context: ValidatorContext) {\n    if (arg && typeof arg === 'object' && typeof arg.guid === 'string') {\n      const object = this._objects.get(arg.guid)!;\n      if (!object)\n        throw new Error(`Object with guid ${arg.guid} was not bound in the connection`);\n      if (names !== '*' && !names.includes(object._type))\n        throw new ValidationError(`${path}: expected channel ${names.toString()}`);\n      return object._channel;\n    }\n    throw new ValidationError(`${path}: expected channel ${names.toString()}`);\n  }\n\n  private _createRemoteObject(parentGuid: string, type: string, guid: string, initializer: any): any {\n    const parent = this._objects.get(parentGuid);\n    if (!parent)\n      throw new Error(`Cannot find parent object ${parentGuid} to create ${guid}`);\n    const validator = findValidator(type, '', 'Initializer');\n    initializer = validator(initializer, '', this._validatorFromWireContext());\n    const factory = this._objectFactories.get(type);\n    if (!factory)\n      throw new Error('Missing type ' + type);\n    return factory(parent, type, guid, initializer);\n  }","sourceCodeStart":287,"sourceCodeEnd":323,"githubUrl":"https://github.com/microsoft/playwright/blob/c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6/packages/playwright-core/src/client/connection.ts#L287-L323","documentation":"Thrown in _tChannelImplFromWire when a channel-typed value arriving from the server references a guid (arg.guid) that is not in _objects. The validator expected an object reference, the wire gave one, but the client has no local proxy for it. This is a wire-reference integrity failure — the server named an object the client never created or has already lost.","triggerScenarios":"A response/event parameter validated as a TChannel names a guid that was either never sent via __create__ on the client, or was already disposed before this message. Can follow version skew (server emits objects the client doesn't model) or a create-after-dispose race.","commonSituations":"Client and server Playwright versions mismatched; a custom/patched server emits references to objects the client lacks; rapid dispose racing with method results that return object handles.","solutions":["Align client and server Playwright versions exactly.","If using a custom server, ensure every guid it references was first announced via __create__.","Avoid disposing objects whose handles may still be returned by in-flight calls.","Reproduce with DEBUG=pw:channel and inspect the missing guid's create/dispose order."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Caller cannot fix wire references directly, but can prevent the version skew that causes them.\nconst { version } = require('playwright-core/package.json');\nconst serverVersion = await fetchVersionFromServer(); // your own endpoint\nif (version !== serverVersion) throw new Error(`playwright client ${version} != server ${serverVersion}`);","typeGuard":null,"tryCatchPattern":"try {\n  await someCall();\n} catch (e) {\n  if (/was not bound in the connection/.test(String(e?.message))) {\n    await reconnectWithMatchedVersion();\n  } else throw e;\n}","preventionTips":["Pin client/server Playwright versions exactly.","Don't dispose objects whose handles may be returned by pending calls.","Avoid custom servers that emit references to unannounced objects."],"tags":["protocol","validation","version-mismatch","internal"],"backgroundTag":null,"analyzedSha":"c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6","analyzedAt":"2026-08-12T07:26:36.950Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}