Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDK failing when loaded within iframe data URI #864

Closed
onassar opened this issue Oct 17, 2024 · 2 comments
Closed

SDK failing when loaded within iframe data URI #864

onassar opened this issue Oct 17, 2024 · 2 comments

Comments

@onassar
Copy link

onassar commented Oct 17, 2024

I'm getting the following error (as of today) in an iframe that makes use of the SDK:

common.js:214 Uncaught DOMException: Failed to read the 'sessionStorage' property from 'Window': Storage is disabled inside 'data:' URLs.
at https://maps.googleapis.com/maps-api-v3/api/js/58/9/common.js:214:162

I'm using the following:

This then loads the following scripts:

It seems like this is happening because the SDK is failing when attempting to access the sessionStorage object. This appears to managed in a fault-tolerant way here, but not here.

It looks like the file just needs to be updated with a try/catch for instances where the sessionStorage object is not accessible.

Please advise if more information is needed.

@onassar onassar added triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Oct 17, 2024
@usefulthink
Copy link
Contributor

At first glance, this looks like a valid issue, but it has nothing to do with the @googlemaps/js-api-loader project.

Instead, it would be best to report this in the issue tracker for the Maps JavaScript API. There seems to be a similar issue reported already that you can upvote: https://issuetracker.google.com/issues/373893062

@usefulthink usefulthink removed type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. triage me I really want to be triaged. labels Oct 18, 2024
@usefulthink
Copy link
Contributor

This was now marked as fixed in upstream, so I'll be closing this as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants