# Getting connection Cancelled error in Android

**URL:** <https://community.sendbird.com/t/getting-connection-cancelled-error-in-android/1985>\
**Category:** Android\
**Created:** [March 31, 2021, 11:14am UTC](https://community.sendbird.com/t/getting-connection-cancelled-error-in-android/1985 "2021-03-31T11:14:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sakkk](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@sakkk](https://community.sendbird.com/u/sakkk)\
**Post date:** [March 31, 2021, 11:14am UTC](https://community.sendbird.com/t/getting-connection-cancelled-error-in-android/1985/1 "2021-03-31T11:14:54Z")

</div>

I keep on getting  
E/SBUIKIT: [16:41:21.054 Splash\_A$2:lambda$run$0$Splash\_A$2():96] SendBirdException{code=800102, message=Connection has been canceled.}

I was integrating the send bird in my android studio, it was working morning but now it starts throwing this exception…

---

<div class="post-metadata">

**Author:** ![walter.rodriguez](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/walter.rodriguez/32/546_2.png) [@walter.rodriguez](https://community.sendbird.com/u/walter.rodriguez)\
**Post date:** [March 31, 2021, 2:12pm UTC](https://community.sendbird.com/t/getting-connection-cancelled-error-in-android/1985/2 "2021-03-31T14:12:57Z")

</div>

This exception is thrown when this happens in Android:

 ![Screenshot 2021-03-31 at 15.10.11](https://us1.discourse-cdn.com/flex020/uploads/sendbird/original/2X/a/a82f13642e597077252e15d3d553972df55392c1.png)

[https://developer.android.com/reference/java/lang/InterruptedException](https://developer.android.com/reference/java/lang/InterruptedException)

Remember we have a Logger you can activate for more detail on any error:

> **[Logger | Calls Android SDK | Sendbird Docs](https://sendbird.com/docs/calls/v1/android/guides/logger#1-logger)**
>
> Keep track of events and activities through the logging system.

Feel free to post any code here to provide more help.

---

<div class="post-metadata">

**Author:** ![sakkk](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@sakkk](https://community.sendbird.com/u/sakkk)\
**Post date:** [April 1, 2021, 10:09am UTC](https://community.sendbird.com/t/getting-connection-cancelled-error-in-android/1985/3 "2021-04-01T10:09:59Z")

</div>

please find the complete stack trace.  
W/System.err: SendBirdException{code=800102, message=Connection has been canceled.}  
at com.sendbird.android.Connection.connect(Connection.java:257)  
at com.sendbird.android.SocketManager$7.call(SocketManager.java:324)  
at com.sendbird.android.SocketManager$7.call(SocketManager.java:300)  
at com.sendbird.android.JobResultTask$1.call(JobResultTask.java:14)  
W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:266)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)  
at java.lang.Thread.run(Thread.java:764)

---

<div class="post-metadata">

**Author:** ![walter.rodriguez](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/walter.rodriguez/32/546_2.png) [@walter.rodriguez](https://community.sendbird.com/u/walter.rodriguez)\
**Post date:** [April 8, 2021, 10:55am UTC](https://community.sendbird.com/t/getting-connection-cancelled-error-in-android/1985/4 "2021-04-08T10:55:20Z")

</div>

@sakkk Question: Are you trying to connect to Sendbird inside a Thread?  
If so, can you please try moving this outside and see if all goes well?

---

<div class="post-metadata">

**Author:** ![sakkk](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@sakkk](https://community.sendbird.com/u/sakkk)\
**Post date:** [April 8, 2021, 11:36am UTC](https://community.sendbird.com/t/getting-connection-cancelled-error-in-android/1985/5 "2021-04-08T11:36:36Z")

</div>

No, It is not part of the thread. when the app launchess it loads a MainACtivity class as well which takes care of all the activity stuffs…

---

<div class="post-metadata">

**Author:** ![walter.rodriguez](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/walter.rodriguez/32/546_2.png) [@walter.rodriguez](https://community.sendbird.com/u/walter.rodriguez)\
**Post date:** [April 8, 2021, 12:35pm UTC](https://community.sendbird.com/t/getting-connection-cancelled-error-in-android/1985/6 "2021-04-08T12:35:18Z")

</div>

Thanks @sakkk

Maybe you can share your implementation so we can have a better idea… But if it’s not possible, can you please mention any differences you see between your code and mine here so I can have a better idea of what could be happening:

**MainActivity**

> <https://github.com/warodri-sendbird/android-channel-handler/blob/main/app/src/main/java/com/example/channelhandlertest/MainActivity.java>

**SendBirdClass**

> <https://github.com/warodri-sendbird/android-channel-handler/blob/main/app/src/main/java/com/example/channelhandlertest/SendBirdClass.java>

**Repository here:**

> **[warodri-sendbird/android-channel-handler](https://github.com/warodri-sendbird/android-channel-handler)**
>
> Demo for Android and channel handlers. Contribute to warodri-sendbird/android-channel-handler development by creating an account on GitHub.
