# Error logging into sendbird-uikit-react-native sample application

**URL:** <https://community.sendbird.com/t/error-logging-into-sendbird-uikit-react-native-sample-application/9646>\
**Category:** Sendbird Chat UIKit\
**Tags:** ios, uikit\
**Created:** [June 10, 2024, 5:47pm UTC](https://community.sendbird.com/t/error-logging-into-sendbird-uikit-react-native-sample-application/9646 "2024-06-10T17:47:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcel\_Anis](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/marcel_anis/32/5233_2.png) [@Marcel\_Anis](https://community.sendbird.com/u/Marcel_Anis)\
**Post date:** [June 10, 2024, 5:47pm UTC](https://community.sendbird.com/t/error-logging-into-sendbird-uikit-react-native-sample-application/9646/1 "2024-06-10T17:47:29Z")

</div>

**[Problem/Question]**  
I’m having issues logging into sendbird-uikit-react-native sample app. The app is running in the ios emulator

## WARN [UIKIT\_ios] [useConnection] clear cached-data WARN [UIKIT\_ios] [useConnection] connect failure This session token is invalid. 400302 LOG [UIKit/promiseUnhandled] [SendbirdError: This session token is invalid.] 400302

// If problem, please fill out the below. If question, please delete.  
**[UIKit Version]**  
“@sendbird/uikit-react-native”: “^3.2.0”

**[Reproduction Steps]**

1. Replaced the `APP_ID` in the `env.ts` file with the Application ID from our SendBird dashboard.
2. Left the `API_TOKEN` field empty in the `env.ts` file.
3. Created a user under our application in SendBird web app and ensured the “Issue access token” checkbox was checked.
4. Login with the created user’s user\_id and nickname in sendbird-uikit-react-native sample app

**[Frequency]**  
Every time

**[Current impact]**  
cannot connect

---

<div class="post-metadata">

**Author:** ![Adam.Oleksiak](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/adam.oleksiak/32/2239_2.png) [@Adam.Oleksiak](https://community.sendbird.com/u/Adam.Oleksiak)\
**Post date:** [June 10, 2024, 10:38pm UTC](https://community.sendbird.com/t/error-logging-into-sendbird-uikit-react-native-sample-application/9646/2 "2024-06-10T22:38:06Z")

</div>

Hi @Marcel_Anis,

The issue is that when you created the Sendbird User with “Issue access token” checked, the user is now required to use an access or session token to authenticate to Sendbird. This is why the error “This session token is invalid.” is being returned, because no valid access/session token is being provided during the login process.

If you create a user without “Issue access token” checked, that user will be able to login/authenticate to Sendbird with just their user\_id within the sample app.

Thank you,  
Adam

---

<div class="post-metadata">

**Author:** ![Marcel\_Anis](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/marcel_anis/32/5233_2.png) [@Marcel\_Anis](https://community.sendbird.com/u/Marcel_Anis)\
**Post date:** [June 11, 2024, 12:42am UTC](https://community.sendbird.com/t/error-logging-into-sendbird-uikit-react-native-sample-application/9646/3 "2024-06-11T00:42:57Z")

</div>

Hi Adam,

I created a user without “Issue access token” checked. I am still getting the error when pressing the Login button:  
LOG [UIKit/promiseUnhandled] [SendbirdError: Connection timeout.] 800190

Also, even before pressing the Login button, I am getting this warning in the console on app start:

WARN [UIKIT\_ios] [useConnection] connect failure Connection timeout. 800190

Seems like the error on login button press and the warning on app start are related as they have the same error code “800190”

Please advise on how to proceed.

Thanks  
Marcel

---

<div class="post-metadata">

**Author:** ![Marcel\_Anis](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/marcel_anis/32/5233_2.png) [@Marcel\_Anis](https://community.sendbird.com/u/Marcel_Anis)\
**Post date:** [June 11, 2024, 1:48am UTC](https://community.sendbird.com/t/error-logging-into-sendbird-uikit-react-native-sample-application/9646/4 "2024-06-11T01:48:27Z")

</div>

Not sure if this is relevant but here is another thing I tried:

Previously I cloned the project from the sample directory

> **[sendbird-uikit-react-native/sample at main ·...](https://github.com/sendbird/sendbird-uikit-react-native/tree/main/sample)**
>
> Build chat in minutes with Sendbird UIKit open source code. - sendbird/sendbird-uikit-react-native

The above was giving me connection timeout errors.

Later I tried cloning it from the root folder

> **[GitHub - sendbird/sendbird-uikit-react-native: Build chat in minutes with...](https://github.com/sendbird/sendbird-uikit-react-native/tree/main)**
>
> main

But when running the cloned app from root folder I get another error:

```auto
success Successfully launched the app on the simulator
[1] react-native run-ios exited with code 0
[0] BUNDLE ./index.js 
[0] 
[0] error: TypeError: Cannot read properties of undefined (reading 'transformFile')
[0] at Bundler.transformFile (/Users/marcelanis/dev/sendbird-uikit-react-native/node_modules/metro/src/Bundler.js:48:30)
[0] at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[0] at async Object.transform (/Users/marcelanis/dev/sendbird-uikit-react-native/node_modules/metro/src/lib/transformHelpers.js:101:12)
[0] at async processModule (/Users/marcelanis/dev/sendbird-uikit-react-native/node_modules/metro/src/DeltaBundler/traverseDependencies.js:137:18)
[0] at async traverseDependenciesForSingleFile (/Users/marcelanis/dev/sendbird-uikit-react-native/node_modules/metro/src/DeltaBundler/traverseDependencies.js:131:3)
[0] at async Promise.all (index 0)
[0] at async initialTraverseDependencies (/Users/marcelanis/dev/sendbird-uikit-react-native/node_modules/metro/src/DeltaBundler/traverseDependencies.js:114:3)
[0] at async DeltaCalculator._getChangedDependencies (/Users/marcelanis/dev/sendbird-uikit-react-native/node_modules/metro/src/DeltaBundler/DeltaCalculator.js:164:25)
[0] at async DeltaCalculator.getDelta (/Users/marcelanis/dev/sendbird-uikit-react-native/node_modules/metro/src/DeltaBundler/DeltaCalculator.js:94:16)
[0] at async DeltaBundler.buildGraph (/Users/marcelanis/dev/sendbird-uikit-react-native/node_modules/metro/src/DeltaBundler.js:50:5)

```

Let me know I should be cloning the app from the root folder or the sample directory

Thanks  
Marcel

---

<div class="post-metadata">

**Author:** ![Adam.Oleksiak](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/adam.oleksiak/32/2239_2.png) [@Adam.Oleksiak](https://community.sendbird.com/u/Adam.Oleksiak)\
**Post date:** [June 11, 2024, 3:00pm UTC](https://community.sendbird.com/t/error-logging-into-sendbird-uikit-react-native-sample-application/9646/5 "2024-06-11T15:00:32Z")

</div>

Hi Marcel,

You can just clone the sample, that should be fine.

The 800190 error means thats the application did not receive a response from Sendbird’s servers within the default timeout.

You can increase the websocketResponseTimeout, which will increase the amount of time the UIKit and SDKs wait for a response from the Sendbird server. [SendbirdChatOptions | Sendbird Chat SDK Reference - v4.12.7](https://sendbird.com/docs/chat/sdk/v4/javascript/ref/classes/_sendbird_chat.SendbirdChatOptions.html#websocketResponseTimeout)  
You can add options: { websocketResponseTimeout : 30000 } to the UIKit or SDK initialization to increase this.

Was there any network related changes between testing with the previous user and now? These types of errors typically indicated some type of network instability.

Thank you,  
Adam

---

<div class="post-metadata">

**Author:** ![Marcel\_Anis](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/marcel_anis/32/5233_2.png) [@Marcel\_Anis](https://community.sendbird.com/u/Marcel_Anis)\
**Post date:** [June 11, 2024, 5:41pm UTC](https://community.sendbird.com/t/error-logging-into-sendbird-uikit-react-native-sample-application/9646/6 "2024-06-11T17:41:42Z")

</div>

I had to clone the from the root and not the sample. Then downgrade my node version from v20.13.1 to v16.13.0.

Now I can login.

Thanks for all your help.  
Marcel
