Skip to content

SDK attempting to call localStorage.get() when unavailable #23

@mogelbrod

Description

@mogelbrod

We've gotten a significant number of automated error reports from the HJ script loaded through https://static.hotjar.com/c/hotjar-${hotjarId}.js?sv=${window._hjSettings.hjsv}:

Screenshot 2023-08-07 at 13 34 26 (screenshot from Sentry)

This appears to be caused by the SDK attempting to access localStorage when unavailable, such as when in a private/incognito session. The stack trace shows that there is a canUseLocalStorage() check nearby, but it either isn't being called correctly or doesn't handle this edge case.

I couldn't find good place to report this issue to a HJ developer - feel free to point me in the right direction if this is not the place.

Metadata

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