> For the complete documentation index, see [llms.txt](/llms.txt).

# SDK errors and warnings

## Web3Auth Web SDKs

`@web3auth/modal`, `@web3auth/no-modal`, and other frontend SDKs, including mobiles.

### General errors

| Code                      | Message                                                 | Description                                                                                                                                                 |
| ------------------------- | ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `TPC_NOT_SUPPORTED`       | Unable to detect device share.                          | This may be due to browser security settings. Adjust your current browser settings from 'Strict' to 'Moderate'. Alternatively, log in via a Chrome Browser. |
| `NETWORK_RESPONSE_FAILED` | Unable to detect login share from the Web3Auth Network. | This may be due to slow internet connection. Check your internet speed and try again.                                                                       |
| `DUPLICATE_TOKEN_FOUND`   | Unable to verify.                                       | This may be due to invalid login. Kindly log out of your social login provider on your current browser and login again.                                     |
| `BUSY_NETWORK`            | Unable to connect to Web3Auth Network.                  | The Network may be congested. Please try again in 5 minutes.                                                                                                |
| `KEY_ASSIGN_FAILED`       | A key has not been assigned to you.                     | This might be due to communication with the Web3Auth network nodes. Kindly relogin to try again. If problem persists, please contact support.               |
| `VERIFIER_NOT_SUPPORTED`  | Verifier not supported.                                 | Kindly ensure you have a live verifier on the right network (Testnet/Mainnet). Set up / Check verifier status here: <https://developer.metamask.io>         |
| `DEFAULT`                 | There seems to be some bug in the code.                 | Please contact support to fix this.                                                                                                                         |

### Initialization errors

| Code   | Message                                   | Description                                                                 |
| ------ | ----------------------------------------- | --------------------------------------------------------------------------- |
| `5001` | Wallet is not found                       | Error occurred, when there's no wallet found.                               |
| `5002` | Wallet is not installed                   | Error occurred, when the requested wallet is not installed .                |
| `5003` | Wallet is not ready yet                   | Error occurred, when the wallet is not ready.                               |
| `5004` | Wallet window is blocked                  | Error occurred, when the wallet window is blocked.                          |
| `5005` | Wallet window has been closed by the user | Error occurred, when the wallet window is closed by the user.               |
| `5006` | Incompatible chain namespace provided     | Error occurred, when the incompatible `chainNamespace` was passed.          |
| `5007` | Adapter has already been included         | Error occurred, when the same adapter is added more than once..             |
| `5008` | Invalid provider Config                   | Error occurred, when an invalid provider configurations are being used.     |
| `5009` | Provider is not ready yet                 | Error occurred, when the provider is not ready and trying to use it         |
| `5010` | Failed to connect with rpc url            | Error occurred, when trying to connect the wallet with the RPC URL.         |
| `5011` | Invalid params passed in                  | Error occurred, when an invalid parameter was passed.                       |
| `5013` | Invalid network provided                  | Error occurred, when an invalid network was provided during initialization. |

### Login errors

| Code   | Message                                  | Description                                                 |
| ------ | ---------------------------------------- | ----------------------------------------------------------- |
| `5111` | Failed to connect with wallet            | Upon login, the wallet is unable to connect.                |
| `5112` | Failed to disconnect from wallet         | Upon log out, the wallet is unable to disconnect.           |
| `5113` | Wallet is not connected                  | Throws this error when trying to use a logged out wallet.   |
| `5114` | Wallet popup has been closed by the user | Throws this error when the user has closed the Login Modal. |

### JSON RPC errors

| Code             | Message            | Description                                                                                                                                               |
| ---------------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| -32700           | `Parse Error`      | Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.                                                     |
| -32600           | `Invalid Request`  | The JSON sent is not a valid Request object.                                                                                                              |
| -32601           | `Method Not Found` | The method does not exist / is not available.                                                                                                             |
| -32602           | `Invalid Params`   | Invalid method parameter(s).                                                                                                                              |
| -32603           | `Internal Error`   | Internal JSON-RPC error. These can manifest as different generic issues (such as attempting to access a protected endpoint before the user is logged in). |
| -32000 to -32099 | `Server Error`     | Reserved for implementation-defined server errors.                                                                                                        |

## Torus EVM and Solana wallet plugin errors

| Code   | Message                                                                                                                  |
| ------ | ------------------------------------------------------------------------------------------------------------------------ |
| `5210` | Torus Wallet Plugin is not initialized.                                                                                  |
| `5211` | Web3Auth is connected to unsupported adapter. Torus wallet connector plugin requires web3auth connected to auth adapter. |
| `5212` | Provider is required.                                                                                                    |
| `5213` | Web3Auth instance is required while initialization.                                                                      |
| `5214` | Web3Auth is not connected.                                                                                               |
| `5215` | UserInfo is required.                                                                                                    |
| `5216` | Plugin is already initialized.                                                                                           |
| `5217` | Torus wallet instance is not set.                                                                                        |

## Web3Auth Node SDK

`@web3auth/node-sdk`

### Constructor errors

| Message                                      | Description                                                   |
| -------------------------------------------- | ------------------------------------------------------------- |
| `useDKG cannot be false for legacy networks` | `useDKG: false` is not supported on legacy Web3Auth networks. |

### Initialization errors

| Message                                                                      | Description                                                                             |
| ---------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| `failed to fetch project configurations`                                     | The SDK could not load project config from the dashboard. Check `clientId` and network. |
| `Please configure chains on dashboard at https://dashboard.web3auth.io`      | No chains are configured in the dashboard or constructor.                               |
| `Please provide a valid chainNamespace in chains for chain <chainId>`        | A chain in `chains` is missing or has an invalid `chainNamespace`.                      |
| `Please provide a valid chainId as hex string in chains for chain <chainId>` | A non-OTHER chain has an invalid `chainId` (must be a hex string).                      |
| `Please provide a valid rpcTarget in chains for chain <chainId>`             | A non-OTHER chain has a missing or invalid `rpcTarget` URL.                             |

### Login errors

| Message                                                                                      | Description                                                                                 |
| -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| `Please call init first.`                                                                    | `connect()` was called before `init()`.                                                     |
| `idToken and authConnectionId are required`                                                  | `connect()` was called without a valid `idToken` or `authConnectionId`.                     |
| `Invalid idToken`                                                                            | The JWT token could not be parsed.                                                          |
| `userId or idToken is required`                                                              | `connect()` needs either `userId` or a valid `idToken` to resolve the user identifier.      |
| `Unable to get private key from torus nodes`                                                 | Key reconstruction failed after authentication.                                             |
| `User has already enabled mfa, please use the @web3auth/web3auth-web sdk for login with mfa` | A user has enabled 2FA. `@web3auth/node-sdk` only works for users who have not enabled MFA. |

### Other errors

Additional errors may be found during `@web3auth/node-sdk` implementations:

| Message                                     | Description                               |
| ------------------------------------------- | ----------------------------------------- |
| `node results do not match at first lookup` | Verifier not supported.                   |
| `Error occurred while verifying params`     | Invalid parameter was passed.             |
| `Duplicate token found`                     | An already used JWT `idToken` was passed. |

## Web3Auth infrastructure errors

| Code   | Message                                                                                                         |
| ------ | --------------------------------------------------------------------------------------------------------------- |
| `1001` | Unable to delete service provider share                                                                         |
| `1002` | Wrong share index                                                                                               |
| `1003` | Unable to updateSDK                                                                                             |
| `1101` | Metadata not found, SDK likely not initialized                                                                  |
| `1102` | `getMetadata` errored                                                                                           |
| `1103` | `setMetadata` errored                                                                                           |
| `1104` | previouslyFetchedCloudMetadata provided in initialization is outdated                                           |
| `1105` | previouslyFetchedCloudMetadata.nonce should never be higher than the latestShareDetails, please contact support |
| `1201` | Invalid tkeyStore                                                                                               |
| `1202` | Encryption failed                                                                                               |
| `1203` | Decryption failed                                                                                               |
| `1301` | Private key not available. Please reconstruct key first                                                         |
| `1302` | Unable to reconstruct                                                                                           |
| `1303` | reconstructed key is not pub key                                                                                |
| `1304` | Share found in unexpected polynomial                                                                            |
| `1305` | Input is not supported                                                                                          |
| `1306` | no encrypted share store for share exists                                                                       |
| `1307` | Share doesn't exist                                                                                             |
| `1308` | Share was deleted                                                                                               |
| `1401` | Unable to acquire lock                                                                                          |
| `1402` | Unable to release lock                                                                                          |
| `1501` | Private key unavailable                                                                                         |
| `1502` | Metadata pubkey unavailable                                                                                     |
| `1503` | `getAuthMetadata `errored                                                                                       |
| `1504` | `setAuthMetadata` errored                                                                                       |
| `1601` | delete1OutOf1 requires manualSync=true                                                                          |
