Open kevmo314 opened 3 years ago
Hi @kevmo314, thanks for the report and apologies for the delay in response. I was able to replicate this issue using the latest SDK version 8.6.2.
Per this similar issue filed before, it's working as expected. Let me check and update this thread for the explanation as to why, or bring someone here.
I see, thanks for the link. An explanation or documentation would definitely be appreciated. At the very least if it's WAI, a better error message so others don't waste time debugging. :)
Any update on this? We are also facing this with an iframe which is sandboxed to disallow allow-same-origin
.
The workaround in https://github.com/firebase/firebase-js-sdk/issues/123 relies on forcing websockets but some firewalls block them.
[REQUIRED] Describe your environment
[REQUIRED] Describe the problem
iframing a cross-domain page that invokes the firebase js sdk seems to result in an error.
The relevant failure line is here: https://github.com/firebase/firebase-js-sdk/blob/master/packages/database/src/realtime/BrowserPollConnection.ts#L500
Steps to reproduce:
Domain foo.com:
Domain bar.com:
Should result in the above exception.
If I understand same-origin policies correctly, I believe the sdk just needs to add the
sandbox="allow-same-origin"
attr to the created iframe element?