# ChannelRepository.getChannel() calls keeps hanging/failing

**URL:** <https://forum.social.plus/t/channelrepository-getchannel-calls-keeps-hanging-failing/1449>\
**Category:** JS SDK\
**Created:** [September 6, 2024, 6:00pm UTC](https://forum.social.plus/t/channelrepository-getchannel-calls-keeps-hanging-failing/1449 "2024-09-06T18:00:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhishek](https://avatars.discourse-cdn.com/v4/letter/a/7ba0ec/32.png) [@abhishek](https://forum.social.plus/u/abhishek)\
**Post date:** [September 6, 2024, 6:00pm UTC](https://forum.social.plus/t/channelrepository-getchannel-calls-keeps-hanging-failing/1449/1 "2024-09-06T18:00:32Z")

</div>

Hello,

I am wondering why this `getChannel` call keeps hanging, and doesn’t ever return. In a previous attempt, I added a time limit to the call, and it’d just end up failing when it should succeed.

I’m using Amity inside my Unity app, and we have members with `teamId` that refers to the equivalent Amity channel `channelId`.

Below is my code.  
Note that: `userModel.metadata.teamId` is a valid string referring to a real channel in our Amity Console, so I’m not sure why it’s failing:

```auto
const channelData = await new Promise ((resolve) =>
            {
              const searchingChannel = ChannelRepository.getChannel(userModel.metadata.teamId);
              searchingChannel.once('dataUpdated', data => 
              {
                console.log("Searching channel was successful!");
                resolve(data);                
              });
              searchingChannel.once('dataError', error => 
              {
                console.log("Searching channel failed: " + JSON.stringify(error));
                reject(error);
              });
            }).catch((error) => 
            {
              console.log("Searching channel was unsuccessful: " + JSON.stringify(error));
              return null;
            });

```

If you need, I can provide the details as to what `teamId` refers to, and verify that it’s an existing valid channel in my Amity Console.

---

<div class="post-metadata">

**Author:** ![SocialPlus\_Support](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.social.plus/socialplus_support/32/798_2.png) [@SocialPlus\_Support](https://forum.social.plus/u/SocialPlus_Support)\
**Post date:** [September 9, 2024, 3:25am UTC](https://forum.social.plus/t/channelrepository-getchannel-calls-keeps-hanging-failing/1449/2 "2024-09-09T03:25:51Z")

</div>

Hello @Abhishek, could you please provide the version you are using for further investigation?
