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.
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
localStorageduring the build of mixpanel caused this issue!!!Please add try-catch or adjust the initialization timing for these statements, at least to prevent the entire application from crashing upon import.