dart-pad icon indicating copy to clipboard operation
dart-pad copied to clipboard

Connecting to Firebase Realtime Database throws cross-origin error

Open puf opened this issue 3 years ago • 2 comments

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 :)

puf avatar Mar 30 '22 22:03 puf

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.

puf avatar Apr 19 '22 15:04 puf

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 =)

domesticmouse avatar Apr 19 '22 21:04 domesticmouse