Answered

Intercom Error: 'Uncaught TypeError: Cannot read properties of null (reading 'document')'

  • 2 August 2023
  • 5 replies
  • 695 views

I’m getting an error for identified users with `user_hash`, using the javascript API
The Intercom.booted is true, but I can’t show it even with Intercom(‘show’) from the console, other events like shutdown throws this error which breaks other parts of our code

 

is this a known issue? or is there a debug mode or something that can help me figure out the cause of the issue, it used to work just fine and it works perfectly for visitors

 

icon

Best answer by Jacob Cox 5 August 2023, 23:09

View original

5 replies

Userlevel 4
Badge +5

Hi @bourhaouta !

If you turn of Identity Verification for Web do you still run into issues? If not, then it’s most likely an issue with an incorrectly calculated user_hash. One thing to keep in mind is that if you use user_id’s as your unique User identifier, then you’ll want to make sure you’re creating the hash with the user_id value and NOT the email address. You can read up on Identity Verification in more detail here.

 

If the error doesn’t go away after turning that off then we can look in other directions for the issue. If this is the case, are there any other Intercom-related Errors popping up in the Console or Network tab?

@Jacob Cox I am also experiencing this issue. 

Once this issue occurs, no other intercom actions like events are being sent to intercom. This is causing us to miss events. 

Here’s my exact scenario. 

  • I do not utilize Identity verification
  • Intercom is loaded through the segment integration

i got same issue when i use replace page from useRouter() with nextjs app router, any update for this?

Same error here, in production or on `localhost` with identified users. I’m using Remix.

Userlevel 4
Badge +5

Hey there @mkk and @hieu !

I’m going to have our customer support team reach out to you all so they can dig into this with you and investigate. They will reach out to you via the email address that you signed up with so keep an eye out for their message!

Reply