angular / angularfire

Angular + Firebase = ❤️
https://firebaseopensource.com/projects/angular/angularfire2
MIT License
7.66k stars 2.19k forks source link

Performance Module: Application Crashes in Safari Iframe due to IDBFactory #2134

Closed r-LaForge closed 3 years ago

r-LaForge commented 5 years ago

I'm not sure if I should be asking this here or in the firebase-js-sdk repo, but I was encouraged to post the bug here from my Stack Overflow question

Version info

Angular: 8.0.2

Firebase: 6.3.1

AngularFire: 5.2.1

Browser: Safari in an Iframe.

How to reproduce these conditions

Simply import the AngularPerformanceModule into your AppModule. Then view the application through an IFrame using Safari.

If a repository demonstrating the problem is necessary, I will provide it upon request.

Debug output

Errors in the JavaScript console

Unhandled Promise rejection: IDBFactory.open() called in an invalid security context ; Zone: <root> ; Task: Promise.then ; Value: SecurityError: IDBFactory.open() called in an invalid security context open@[native code]

Expected behavior

For there to be a way to avoid application crashes, while maintaining the ability to monitor metrics for browsers that do support IDBFactory in an Iframe. Even if that means the module does not log any metrics for Safari in an Iframe.

Steps I've tried

Actual behavior

The application crashes.

jamesdaniels commented 3 years ago

Not AngularFire, open an issue on the Firebase JS SDK, if it's not been addressed yet.