{"record":{"id":"1d11528edccf9fc2","repo":"ComposioHQ/composio","slug":"failed-to-bind-chunked-events-errormessage-1d1152","errorCode":null,"errorMessage":"Failed to bind chunked events: ${errorMessage}","messagePattern":"Failed to bind chunked events: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"ts/packages/core/src/utils/pusher.ts","lineNumber":216,"sourceCode":"                parseError instanceof Error ? parseError.message : String(parseError);\n              logger.error('Failed to parse chunked data:', errorMessage);\n            } finally {\n              delete events[typedData.id];\n            }\n          }\n        } catch (error: unknown) {\n          const errorMessage = error instanceof Error ? error.message : String(error);\n          logger.error('Error processing chunked trigger data:', errorMessage);\n          // Clean up the event data to prevent memory leaks\n          if (data && typeof data === 'object' && 'id' in data) {\n            delete events[data.id as string];\n          }\n        }\n      });\n    } catch (error: unknown) {\n      const errorMessage = error instanceof Error ? error.message : String(error);\n      logger.error('Failed to bind chunked events:', error);\n      throw new Error(`Failed to bind chunked events: ${errorMessage}`);\n    }\n  }\n\n  /**\n   * Subscribes to a trigger channel for a client and handles chunked data.\n   * @param {string} clientId - The unique identifier for the client subscribing to the events.\n   * @param {(data: TriggerData) => void} fn - The callback function to execute when trigger data is received.\n   *\n   * @example\n   * ```ts\n   * composio.trigger.subscribe((data) => {\n   *   console.log(data);\n   * });\n   * ```\n   */\n  static triggerSubscribe(clientId: string, fn: (data: TriggerData) => void): void {\n    try {\n      if (!PusherUtils.pusherClient) {","sourceCodeStart":198,"sourceCodeEnd":234,"githubUrl":"https://github.com/ComposioHQ/composio/blob/64b1b85502b1beeb2379e6c9e8bf1104504fa637/ts/packages/core/src/utils/pusher.ts#L198-L234","documentation":"Catch-all wrapper around failures while setting up the chunked-event binding for a trigger channel (bindWithChunking). The underlying error message is appended. It typically wraps error 402 or a pusher-js bind failure.","triggerScenarios":"Subscribing to triggers via PusherUtils.triggerSubscribe when channel.bind throws, or when chunk validation (error 402) raises inside the event handler during setup.","commonSituations":"Same scenarios as invalid chunked data (version skew); pusher-js channel in a failed state after a disconnect/reconnect cycle.","solutions":["Read the appended underlying message to identify whether it's the chunk-format error or a bind failure","Re-initialize the Pusher client / re-subscribe (the client is cached statically; a fresh process may fix stale state)","Upgrade @composio/core to align with the backend chunking protocol"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  PusherUtils.triggerSubscribe(clientId, fn);\n} catch (e) {\n  logger.error('Trigger bind failed:', e);\n  await backoffRetry(() => PusherUtils.triggerSubscribe(clientId, fn), 3);\n}","preventionTips":["Wrap trigger subscription in retry with backoff for transient websocket issues","Read the appended underlying message before choosing a fix","Re-init the client in a fresh process to clear stale static state"],"tags":["pusher","realtime","triggers","chunking"],"backgroundTag":"event-subscription-failed","analyzedSha":"64b1b85502b1beeb2379e6c9e8bf1104504fa637","analyzedAt":"2026-08-28T15:39:33.623Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}