-
Notifications
You must be signed in to change notification settings - Fork 372
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
[Firestore] grpc error on Bun standalone executable file #2744
Comments
I found a few problems with this issue:
|
cc: @cirospaciari |
Note that Bun is not an officially-supported runtime, although it has been repeatedly requested and is on our radar: #2572 Notably, grpc is known to not work on Bun. Some customers have reported success using the "preferRest" option: const firestore = initializeFirestore(app, {
preferRest: true,
}); This causes the network stack to use simple HTTP requests when communicating with the backend, eliding grpc. Note, however, that "rest" does not support streaming, so adding a snapshot listener will try to "upgrade" the connection to grpc, which will likely result in the error that you reported. But as long as you don't need realtime updates, preferRest may help resolve your issue. Unfortunatley, I cannot make any commitments as to a fix due to its lack of official support. If you find some low-hanging fruit in the https://github.com/googleapis/nodejs-firestore SDK then I'd be open to review a pull request. |
In Bun v1.1.32, we added server support for our Please let us know if you continue to run into issues with gRPC, Firebase, or Firestore in Bun (and file issues in our repo). If it works in Node and doesn't work in Bun, it is a bug in Bun. In this particular issue's case, this appears to be a bundler bug ( |
Hi @Jarred-Sumner! Thank you for chiming in and providing a suggestion. I'll admit, it's been a while since I tried Firestore with grpc in Bun, and I have very minimal experience with Bun. Again, the team's current priorities don't include Bun support, although I can say we've received a strong demand for it so it is on our radar. |
Environment
v1.1.33
Linux 6.8.0-47-generic (Ubuntu)
[email protected]
Firestore
Description
I'm using
firestore
and it works when usingbun src/index.ts
but not when using single executable file.and this happens when executing a firestore code, for instance this one:
and the error:
The text was updated successfully, but these errors were encountered: