You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Uncaught TypeError: Failed to construct 'Request': Referrer 'http://127.0.0.1:8000http://127.0.0.1:8000/4b78be26-cdf7-42a9-a59f-097945b09779' is not a valid URL.
at ajax.js:95
I only see this error when using dynamically generated iframe content.
This was working with mapbox-gl v0.50 and prior.
Thanks for reporting this issue. It looks like window.top.location works if the embedding document is loading the map document via a blob URL or data URL, but fails if it's loaded via a http URL that isn't the same origin as the embedding document.
Safari and Firefox have the same behavior. When a URL is loaded via blob URL, the pathname is the full blob URL (e.g. http://127.0.0.1:8000/4b78be26-cdf7-42a9-a59f-097945b09779), which doesn't seem sensible. Using window.top.location would fail if the embedded document was loaded from a different origin than the host document, so I think we'll need to detect blob/data URLs and only use window.top.location (or window.parent.location?) in that case.
mapbox-gl-js version:
0.53.1
browser:
Chrome 72.0.3626
Steps to Trigger Behavior
I only see this error when using dynamically generated iframe content.
This was working with mapbox-gl v0.50 and prior.
Looks like the issue was introduced here:
mapbox-gl-js/src/util/ajax.js
Line 82 in eec8cd5
If
window.top.location
is used instead ofwindow.location
the issue will go away.The text was updated successfully, but these errors were encountered: