amplitude / Amplitude-TypeScript

TypeScript Amplitude Analytics SDK
https://amplitude.github.io/Amplitude-TypeScript/
MIT License
135 stars 39 forks source link

Security Error: Failed to read the 'localStorage' property from 'Window': Access is denied for this document. #888

Open ashishkpoudel opened 1 month ago

ashishkpoudel commented 1 month ago

I am using the updated version of "@amplitude/analytics-browser": "^2.9.3" where the fix for the reported issue was released.

The issue still exists and results in an unexpected error, which crashes the application https://github.com/amplitude/Amplitude-TypeScript/pull/793

Expected Behavior

Amplitude library should handle the error in case of Access denied for the document

Current Behavior

It results in an un-expected error when trying to access localStorage

Possible Solution

Steps to Reproduce

image

Environment