segmentio / segmentio/analytics.js-integrations

[intercom] Cannot read property 'indexOf' of undefined

Open
#309 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
125
Forks
136
Avg merge
2h 45m
Merged PRs (30d)
1

Description

Migrated from #14 by @laander

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository file or test is named. Start by reproducing the error through the Intercom launcher and inspect the reported stack trace around the minified Intercom script to determine whether the failure comes from this integration or the external library. Done means identifying a repository-owned change or confirming that the fault is outside this project.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.