Skip to content

"Cannot read property 'location' of null" error in javascript #244

Closed
@guillehorno

Description

Hi. I've recently integrated javascript error reporting and started to see some exceptions from the intercom javascript script. The error comes from https://js.intercomcdn.com/frame.2f08db79.js , line 24 column 701. It's the definition of the function _getCurrentPage

r.prototype._getCurrentPage=function(){return window.location.href}

I'm not sure if this is normal, looks like in the context of the execution of this function window is undefined.

This is the complete stack trace:

File https://js.intercomcdn.com/frame.2f08db79.js line 24 col 701 in r._getCurrentPage
File https://js.intercomcdn.com/frame.2f08db79.js line 23 col 31744 in r._sendUserPresenceEvent
File https://js.intercomcdn.com/frame.2f08db79.js line 23 col 31549 in r._userPresence
File https://js.intercomcdn.com/frame.2f08db79.js line 23 col 30925 in r.setUserPresent
File https://js.intercomcdn.com/frame.2f08db79.js line 17 col 13232 in [anonymous]
File https://js.intercomcdn.com/frame.2f08db79.js line 17 col 4198 in [anonymous]
File https://js.intercomcdn.com/frame.2f08db79.js line 17 col 12460 in [anonymous]
File https://js.intercomcdn.com/frame.2f08db79.js line 29 col 5518 in [anonymous]
File https://js.intercomcdn.com/frame.2f08db79.js line 5 col 16073 in onUserPresent
File https://js.intercomcdn.com/frame.2f08db79.js line 17 col 16044 in l
File https://js.intercomcdn.com/frame.2f08db79.js line 17 col 16160 in HTMLDocument.h

Thanks!

Version info

  • intercom-rails version: 0.3.4
  • Rails version: 5.0.1

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions