CaliStyle / ng-intercom

Angular 7+ Wrapper for Intercom.com
MIT License
54 stars 46 forks source link

window.Intercom is not a function #62

Closed hassanasad closed 6 years ago

hassanasad commented 6 years ago

Versions

Description

After moving to beta.3, started getting errors Object doesn't support property or method 'Intercom'

File webpack:///node_modules/ng-intercom/esm5/ng-intercom.js:57e.prototype.update

Sometimes another error shows window.Intercom is not a function

File webpack:///node_modules/ng-intercom/esm5/ng-intercom.js:58e.prototype.update

It was working fine with beta.2

Attached image from bugsnag for reference. screenshot 2018-09-12 13 15 29

wbhob commented 6 years ago

Can you share browser/os info please

hassanasad commented 6 years ago

I have checked and its not one specific OS or browser.

Its reported on:

hassanasad commented 6 years ago

@wbhob any update ? :)

wbhob commented 6 years ago

Sorry, I have no idea what this issue might be. How is this being called? Have you verified that the Intercom JS has been loaded?

hassanasad commented 6 years ago

I couldn't stay on beta3 for long because of this issue. Reverting back to beta2 fixes the issue for me :)

ghost commented 6 years ago

Same here

wbhob commented 6 years ago

@scott-wyatt do you have any idea what the issue might be?

ghost commented 6 years ago

@wbhob race condition, I dunno. Just rolled-back to beta2.

scott-wyatt commented 6 years ago

Yeah, there really should be a test that Intercom is defined on the window before it attempts this, that's likely the issue.

wbhob commented 6 years ago

I attempted a fix in #67. Sorry for the lack of attention on our end!