Skip to content
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

failed to work with the latest firebase-admin version #34

Open
ruby-ts opened this issue Feb 23, 2021 · 1 comment
Open

failed to work with the latest firebase-admin version #34

ruby-ts opened this issue Feb 23, 2021 · 1 comment

Comments

@ruby-ts
Copy link

ruby-ts commented Feb 23, 2021

Looks like the new version of firebase-admin added some variables into the global namespace, which e3kit.getVirgilJwt() couldn't cope with.

-    "firebase-admin": "^9.4.2",
+    "firebase-admin": "^9.2.0",
@ruby-ts
Copy link
Author

ruby-ts commented Feb 24, 2021

The error message:

Unhandled error RangeError: Failed to construct 'TextDecoder': The encoding label provided ('utf-16le') is invalid.
    at new k (/workspace/node_modules/fast-text-encoding/text.min.js:1:134)
    at new <anonymous> (/workspace/node_modules/@virgilsecurity/core-foundation/node.cjs.js:1:1935)

google-gax is a new dependency of firebase-admin. And google-gax requires "fast-text-encoding": "^1.0.3" , which polyfill for TextEncoder(). Virgil detects if TexeDector() function exists. If yes, use that. I guess before this upgrade, Virgil won't find TextEncoder and won't try to use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant