# Sendbird connection error issue (jQuery)

**URL:** <https://community.sendbird.com/t/sendbird-connection-error-issue-jquery/1086>\
**Category:** JavaScript\
**Tags:** chatsdk\
**Created:** [October 1, 2020, 2:12pm UTC](https://community.sendbird.com/t/sendbird-connection-error-issue-jquery/1086 "2020-10-01T14:12:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![moomoo](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/moomoo/32/495_2.png) [@moomoo](https://community.sendbird.com/u/moomoo)\
**Post date:** [October 1, 2020, 2:12pm UTC](https://community.sendbird.com/t/sendbird-connection-error-issue-jquery/1086/1 "2020-10-01T14:12:04Z")

</div>

Hi guys, I am trying to connect to sencbird server but I got this error and cannot resolve it. the error is like below.

“Uncaught TypeError: Cannot read property ‘get’ of undefined”

The code I wrote is below.

```
<script>
sb = new SendBird({
    appId: "xxyyzz"
});
sb.connect("x", "bb", function(user, error) { console.log(error); });
</script>

```

And also posting the sentry error report also.

 ![스크린샷 2020-10-01 오후 11.04.11](https://us1.discourse-cdn.com/flex020/uploads/sendbird/original/1X/bd30abe7b73d17f1ec24e89e79ca5aaf9cd6ff43.png)

How could I handle this error?

Thanks in advance 🙂

---

<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:** [October 1, 2020, 7:11pm UTC](https://community.sendbird.com/t/sendbird-connection-error-issue-jquery/1086/2 "2020-10-01T19:11:45Z")

</div>

Hi Moomoo

Please refer to this official page and download the SDK.

> **[sendbird/SendBird-SDK-JavaScript](https://github.com/sendbird/SendBird-SDK-JavaScript)**
>
> SendBird JavaScript SDK. Please visit https://community.sendbird.com for any questions! - sendbird/SendBird-SDK-JavaScript

1. Create an HTML (remember you need to include Axios)

```auto
  <html>
    <head>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width">
      <title>JS Bin</title>
      <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
      <script src="./sdk/SendBird.min.js"></script>
      <script src="index.js"></script>
    </head>
    <body>
    </body>
    </html>

```

1. Create your index.js

```auto
var sb = new SendBird({ appId: "..." });
sb.connect("test1", function(user, error) { console.log(user); }); 

```

Note: Try to use a userId (“test1” in my case) that exists in your Dashboard.

---

<div class="post-metadata">

**Author:** ![moomoo](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/moomoo/32/495_2.png) [@moomoo](https://community.sendbird.com/u/moomoo)\
**Post date:** [October 1, 2020, 7:51pm UTC](https://community.sendbird.com/t/sendbird-connection-error-issue-jquery/1086/3 "2020-10-01T19:51:19Z")

</div>

Thanks walter!

```
      <script src="https://unpkg.com/axios/dist/axios.min.js"></script>

```

the code above fix my problem! thanks a lot 😃
