lightstep / lightstep-tracer-javascript

Lightstep distributed tracing library for Node.js and the browser
https://lightstep.com
MIT License
77 stars 66 forks source link

[Chrome] lighstep-tracer triggers browser errors: `Security Error: Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document.` #192

Closed djmally closed 4 years ago

djmally commented 4 years ago

lightstep-tracer version: 0.24.0-no_protobuf Browser: Google Chrome 78.0.3904.97 (Official Build) (64-bit)

Issue: We have a page that loads lightstep-tracer, and that page is sometimes loaded inside an iframe. When this happens, lighstep-tracer triggers an error in the browser that reads "Security Error: Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document.", which causes the tracer to fail to load. I am only able to reproduce this when third-party cookies are disabled in Chrome.

It looks to me like this is coming from this code path: https://github.com/lightstep/lightstep-tracer-javascript/blob/9adf60e3723d5c4e2fbf101723ac7a22744098f2/src/imp/platform/browser/platform_browser.js#L117-L135

kavehhh commented 4 years ago

@djmally I'm going to close this issue