segment-integrations / analytics.js-integration-intercom

The Intercom analytics.js integration.
https://segment.com/docs/integrations/intercom/
MIT License
7 stars 13 forks source link

Cannot read property 'indexOf' of undefined #14

Open laander opened 8 years ago

laander commented 8 years ago

I'm starting to experience a new error that i haven't seen before. As the Intercom source is minified, it's quite hard to backtrace, but here's my best bet.

It seems to happen when click the launch button (bottom-right), so it shouldn't be related to identify or track calls. Looking at the code in question, it looks like it's trying to read the Intercom app name and/or some settings related to that and perform an indexOf on that.

Here's my best bet at descrambling:

// Line 5:21844
{snip} [t]:void 0},e)}function o(e){var t=i(e,"app.name");return t.indexOf(/team/gi)<0&&A.isLocaleEnglish()?t+" Team":t}function r(e){return T.isEn {snip}
TypeError: Cannot read property 'indexOf' of undefined
  at o(/intercom.dd959f00.js:5:21844)
  at Object.get(/intercom.dd959f00.js:5:24004)
  at render(/intercom.dd959f00.js:14:18902)
  at renderLoading(/intercom.dd959f00.js:10:5108)
  at .renderLoading(/intercom.dd959f00.js:1:9784)
  at showLoading(/intercom.dd959f00.js:10:5591)
  at showLoading(/intercom.dd959f00.js:9:27444)
  at fetchConversations(/intercom.dd959f00.js:9:28909)
  at .fetchConversations(/intercom.dd959f00.js:1:9784)
  at show(/intercom.dd959f00.js:9:26304)
  at a.<anonymous>(/intercom.dd959f00.js:8:17177)
  at a.<anonymous>(/intercom.dd959f00.js:8:19880)
  at Object.<anonymous>(/intercom.dd959f00.js:3:8562)
  at m(/intercom.dd959f00.js:3:7182)
  at Object.add [as done](/intercom.dd959f00.js:3:7493)
  at Array.<anonymous>(/intercom.dd959f00.js:3:8539)
  at Function.each(/intercom.dd959f00.js:2:15557)
  at Object.<anonymous>(/intercom.dd959f00.js:3:8479)
  at Function.Deferred(/intercom.dd959f00.js:3:9069)
  at Object.then(/intercom.dd959f00.js:3:8455)
  at a.whenReady(/intercom.dd959f00.js:8:19770)
  at a.showWhenReady(/intercom.dd959f00.js:8:19823)
  at a.show(/intercom.dd959f00.js:8:17029)
  at a.onLauncherClicked(/intercom.dd959f00.js:8:19999)
  at u(/intercom.dd959f00.js:5:4489)
  at Object.trigger(/intercom.dd959f00.js:5:3807)
  at onClicked(/intercom.dd959f00.js:14:27621)
  at HTMLDivElement.dispatch(/intercom.dd959f00.js:3:18962)
  at HTMLDivElement.g.handle(/intercom.dd959f00.js:3:15637)
  at apply(raven.js:329:28)

I have no clue whether this is a Segment-specific issue or Intercom, but I couldn't find an issue tracker for Intercom's JS lib so I'm posting here first.

SegmentDestinationsBot commented 4 years ago

Hi @laander, as part of the monorepo migration, this issue has been moved to new issue. Our engineers have been notified and will prioritize and work on it ASAP. Thank you!

For more information, see README.md.