TypeError: Cannot read property '_iid' of null

Hi can anyone help me out with this error? I get it when I try to connect my application with sendbird.
Heres my code…

export{}

import * as SendBird from “sendbird”;
var sb = new SendBird({ appId: ‘’ });

var sb = new SendBird({appId: ‘’});

sb.connect(’’, ‘’, function(_user:any, _error:any) {});
// sb.connect(USER_ID, function(user, error) {
// if (error) {
// console.log(error)
// return;
// }
// });

//Testing by creating a channel
// sb.OpenChannel.createChannel(function(_openChannel:any, _error:any) {
// if (_error) {
// return;
// }
// });

@adobayua Hi, could you share your error message?

Hey @adobayua,

Seems you are not passing through a user id which the connect() method expects.

sb.connect() expects the following arguments:

  • USER_ID
  • ACCESS_TOKEN (optional, depending on your auth config)
  • CALLBACK

You can check out the docs for more details:

Hope it helps!

1 Like