# SendBird Desk v1.0.19 not compatible with SendBird v3.1.0 to v3.1.4 inclusively

**URL:** <https://community.sendbird.com/t/sendbird-desk-v1-0-19-not-compatible-with-sendbird-v3-1-0-to-v3-1-4-inclusively/3515>\
**Category:** JavaScript\
**Tags:** desk, chatsdk\
**Created:** [December 8, 2021, 6:34pm UTC](https://community.sendbird.com/t/sendbird-desk-v1-0-19-not-compatible-with-sendbird-v3-1-0-to-v3-1-4-inclusively/3515 "2021-12-08T18:34:19Z")\
**Posts on this page:** 2\
**Page:** 1

<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:** [December 8, 2021, 6:34pm UTC](https://community.sendbird.com/t/sendbird-desk-v1-0-19-not-compatible-with-sendbird-v3-1-0-to-v3-1-4-inclusively/3515/1 "2021-12-08T18:34:19Z")

</div>

Hey there! I realize there have not been any release notes for the 3.1.0, 3.1.1 and 3.1.2 chat releases but since they’re available from [NPM](https://www.npmjs.com/package/sendbird) and [GitHub](https://github.com/sendbird/SendBird-SDK-JavaScript/releases), I would like to report that they are not recognized by the latest version of the SendBird Desk client (v1.0.19 at the time of this writing). When initializing the SendBird Desk class with the SendBird client class (as per the docs), I get the following error:

```auto
SendBirdDeskError: SendBird SDK is missing

```

This is easily reproducible with the following JS snippet with `sendbird-desk` v1.0.19 and `sendbird` v3.1.0, v3.1.1 or v3.1.2:

```auto
import SendBird from "sendbird";
import Desk from "sendbird-desk";

/**
 * @typedef {Object} Connection
 * @property {string} accessToken
 * @property {SendBird.SendBirdInstance} client
 * @property {SendBird.User} user
 * @property {string} userId
 */

/**
 *
 * @param {string} appId
 * @param {string} userId
 * @param {string} accessToken
 * @returns {Promise<Connection>}
 */
function initializeSendbird(appId, userId, accessToken) {
  return new Promise((resolve, reject) => {
    const client = new SendBird({ appId });
    console.debug(`Created SendBird client: `, client);

    client.connect(userId, accessToken, (user, err) => {
      if (err) {
        console.debug(`Could not connect to SendBird servers: `, err);
        return reject(new Error(`Could not connect to SendBird: ${err}`));
      }

      /** @type {Connection} */
      const connection = { accessToken, client, user, userId };
      console.debug(
        `Connected to SendBird servers as connection: `,
        connection
      );

      return resolve(connection);
    });
  });
}

/**
 * @param {Connection} conn
 * @return {Promise<Connection>}
 */
function initializeDesk(conn) {
  const { accessToken, userId } = conn;

  Desk.init(SendBird);
  console.debug(`Initialized SendBird Desk with global SendBird class.`);

  return new Promise((resolve, reject) => {
    Desk.authenticate(userId, accessToken, (result, err) => {
      if (err) {
        console.debug(
          `Could not authenticate with SendBird Desk servers: `,
          err
        );
        return reject(err);
      }

      console.debug(`SendBird Desk connected and authenticated: `, result);
      return resolve(conn);
    });
  });
}

const example = () => {
  const appId = "SENDBIRD_APP_ID";
  const userId = "SENDBIRD_USER_ID";
  const accessToken = "SENDBIRD_USER_ACCESS_TOKEN";

  initializeSendbird(appId, userId, accessToken)
    .then(initializeDesk)
    .then(
      (conn) =>
        console.debug(`SendBird is ready for use with connection: `, conn),
      (err) => console.error(err)
    );
};

```

With the above snippet running `example`, the console shows the following logs:

```auto
Created SendBird client: ...
Connected to SendBird servers as connection: ...
SendBirdDeskError: SendBird SDK is missing (stack trace)

```

The above snippet works with `sendbird` v3.0.160 though. I can’t offer any more specific information as the stack trace shows an error on line 6 of `SendBird.Desk.min.js` (which is of course minified at source with no source maps available…)

If `sendbird` v3.1.x onward will not be compatible with `sendbird-desk`, the relevant dependency in [`package.json`](https://github.com/sendbird/SendBird-Desk-SDK-JavaScript/blob/v1.0.19/package.json#L27) should be updated to reflect this constraint.

Apart from that, I’d love to try out the new local caching features and no longer use the SyncManager but we need the Desk client to work with it though. Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![Woo](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/woo/32/125_2.png) [@Woo](https://community.sendbird.com/u/Woo)\
**Post date:** [February 3, 2022, 4:41pm UTC](https://community.sendbird.com/t/sendbird-desk-v1-0-19-not-compatible-with-sendbird-v3-1-0-to-v3-1-4-inclusively/3515/2 "2022-02-03T16:41:27Z")

</div>

Hello @Nicholas_Gelinas Thanks for your patient!

I will let our Javascript team know and see if we can update desk with latest version.
