Skip to content

SecurityError appeared in versions 2.61.0 to 2.71.0 (Safari disabled cookies). #530

@cvvix

Description

@cvvix

As the title says, when cookies are disabled in Safari, importing mixpanel causes the entire application to crash, reporting the following error:
Unhandled Promise Rejection: SecurityError: The operation is insecure.
After investigation, it was found that an operation on localStorage during the build of mixpanel caused this issue!!!

_.localStorage = _storageWrapper(win.localStorage, 'localStorage', localStorageSupported);

Please add try-catch or adjust the initialization timing for these statements, at least to prevent the entire application from crashing upon import.

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