# SendBirdException: Command received no ack

**URL:** <https://community.sendbird.com/t/sendbirdexception-command-received-no-ack/1925>\
**Category:** JavaScript\
**Tags:** syncmanager, chatsdk\
**Created:** [March 22, 2021, 12:03pm UTC](https://community.sendbird.com/t/sendbirdexception-command-received-no-ack/1925 "2021-03-22T12:03:46Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pankaj\_Salunkhe](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/pankaj_salunkhe/32/1089_2.png) [@Pankaj\_Salunkhe](https://community.sendbird.com/u/Pankaj_Salunkhe)\
**Post date:** [March 22, 2021, 12:03pm UTC](https://community.sendbird.com/t/sendbirdexception-command-received-no-ack/1925/1 "2021-03-22T12:03:46Z")

</div>

I’m having issues using **SendBird Javascript SDK v3.0.145** with **syncmanager v1.1.23**.

Has anyone experienced the same issue? Any tip on how to solve it?

 ![Screenshot 2021-03-22 172713](https://us1.discourse-cdn.com/flex020/uploads/sendbird/original/2X/8/8105578f9a83e6e9ad5f9c5e6b00aca41ee4b61a.png)

---

<div class="post-metadata">

**Author:** ![Tyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/tyler/32/810_2.png) [@Tyler](https://community.sendbird.com/u/Tyler)\
**Post date:** [March 22, 2021, 12:57pm UTC](https://community.sendbird.com/t/sendbirdexception-command-received-no-ack/1925/2 "2021-03-22T12:57:56Z")

</div>

@Pankaj_Salunkhe,

Welcome to the Sendbird community. The `Command received no ack` error is a network based issue where the command we sent via the SDK did not receive an ACK from the Sendbird server before its timeout.

-Tyler

---

<div class="post-metadata">

**Author:** ![jkepps](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/jkepps/32/1156_2.png) [@jkepps](https://community.sendbird.com/u/jkepps)\
**Post date:** [April 9, 2021, 5:03pm UTC](https://community.sendbird.com/t/sendbirdexception-command-received-no-ack/1925/3 "2021-04-09T17:03:23Z")

</div>

@Tyler thanks for the reply… Do you know what might be causing that to happen? Would be great to know how to avoid getting that error.

---

<div class="post-metadata">

**Author:** ![Tyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/tyler/32/810_2.png) [@Tyler](https://community.sendbird.com/u/Tyler)\
**Post date:** [April 12, 2021, 2:08pm UTC](https://community.sendbird.com/t/sendbirdexception-command-received-no-ack/1925/4 "2021-04-12T14:08:43Z")

</div>

Hey @jkepps,

Apologize for the delay. There is not way for us to know what is causing that from your side. Essentially its the SDK stating that it didn’t receive an acknowledgement from the Sendbird server. This is typically due to network performance on the client end.

---

<div class="post-metadata">

**Author:** ![jkepps](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/jkepps/32/1156_2.png) [@jkepps](https://community.sendbird.com/u/jkepps)\
**Post date:** [April 16, 2021, 4:13pm UTC](https://community.sendbird.com/t/sendbirdexception-command-received-no-ack/1925/5 "2021-04-16T16:13:08Z")

</div>

@Tyler does that mean we’ve implemented something incorrectly? Or are you saying it’s due to a poor network connection on the end user’s device? If it’s the latter it seems like the SyncManager package should handle that a little more gracefully since there’s not much that can be done about it, no?

---

<div class="post-metadata">

**Author:** ![Nicholas\_Gelinas](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/nicholas_gelinas/32/1396_2.png) [@Nicholas\_Gelinas](https://community.sendbird.com/u/Nicholas_Gelinas)\
**Post date:** [July 30, 2021, 4:42pm UTC](https://community.sendbird.com/t/sendbirdexception-command-received-no-ack/1925/6 "2021-07-30T16:42:02Z")

</div>

@jkepps, not sure if this helps at all but I was consistently getting this error when marking a channel as read for a second time. The group channel’s `markAsRead` method does not return a `Promise` so I assumed it was idempotent and safe to call multiple times but that is not the case. I found I had a kind of race condition that I would mark the channel as read when viewing channel messages but marking it would happena a second time accidentally before I would receive the updated channel with 0 `unreadMessageCount` (the condition I was checking before marking a channel as read).

This may not be your situation but if a seemingly innocuous method like `markAsRead` can cause an error to be thrown when called twice (despite being idempotent), it’s possible that other APIs behave similarly…

---

<div class="post-metadata">

**Author:** ![jkepps](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/jkepps/32/1156_2.png) [@jkepps](https://community.sendbird.com/u/jkepps)\
**Post date:** [July 30, 2021, 5:36pm UTC](https://community.sendbird.com/t/sendbirdexception-command-received-no-ack/1925/7 "2021-07-30T17:36:54Z")

</div>

wow, this is great to know. seems plausible this is our issue as well. thanks for sharing @Nicholas_Gelinas. unfortunate this isn’t documented…

---

<div class="post-metadata">

**Author:** ![KobarSeptyanus](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/kobarseptyanus/32/1640_2.png) [@KobarSeptyanus](https://community.sendbird.com/u/KobarSeptyanus)\
**Post date:** [October 14, 2021, 2:29am UTC](https://community.sendbird.com/t/sendbirdexception-command-received-no-ack/1925/8 "2021-10-14T02:29:26Z")

</div>

No, it’s not due to network performance, it’s like @Nicholas_Gelinas explained, it happens when we use markAsRead, markAsDelivered, etc twice within short time frame.

---

<div class="post-metadata">

**Author:** ![Nicholas\_Gelinas](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/nicholas_gelinas/32/1396_2.png) [@Nicholas\_Gelinas](https://community.sendbird.com/u/Nicholas_Gelinas)\
**Post date:** [October 15, 2021, 5:00pm UTC](https://community.sendbird.com/t/sendbirdexception-command-received-no-ack/1925/9 "2021-10-15T17:00:53Z")

</div>

Hey @jkepps and @KobarSeptyanus, I would just like to point out that SendBird just recently released v3.0.156 of their JS SDK which introduces `markAsRead(callback): Promise<void>`. Now that this method returns a `Promise` (or accepts a callback), it’s possible to reliably avoid duplicate calls to `markAsRead`.

---

<div class="post-metadata">

**Author:** ![jkepps](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/jkepps/32/1156_2.png) [@jkepps](https://community.sendbird.com/u/jkepps)\
**Post date:** [October 15, 2021, 5:13pm UTC](https://community.sendbird.com/t/sendbirdexception-command-received-no-ack/1925/10 "2021-10-15T17:13:45Z")

</div>

This is exciting! Thanks for the update!

---

<div class="post-metadata">

**Author:** ![Stanislav\_Sidorov](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@Stanislav\_Sidorov](https://community.sendbird.com/u/Stanislav_Sidorov)\
**Post date:** [November 3, 2021, 8:00pm UTC](https://community.sendbird.com/t/sendbirdexception-command-received-no-ack/1925/11 "2021-11-03T20:00:04Z")

</div>

thanks, same for me, problem was with mark as read fired twice

```auto
React.useEffect(() => {
    if (channel?.unreadMessageCount) {
      markAsRead();
    }
  }, [markAsRead, messages, channel]);

```

---

<div class="post-metadata">

**Author:** ![krsteve](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/krsteve/32/3881_2.png) [@krsteve](https://community.sendbird.com/u/krsteve)\
**Post date:** [April 21, 2023, 12:01pm UTC](https://community.sendbird.com/t/sendbirdexception-command-received-no-ack/1925/12 "2023-04-21T12:01:01Z")

</div>

@Nicholas_Gelinas@Stanislav_Sidorov

Thanks, guys! You guys have saved me hours of debugging! 💪
