# \[Archive\] Failed to create a wallet when using sepolia

**URL:** <https://builder.metamask.io/t/archive-failed-to-create-a-wallet-when-using-sepolia/1231>\
**Category:** Embedded Wallets (Web3Auth)\
**Created:** [September 19, 2024, 3:32pm UTC](https://builder.metamask.io/t/archive-failed-to-create-a-wallet-when-using-sepolia/1231 "2024-09-19T15:32:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![andon](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@andon](https://builder.metamask.io/u/andon)\
**Post date:** [September 19, 2024, 3:32pm UTC](https://builder.metamask.io/t/archive-failed-to-create-a-wallet-when-using-sepolia/1231/1 "2024-09-19T15:32:11Z")

</div>

> **🏛 Archived Content from Web3Auth Community**
> 
> This topic was originally posted by **andon** on 9/19/2024.  
> This content has been migrated from our previous community forum to preserve valuable discussions.

* * *

Hey guys when i try to generate a wallet i’m facing this issue:

[Log] Error creating wallet  
{ “code”: 4901, “message”: “Invalid network, net\_version is: 11155111”, “stack”: “JsonRpcError@\nEthereumProviderError@\ngetEthProviderError@\n@” }

and this is my config

```auto
const privateKeyProvider = new EthereumPrivateKeyProvider({
      config: {
        chainConfig: {
          chainNamespace: CHAIN_NAMESPACES.EIP155,
          chainId: '11155111',
          rpcTarget: 'https://sepolia.infura.io/v3/9b1b4e645a9541faa755cfc71d96cad8',
          displayName: 'Ethereum',
          ticker: 'ETH',
          tickerName: 'Ethereum',
          decimals: 18,
        },
      },
    });
const web3auth = new Web3Auth({
  clientId: WEB3_CLIENT_ID,
  web3AuthNetwork: WEB3AUTH_NETWORK.SAPPHIRE_DEVNET,
  privateKeyProvider,
});

await web3auth.init();

```

i want to know what setup is expected for WEB3AUTH\_NETWORK.SAPPHIRE\_DEVNET cuz i think there is some missmatch between SAPPHIRE\_DEVNET and sepolia

---

<div class="post-metadata">

**Author:** ![w3abot](https://avatars.discourse-cdn.com/v4/letter/w/4da419/32.png) [@w3abot](https://builder.metamask.io/u/w3abot)\
**Post date:** [September 19, 2024, 3:33pm UTC](https://builder.metamask.io/t/archive-failed-to-create-a-wallet-when-using-sepolia/1231/2 "2024-09-19T15:33:21Z")

</div>

Hi Andon,

Thank you for reaching out with your issue. It looks like you’re correctly setting up your configuration for the Sepolia testnet, but you might be right about a potential mismatch between `SAPPHIRE_DEVNET` and Sepolia.

Please ensure the `WEB3AUTH_NETWORK` and `chainConfig` chain ID are aligned. The `SAPPHIRE_DEVNET` is tuned for Torus’s Sapphire instance, which may not be the same as Sepolia.

1. **Initialization Code Snippet Overview:**

2. **Configuration Check:**

To assist further, please try adjusting the `WEB3AUTH_NETWORK` setting. Instead of `SAPPHIRE_DEVNET`, try using `MAINNET` or the specific network that you intend to use and fits with Sepolia.

```javascript
const web3auth = new Web3Auth({
  clientId: WEB3_CLIENT_ID,
  web3AuthNetwork: WEB3AUTH_NETWORK.MAINNET, // Change to MAINNET or appropriate network
  privateKeyProvider,
});

```

Alternatively, you may want to verify the compatibility of `SAPPHIRE_DEVNET` with Sepolia, as typically `SAPPHIRE_DEVNET` might be designed for a different chain setup.

This response was generated by the Web3Auth Bot. A team member from Web3Auth will review your issue and provide further insights shortly.

---

<div class="post-metadata">

**Author:** ![Ayush](https://yyz1.discourse-cdn.com/flex011/user_avatar/builder.metamask.io/ayush/32/1540_2.png) [@Ayush](https://builder.metamask.io/u/Ayush)\
**Post date:** [September 20, 2024, 1:16pm UTC](https://builder.metamask.io/t/archive-failed-to-create-a-wallet-when-using-sepolia/1231/3 "2024-09-20T13:16:28Z")

</div>

Hey @andon please change the chain id to `0xaa36a7`. You need to pass the hex value.
