Skip to content

Uncaught (in promise) unimplemented being thrown when calling loadBundle from firebase/firestore #5838

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
Jac0xb opened this issue Dec 27, 2021 · 5 comments · Fixed by #7058
Assignees

Comments

@Jac0xb
Copy link

Jac0xb commented Dec 27, 2021

[REQUIRED] Describe your environment

  • Operating System version: 19042.1415
  • Browser version: 95.0.2 (64-bit)
  • Firebase SDK version: 9.6.1
  • Firebase Product: firebase/firestore

[REQUIRED] Describe the problem

Uncaught (in promise) unimplemented being thrown when calling loadBundle

Being thrown from:

https://github.com/firebase/firebase-js-sdk/blob/cdada6c68f9740d13dd6674bcb658e28e68253b6/packages/firestore/src/util/byte_stream.ts

Steps to reproduce:

Relevant Code:

// where bundle.data is text string of bundle output.

await loadBundle(fs, bundle.data);
@schmidt-sebastian
Copy link
Contributor

Can you let us know a little more about your setup? Where are you running this? You are likely missing polyfills for TextEncoder, but I cannot say without knowing more about your environment.

@Jac0xb
Copy link
Author

Jac0xb commented Dec 28, 2021

A react app with firebase/firestore imports.

@schmidt-sebastian
Copy link
Contributor

@wu-hui We likely need to use a different TextEncoder/TextDecoder for ReactNative.

@Jac0xb You should be able to work around this in the meantime by polyfilling a TextEncoder such as https://github.com/samthor/fast-text-encoding

@Jac0xb
Copy link
Author

Jac0xb commented Jan 12, 2022

@wu-hui We likely need to use a different TextEncoder/TextDecoder for ReactNative.

@Jac0xb You should be able to work around this in the meantime by polyfilling a TextEncoder such as https://github.com/samthor/fast-text-encoding

Requiring fast texting encoding still throws the error, do I need to override a global with the require?

@MegaMaddin
Copy link

Hello!

I stumbled across this today, when trying to load a bundle on the client using an ArrayBuffer instead of a ReadableStream or a string. From looking at the traces the error seems to happen once the toByteStreamReaderHelper is called. I guess this function should mimic a readable stream from the passed data array. I don't know if this is intended but the reader property closed is calling Promise.reject('unimplemented') upon initialization instead of being a cb/function pointer to it.

Although this error is thrown, the loading of the bundle works as expected. Anyone from Google who can verify my suspicion?

@firebase firebase locked and limited conversation to collaborators Mar 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants