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
Only importing the module once I tried using window.indexeddb.open to check if it would throw a security error. I still saw errors coming through (I monitor my application using Sentry).
replacing window.indexeddb using a fake on the global scope if window.indexeddb.open threw an error.
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 yourAppModule
. 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
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
Only importing the module once I tried using
window.indexeddb.open
to check if it would throw a security error. I still saw errors coming through (I monitor my application using Sentry).replacing
window.indexeddb
using a fake on the global scope ifwindow.indexeddb.open
threw an error.Actual behavior
The application crashes.