Skip to content

firestore: crypto not supported by IE11 #2826

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
caspergreen opened this issue Mar 29, 2020 · 1 comment
Closed

firestore: crypto not supported by IE11 #2826

caspergreen opened this issue Mar 29, 2020 · 1 comment

Comments

@caspergreen
Copy link

[REQUIRED] Describe your environment

  • Operating System version: Windows
  • Browser version: IE11
  • Firebase SDK version: 7.13.0, 7.13.1
  • Firebase Product: Firestore

[REQUIRED] Describe the problem

Commit a85f81d introduces a call to crypto, which is undefined on IE11, thus throwing an exception.

The fix is to use msCrypto if crypto is undefined, as seen here.

const crypto =
  self.crypto || ((self as unknown) as { msCrypto: Crypto }).msCrypto;

Steps to reproduce:

  1. Make a web app that calls firebase.firestore().
  2. Open web app from IE11.

Relevant Code:

https://stackblitz.com/edit/firebase-issue-sandbox-wvfegd
A simple call like this will fail (any client configuration will)

  firebase
    .firestore()
    .enablePersistence();
@thebrianchen
Copy link

@caspergreen Thanks for reporting a bug! This issue is currently being tracked at #2827, so I'll close this ticket.

@firebase firebase locked and limited conversation to collaborators Apr 30, 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

4 participants