Skip to content

FR: Firebase Messaging: SDK installation crashes in Edge InPrivate #2465

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
merey90 opened this issue Dec 20, 2019 · 5 comments
Closed

FR: Firebase Messaging: SDK installation crashes in Edge InPrivate #2465

merey90 opened this issue Dec 20, 2019 · 5 comments

Comments

@merey90
Copy link

merey90 commented Dec 20, 2019

Describe your environment

  • Operating System version: Windows 10 Enterprise Evaluation (version 1809, build 17763.379)
  • Browser version: Microsoft Edge 44.17763.1.0 (Microsoft EdgeHTML 18.17763)
  • Firebase SDK version: 7.6.1
  • Firebase Product: messaging

Describe the problem

Messaging product of firebase SDK has idb dependency, which throws uncatched errors.
This causes crashes on Microsoft Edge in InPrivate mode. Also in Firefox in private mode throws uncatchable error.

Steps to reproduce:

  1. Install Firebase SDK to web page
  2. Initiate the firebase app with messaging product
  3. Open the web page with Microsoft Edge in InPrivate browsing
  4. SDK Initialization will crash because IndexedDB's apis are undefined in Edge's InPrivate mode

Relevant Code:

https://stackblitz.com/fork/firebase-issue-sandbox

Screenshots:

Microsoft Edge browser crashes:
Screen Shot 2019-12-20 at 11 29 18 AM

Firefox renders the page, but throws uncatchable error:
Screen Shot 2019-12-20 at 11 28 44 AM

Desired behavior

Make it possible to catch the error or handle indexedDB unsupported state

@hsubox76
Copy link
Contributor

hsubox76 commented Jan 6, 2020

See related issue: #2373

As suggested in that issue, can you detect private mode and not initialize messaging if that's the case?

Otherwise @mmermerkaya is it worth it to find a way to throw a catchable error on trying to initialize messaging when there is no IndexedDB?

@mmermerkaya
Copy link
Contributor

I'll see if I can add this to the isSupported() check.

@merey90
Copy link
Author

merey90 commented Jan 13, 2020

See related issue: #2373

As suggested in that issue, can you detect private mode and not initialize messaging if that's the case?

Otherwise @mmermerkaya is it worth it to find a way to throw a catchable error on trying to initialize messaging when there is no IndexedDB?

If it is possible I would prefer catchable error. if not, then will try detecting private mode 👍

@alexiusp
Copy link

alexiusp commented Feb 3, 2020

@mmermerkaya @hsubox76 any news on this topic? having a catchable error would be really appreciated.

@zwu52
Copy link
Member

zwu52 commented Mar 18, 2020

Hi @alexiusp ,
@mmermerkaya has added the API support . Here is an example on how to use. Cheers.

@zwu52 zwu52 closed this as completed Mar 18, 2020
@firebase firebase locked and limited conversation to collaborators Apr 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants