firebase / firebase/firebase-admin-node

Realtime Database never completes in terminal

Đang mở
#2,210 1 bình luận 1 reaction 0 người được giao Xem trên GitHub
api: database
Ngôn ngữ chính
TypeScript
Star
1.7k
Fork
419
Merge trung bình
3 ngày 10 giờ
Pull request đã merge (30 ngày)
16

Mô tả

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

* Operating System version: macOS 13.2.1
* Firebase SDK version: 11.9.0
* Firebase Product: database (realtime database)
* Node.js version: v18.16.0
* NPM version: 9.5.1

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

#### Steps to reproduce:

1. Setup Firebase project
2. Write code that makes a call to Realtime database
3. Execute this code with the terminal

#### Relevant Code:

```js
var admin = require("firebase-admin");

const projectId = process.env.GCLOUD_PROJECT;

var serviceAccount = require(process.env.GOOGLE_APPLICATION_CREDENTIALS);

admin.initializeApp({
credential: admin.credential.cert(serviceAccount),
databaseURL: `https://${projectId}-default-rtdb.europe-west1.firebasedatabase.app/`,
});

var db = admin.database();
var ref = db.ref("/public_resource/");
ref.set("Hello World");

console.log("Updated.");
```

Repository with code to reproduce: https://github.com/nilsreichardt/playground/tree/realtime-database-terminal

https://github.com/firebase/firebase-admin-node/assets/24459435/93edea3e-00b2-49de-b59f-19c4057b737d

You can see in the video, that I executed the code, the write to realtime database executed but the terminal never completes. Only when abort the command with CONTROL + C, I can stop the command.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.