nhagen / react-intercom

A component to configure and enable Intercom in your react application
MIT License
237 stars 72 forks source link

IntercomAPI not working properly #18

Closed ffxsam closed 8 years ago

ffxsam commented 8 years ago

For some reason, this has stopped working for me in production.

import { IntercomAPI } from 'react-intercom';

And I'm using this to try to track events, but it doesn't work. I did some digging, and thought this was interesting:

(in Chrome console)

x = require('react-intercom').IntercomAPI
- a(){a.c(arguments)}
window.Intercom === x
- false

Yet in development (local server), x === window.Intercom is true. Very strange. I'll have to just use window.Intercom for the time being.

giuliano-melo commented 8 years ago

I am having this same issue. @ffxsam did you updated the intercom messenger to the new version recently released???

ffxsam commented 8 years ago

I did update, but I haven't tried using IntercomAPI directly again. Still using window.Intercom. I'll try it out later. If you update and notice it's fixed, let me know!

giuliano-melo commented 8 years ago

@ffxsam I started having problems just after updating to the new version. Did the same happen to you?

ffxsam commented 8 years ago

Oh sorry, I misunderstood. You're saying the new update is when it broke. That might be the case, I'm not sure when it happened to be honest.

mberkom commented 8 years ago

Started having the same problem after updating to the latest messenger. See PR above for the fix we implemented.

djmccormick commented 8 years ago

We lost a ton of event data silently due to this issue. It did seem to be after the new messenger was released.

nhagen commented 8 years ago

Very sorry about that--I've merged in the fix which looks like a nice backwards compatible solution. Let me know if anyone continues to have this issue with latest.