qiscus / qiscus-sdk-web-core

Qiscus provide everything you need to power up your app with chats. And it's now made simple.
https://www.qiscus.com
Apache License 2.0
8 stars 23 forks source link

TypeError: Cannot read property 'brokerLbUrl' of undefined #59

Closed L-U-C-K-Y closed 4 years ago

L-U-C-K-Y commented 4 years ago

Dear Qiscus Team

I receive the following error in our react app:

TypeError
Cannot read property 'brokerLbUrl' of undefined

At:

 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <http://feross.org>
 * @license  MIT
 */
{snip} (e),t}},se=function(){function e(t,r,n,i){var o,a=this,c=i.brokerLbUrl,f=i.enableLb;l()(this,e),d()(this,"subscribtionBuffer",[]),d()(this," {snip}
//# sourceMappingURL=qiscus-sdk-core.min.js.map

Qiscus Version: "qiscus-sdk-core": "2.9.10"

Do you have a clue what this could be?

adicatur commented 4 years ago

Hi @lucbas can you share prior process or steps on how do you get this error?

L-U-C-K-Y commented 4 years ago

Hi @adicatur,

We were just initializing the Qiscus SDK Core in our react app and were not executing any specific actions. Here is more detailed log of sentry:

image

We have so far upgraded to "qiscus-sdk-core": "2.9.11", but are still experiencing this error.

Would you recommend upgrading to 3.0.0? I saw that there are breaking changes, but it's not described what they are breaking.

adicatur commented 4 years ago

Hi @lucbas thanks for the screenshot, can you share your code on how do you initializing? or you can share to this email: catur@qiscus.com

Would you recommend upgrading to 3.0.0? I saw that there are breaking changes, but it's not described what they are breaking.

that's correct that 3.0.0 is breaking changes, it uses typescript and it's refactoring version, this version is cleaner and also has ability to support multiple appID :)

L-U-C-K-Y commented 4 years ago

Sure thing, I have sent you an email.

We initialize Qiscus as follows:

export const init = () => {
  qiscus.init({
    AppId: appId,
  });
};

Where the appId comes from an environment variable.

Most of the times, the healthchecks that Qiscus performs work, but there are some instances where I get the above error.

adicatur commented 4 years ago

Ok thanks,

Just wondering on how the qiscus init being called, we see the screenshot somehow every time when the realtime-lb called three time at same time it shows undefined

prazedotid commented 4 years ago

I was also facing this problem, downgrading the SDK to version 2.9.7 fixed the issue for me.

adicatur commented 4 years ago

Hi @prazeblaze

Ok, we still working on to fix this issue will let you know the update

adicatur commented 4 years ago

Hi @prazeblaze @L-U-C-K-Y

We just released the latest version for fixing this issue, can you try using our latest version? you can find the changelog here: https://github.com/qiscus/qiscus-sdk-web-core/releases/tag/v2.9.12

L-U-C-K-Y commented 4 years ago

Thanks @adicatur, I have merged it into our code base and will update this thread after checking the stats.

L-U-C-K-Y commented 4 years ago

Looking good so far from my side, @prazeblaze is it also resolved for you?