dart-pad
dart-pad copied to clipboard
Connecting to Firebase Realtime Database throws cross-origin error
What happened?
Connecting to the Firebase Realtime Database in Dartpad (dev channel at the moment) raises
Uncaught DOMException: Blocked a frame with origin "null" from accessing a cross-origin frame.
And:
Sandbox access violation: Blocked a frame at "https://dartpad.dev" from accessing a frame at "null". Both frames are sandboxed and lack the "allow-same-origin" flag.
Steps to reproduce problem
https://dartpad.dev/?channel=dev&id=ea50f75646c5fb0c4433a4b82cfb5fea
Additional info
Browser
Browser: Chrome
Version: Version 99.0.4844.83 (Official Build) (x86_64)
Errors in JavaScript console:
Uncaught DOMException: Blocked a frame with origin "null" from accessing a cross-origin frame.
And:
Sandbox access violation: Blocked a frame at "https://dartpad.dev" from accessing a frame at "null". Both frames are sandboxed and lack the "allow-same-origin" flag.
Machine
Operating system: macOS
Version:
Your code
See Dartpad that I linked in Steps-to-reproduce :)
Some notes:
- The same code/SDK work fine in a standalone Flutter web app.
- The same SDK works fine in other web edits that have a preview frame, such as stackblitz, jsbin and jsfiddle.
To drop the Sandbox constraints we need to go back through Security Review for Dart Services. I'd really prefer not to have to go through Security Review again =)