firebase / firebase/firebase-admin-node

bun.sh grpc-js :: undefined is not an object (evaluating 'error.stack.split') :: what am I missing?

未关闭
#2,300 23 条评论 15 个 reaction 已指派 0 人 在 GitHub 查看
api: core
主要语言
TypeScript
星标
1.7k
派生
419
平均合并
3 天 10 小时
30 天内合并 PR
16

描述

### [REQUIRED] Step 2: Describe your environment

* Operating System version: macOS 13.5.2 (22G91)
* Firebase SDK version: 11.10.1
* Firebase Product: firestore
* Node.js version: 18.17.1
* NPM version: 8.19.2

### [REQUIRED] Step 3: Describe the problem

I'm testing out [bun](https://bun.sh) and I can't do a basic get() on a collection. What am I missing?

#### Steps to reproduce:

index.ts
```
require('dotenv').config()

import { initializeApp } from 'firebase-admin/app'
initializeApp()
import { getFirestore } from 'firebase-admin/firestore'
export const db = getFirestore()
db.collection('category').get()
```

Run

```
bun index.ts

[0.05ms] ".env"
29 | const CALL_INVOCATION_TRANSFORMER_SYMBOL = Symbol();
30 | function isFunction(arg) {
31 | return typeof arg === 'function';
32 | }
33 | function getErrorStackString(error) {
34 | return error.stack.split('\n').slice(1).join('\n');
^
TypeError: undefined is not an object (evaluating 'error.stack.split')
at getErrorStackString (/path/node_modules/google-gax/node_modules/@grpc/grpc-js/build/src/client.js:34:11)
at onReceiveStatus (/path/node_modules/google-gax/node_modules/@grpc/grpc-js/build/src/client.js:356:40)
at onReceiveStatus (/path/node_modules/google-gax/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:323:177)
at /path/node_modules/google-gax/node_modules/@grpc/grpc-js/build/src/resolving-call.js:94:74
at processTicksAndRejections (:1:2602)
```

贡献指南

打开贡献指南

调研方向

首先,在所述环境中使用 bun index.ts 运行报告的 index.ts 复现。阅读 google-gax/node_modules/@grpc/grpc-js/build/src/client.js,以及堆栈跟踪中相关的 client-interceptors.js 和 resolving-call.js 位置。完成的标准是确定 Firestore get() 失败是否由 Bun 兼容性导致,并记录或修复由此产生的错误行为。

由索引模型根据 Issue 内容生成。

评估

技术栈
bun, grpc, nodejs, typescript
领域
backend, databases
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。