Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: Cannot read property 'appId' of null #295

Open
summera opened this issue Jul 10, 2018 · 7 comments
Open

Uncaught TypeError: Cannot read property 'appId' of null #295

summera opened this issue Jul 10, 2018 · 7 comments
Labels

Comments

@summera
Copy link

summera commented Jul 10, 2018

Version info

  • intercom-rails version: 0.3.5
  • Rails version: 5.1.4

Expected behavior

No error.

Actual behavior

Receiving Uncaught TypeError: Cannot read property 'appId' of null in console in one of our testing environments and then the Messenger does not show. What's interesting, is this is not happening in our production environment. The testing environment and production environment are using separate Intercom apps. I'm using Turbolinks and it seems to happen on a Turbolinks page load (rather than a full page load) and when using the back button. This is happening in Chrome 67.0.3396.99. I've tried clearing cache and cookies for the domain and that doesn't fix. I don't see the error in Chrome Incognito mode or in Firefox.

Logs

VM206 frame.33e73fb5.js:1 Uncaught TypeError: Cannot read property 'appId' of null
    at c.t.mapStateToProps [as finalMapStateToProps] (VM206 frame.33e73fb5.js:1)
    at c.computeStateProps (VM206 frame.33e73fb5.js:1)
    at c.updateStatePropsIfNeeded (VM206 frame.33e73fb5.js:1)
    at s (VM206 frame.33e73fb5.js:1)
    at c.handleChange (VM206 frame.33e73fb5.js:1)
    at l (VM206 frame.33e73fb5.js:1)
    at VM206 frame.33e73fb5.js:1
    at VM206 frame.33e73fb5.js:1
    at VM206 frame.33e73fb5.js:1
    at VM206 frame.33e73fb5.js:1
    at VM206 frame.33e73fb5.js:1
    at VM206 frame.33e73fb5.js:1
    at VM206 frame.33e73fb5.js:1
    at VM206 frame.33e73fb5.js:1
    at Object.dispatch (VM206 frame.33e73fb5.js:1)
    at e.destroy (VM206 frame.33e73fb5.js:1)
    at e.destroySession (VM206 frame.33e73fb5.js:1)
    at Object.shutdown (VM206 frame.33e73fb5.js:1)
    at VM206 frame.33e73fb5.js:1
    at HTMLDocument.y (shim.86cccbeb.js:1)
    at HTMLDocument.e.bugsnag (application-d59dced96c29ca862c6a80fba0b2af5d765061252cc66fb0851760e10d3d13f9.js:11)
    at Object.e.dispatch (application-d59dced96c29ca862c6a80fba0b2af5d765061252cc66fb0851760e10d3d13f9.js:10)
    at n.notifyApplicationAfterVisitingLocation (application-d59dced96c29ca862c6a80fba0b2af5d765061252cc66fb0851760e10d3d13f9.js:11)
    at n.startVisit (application-d59dced96c29ca862c6a80fba0b2af5d765061252cc66fb0851760e10d3d13f9.js:11)
    at n.historyPoppedToLocationWithRestorationIdentifier (application-d59dced96c29ca862c6a80fba0b2af5d765061252cc66fb0851760e10d3d13f9.js:11)
    at n.onPopState (application-d59dced96c29ca862c6a80fba0b2af5d765061252cc66fb0851760e10d3d13f9.js:10)
    at application-d59dced96c29ca862c6a80fba0b2af5d765061252cc66fb0851760e10d3d13f9.js:10
t.mapStateToProps @ VM206 frame.33e73fb5.js:1
c.computeStateProps @ VM206 frame.33e73fb5.js:1
c.updateStatePropsIfNeeded @ VM206 frame.33e73fb5.js:1
s @ VM206 frame.33e73fb5.js:1
c.handleChange @ VM206 frame.33e73fb5.js:1
l @ VM206 frame.33e73fb5.js:1
(anonymous) @ VM206 frame.33e73fb5.js:1
(anonymous) @ VM206 frame.33e73fb5.js:1
(anonymous) @ VM206 frame.33e73fb5.js:1
(anonymous) @ VM206 frame.33e73fb5.js:1
(anonymous) @ VM206 frame.33e73fb5.js:1
(anonymous) @ VM206 frame.33e73fb5.js:1
(anonymous) @ VM206 frame.33e73fb5.js:1
(anonymous) @ VM206 frame.33e73fb5.js:1
(anonymous) @ VM206 frame.33e73fb5.js:1
e.destroy @ VM206 frame.33e73fb5.js:1
e.destroySession @ VM206 frame.33e73fb5.js:1
shutdown @ VM206 frame.33e73fb5.js:1
(anonymous) @ VM206 frame.33e73fb5.js:1
y @ shim.86cccbeb.js:1
e.bugsnag @ application-d59dced96c29ca862c6a80fba0b2af5d765061252cc66fb0851760e10d3d13f9.js:11
e.dispatch @ application-d59dced96c29ca862c6a80fba0b2af5d765061252cc66fb0851760e10d3d13f9.js:10
n.notifyApplicationAfterVisitingLocation @ application-d59dced96c29ca862c6a80fba0b2af5d765061252cc66fb0851760e10d3d13f9.js:11
n.startVisit @ application-d59dced96c29ca862c6a80fba0b2af5d765061252cc66fb0851760e10d3d13f9.js:11
n.historyPoppedToLocationWithRestorationIdentifier @ application-d59dced96c29ca862c6a80fba0b2af5d765061252cc66fb0851760e10d3d13f9.js:11
n.onPopState @ application-d59dced96c29ca862c6a80fba0b2af5d765061252cc66fb0851760e10d3d13f9.js:10
(anonymous) @ application-d59dced96c29ca862c6a80fba0b2af5d765061252cc66fb0851760e10d3d13f9.js:10
application-d59dced96c29ca862c6a80fba0b2af5d765061252cc66fb0851760e10d3d13f9.js:11 
@jpdelorenzo
Copy link

I have the same issue.

In my case the issue persist for both environment.

Any ideas?

@summera
Copy link
Author

summera commented Jul 26, 2018

@SeanHealy33 any idea what's going on here?

@adnan-kamili
Copy link

This happens when I call (window as any).Intercom('shutdown'); in my angular app

@andychongyz
Copy link

Try remove the intercom cookies
mike-north/ember-intercom-io#149

@jpdelorenzo
Copy link

Any update?

@MatthewHerbst
Copy link

MatthewHerbst commented Dec 3, 2018

I just experienced this as well. Our Intercom is installed via Segment 1.1

Uncaught (in promise) TypeError: Cannot read property 'appId' of null
    at frame.919fe903.js:25
    at frame.919fe903.js:25
    at frame.919fe903.js:25
    at frame.919fe903.js:25
    at frame.919fe903.js:25
    at frame.919fe903.js:11
    at frame.919fe903.js:25
    at dispatch (frame.919fe903.js:25)
    at Object.<anonymous> (frame.919fe903.js:11)
    at o (frame.919fe903.js:25)
    at Generator._invoke (frame.919fe903.js:25)
    at Generator.e.(anonymous function) [as next] (https://js.intercomcdn.com/frame.919fe903.js:25:84907)
    at o (frame.919fe903.js:11)
    at frame.919fe903.js:11

@foureight84
Copy link

I have been seeing this as well. What I think is happening is that the shutdown call runs while Intercom process is loading (not 100% certain). My current work around is to add a delay to the shutdown:

setTimeout( () => {window.Intercom('shutdown')}, 600)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants