Sendbird & Ember -- TypeError: l.isMatchingType is not a function

Howdy Folks!

I am exploring the Sendbird javascript SDK inside of an Ember application and I can’t get a user connected. I’ve published a minimal example to github below.

When Sendbird#connect is called it throws the following exception: TypeError: l.isMatchingType is not a function

Since the SDK source is minified it’s hard to say exactly what is going on under the hood. Any help would be appreciated! Thanks!

1 Like

We found a cached GitHub issue related to my error:

The last update states:

Maybe this will help someone: we got this error in our project because someone had manually added a couple of functions to Array.prototype.

I’m fairly certain this is something Ember does by default with no ability to opt-out.

It looks like you MAY be able to disable them:

Thanks @Tyler! You’re right it looks like that is possible. The side-effects of doing that are pretty impactful. Do you have any insights in making the isMatchingType check more robust so it works with prototype extensions?

As a note, I did test this in ember with the array extension turned off and I was able to successfully connect using your example code. That being said, based on my limited knowledge of Ember, I do agree that turning it off would be potentially impactful.

In regards to your actual question, I’m not sure I’m going to be of much help here. That is likely going to require someone from Sendbird to chime in. Sorry I couldn’t be of more help.

1 Like

I appreciate you checking @Tyler! I’m in contact with @Doug_Exner now to see if we can get this addressed.

If you figure something out, please let me know. I don’t know much about Ember, but this problem definitely has me curious!

We see the same behavior on Angular 10 with SendBird version 3.0.127. We therefor downgraded SendBird back to version 3.0.108 which is working.