# \[Archive\] Error: UserAgent parameter can't be empty (React Native)

**URL:** <https://builder.metamask.io/t/archive-error-useragent-parameter-cant-be-empty-react-native/1837>\
**Category:** Embedded Wallets (Web3Auth)\
**Created:** [August 16, 2023, 7:35am UTC](https://builder.metamask.io/t/archive-error-useragent-parameter-cant-be-empty-react-native/1837 "2023-08-16T07:35:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cuongnguyen](https://avatars.discourse-cdn.com/v4/letter/c/eb9ed0/32.png) [@cuongnguyen](https://builder.metamask.io/u/cuongnguyen)\
**Post date:** [August 16, 2023, 7:35am UTC](https://builder.metamask.io/t/archive-error-useragent-parameter-cant-be-empty-react-native/1837/1 "2023-08-16T07:35:32Z")

</div>

> **🏛 Archived Content from Web3Auth Community**
> 
> This topic was originally posted by **cuongnguyen** on 8/16/2023.  
> This content has been migrated from our previous community forum to preserve valuable discussions.

* * *

I am setting up tkey for my React-Native project using TorusServiceProvider, it return Error when I call tkey.serviceProvider.init(), I am using latest tkey (11.0.0)

error detail:

[![Simulator Screen Shot - iPhone 13 - 2023-08-16 at 14.31.54](https://canada1.discourse-cdn.com/flex011/uploads/metamaskbuilderhub/original/2X/d/d1a7bd6c0ace60b2246212cc9971341146fead7f.png)
Simulator Screen Shot - iPhone 13 - 2023-08-16 at 14.31.541170×2532 166 KB
](https://web3auth.io/community/uploads/default/original/2X/9/9468f8c48b7551044e928a5a4298eb5abbb8f8b0.png "Simulator Screen Shot - iPhone 13 - 2023-08-16 at 14.31.54")

Here is my code:

```auto
import {WEB3AUTH_CLIENT_ID} from "@env";
import ThresholdKey from "@tkey/core";
import {CustomAuthArgs} from "@toruslabs/customauth";
import TorusServiceProvider from "@tkey/service-provider-torus";
import SecurityQuestionsModule from "@tkey/security-questions";
import TorusStorageLayer from "@tkey/storage-layer-torus";
import {resolvedRedirectUrl} from "@/utils/web3auth";
const customAuthArgs: CustomAuthArgs = {
web3AuthClientId: WEB3AUTH_CLIENT_ID,
network: “testnet”,
baseUrl: resolvedRedirectUrl,
enableLogging: true,
};
const serviceProvider = new TorusServiceProvider({customAuthArgs});
const securityQuestionsModule = new SecurityQuestionsModule();
const storageLayer = new TorusStorageLayer({
hostUrl: “https://metadata.tor.us”,
});
export const tKey = new ThresholdKey({
serviceProvider,
storageLayer,
modules: {
securityQuestionsModule,
},
});

```

**Please provide the following details too when asking for help in this category:**

- SDK Version: 11.0.0
- Verifier Details:
  - Verifier Name:
  - JWKS Endpoint:
  - Sample idToken(JWT)

---

<div class="post-metadata">

**Author:** ![vjgee](https://avatars.discourse-cdn.com/v4/letter/v/b5e925/32.png) [@vjgee](https://builder.metamask.io/u/vjgee)\
**Post date:** [August 16, 2023, 7:59am UTC](https://builder.metamask.io/t/archive-error-useragent-parameter-cant-be-empty-react-native/1837/2 "2023-08-16T07:59:31Z")

</div>

@cuongnguyen Thanks for your recent communication.

I will look into this and get back with an update.
