{"record":{"id":"3192bc7d2337e684","repo":"FuelLabs/fuels-ts","slug":"missing-connector-3192bc","errorCode":"MISSING_CONNECTOR","errorMessage":"No connector selected for calling ${method}. Use hasConnector before executing other methods.","messagePattern":"No connector selected for calling (.+?)\\. Use hasConnector before executing other methods\\.","errorType":"exception","errorClass":"FuelError","httpStatus":null,"severity":"error","filePath":"packages/account/src/connectors/fuel.ts","lineNumber":186,"sourceCode":"      return;\n    }\n    const currentConnector = this._currentConnector;\n    this._unsubscribes.map((unSub) => unSub());\n    this._unsubscribes = events.map((event) => {\n      const handler = (...args: unknown[]) => this.emit(event, ...args);\n      currentConnector.on(event as FuelConnectorEventsType, handler);\n      return () => currentConnector.off(event, handler);\n    });\n  }\n\n  /**\n   * Call method from the current connector.\n   */\n  private async callMethod(method: string, ...args: unknown[]) {\n    const hasConnector = await this.hasConnector();\n    await this.pingConnector();\n    if (!this._currentConnector || !hasConnector) {\n      throw new FuelError(\n        ErrorCode.MISSING_CONNECTOR,\n        `No connector selected for calling ${method}. Use hasConnector before executing other methods.`\n      );\n    }\n    if (typeof this._currentConnector[method as keyof FuelConnector] === 'function') {\n      return (this._currentConnector[method as keyof FuelConnector] as CallableFunction)(...args);\n    }\n\n    return undefined;\n  }\n\n  /**\n   * Create a method for each method proxy that is available on the Common interface\n   * and call the method from the current connector.\n   */\n  private setupMethods(): void {\n    Object.values(FuelConnectorMethods).forEach((method) => {\n      this[method] = async (...args: unknown[]) => this.callMethod(method, ...args);","sourceCodeStart":168,"sourceCodeEnd":204,"githubUrl":"https://github.com/FuelLabs/fuels-ts/blob/b3f37c91aca4aa9d5e4c0d3967f66237190826ea/packages/account/src/connectors/fuel.ts#L168-L204","documentation":"Thrown by Fuel.callMethod when there is no current connector or hasConnector() returns false. Every connector-routed operation (signing, network, accounts) delegates to the current connector, so without one the call has no target. The error message names the method and directs you to pre-check with hasConnector.","triggerScenarios":"Invoking any connector-delegated Fuel method (e.g. getWallet, currentNetwork, sendTransaction via connector) before a connector is connected/selected, after disconnect, or when the saved connector is no longer installed. The check fires after hasConnector() and pingConnector() resolve.","commonSituations":"User has not connected their wallet yet, disconnected mid-session, the extension was disabled, or the SDK is used in a context where no connector was ever registered.","solutions":["Gate connector calls behind hasConnector: if (await fuel.hasConnector()) { ... } else { prompt user to connect }.","After Fuel.init, ensure a connector is selected via hasConnector before invoking any dependent method.","Listen for the connection event and only then trigger connector-dependent logic."],"exampleFix":"// before\nconst wallet = await fuel.getWallet(address, provider);\n\n// after\nif (!(await fuel.hasConnector())) {\n  await fuel.connect(); // or prompt the user\n}\nconst wallet = await fuel.getWallet(address, provider);","handlingStrategy":"validation","validationCode":"// Guard every connector-dependent call\nif (!(await fuel.hasConnector())) {\n  await fuel.connect(); // or prompt user\n}\nconst wallet = await fuel.getWallet(address, provider);","typeGuard":"async function hasReadyConnector(fuel: Fuel): Promise<boolean> {\n  return await fuel.hasConnector();\n}","tryCatchPattern":"try {\n  const wallet = await fuel.getWallet(address, provider);\n} catch (e) {\n  if (e instanceof FuelError && e.code === ErrorCode.MISSING_CONNECTOR) {\n    // prompt user to connect a wallet\n  } else throw e;\n}","preventionTips":["Call fuel.hasConnector() before any connector-routed method.","Drive connector-dependent UI off the connection lifecycle events.","After disconnect, disable all actions that require a connector."],"tags":["connector","lifecycle","fuel","guard"],"backgroundTag":null,"analyzedSha":"b3f37c91aca4aa9d5e4c0d3967f66237190826ea","analyzedAt":"2026-08-12T20:30:56.448Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}