Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

auth.user().onCreate() fails with node: ../deps/uv/src/unix/epoll.c:312: uv__io_poll: Assertion `loop->watchers != NULL' failed.

Đang mở
#2,361 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
28/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
firebase, nodejs
Lĩnh vực
authentication, backend

Hướng nghiên cứu

Bắt đầu với handler functions.auth.user().onCreate() được cung cấp và log Google Cloud cho auth-onRegistered, sau đó so sánh các phiên bản của Firebase Functions SDK và runtime Cloud Functions v1 Node.js. Được xem là hoàn tất khi tái hiện được assertion hoặc xác định được nguyên nhân của nó, đồng thời ghi lại một fix hoặc workaround đã được xác minh.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

api: auth
  • Operating System version: Firebase CloudFunctions NodeJS (v1)
  • Firebase SDK version: "firebase-functions": "^4.1.1"
  • Firebase Product: auth
  • Node.js version: CloudFunctions v1
  • NPM version: Deployed via firebase cli
[REQUIRED] Step 3: Describe the problem

I use the functions.auth.user().onCreate() hook to automatically create a database entry when a new user registers. However, this hook sometimes fails with the following log:
node: ../deps/uv/src/unix/epoll.c:312: uv__io_poll: Assertion loop->watchers != NULL' failed.`

Steps to reproduce:

Here is the google cloud log:

{
  "textPayload": "node: ../deps/uv/src/unix/epoll.c:312: uv__io_poll: Assertion `loop->watchers != NULL' failed.",
  "insertId": "653bb6a900030d36d8cf181a",
  "resource": {
    "type": "cloud_function",
    "labels": {
      "region": "us-central1",
      "project_id": "XXXXXXX",
      "function_name": "auth-onRegistered"
    }
  },
  "timestamp": "2023-10-27T13:10:01.199990Z",
  "labels": {
    "execution_id": "oxv3664a2uje",
    "instance_id": "0037d6d5d3a7dcb74ae305ac7f40db1ec80f2048dd7c521217f638a659a3eca90a6fedc99509a9e10073d7934b12ba2cee8da5050c465062e73cf2d98207d9a4bb1c"
  },
  "logName": "projects/XXXXXXX/logs/cloudfunctions.googleapis.com%2Fcloud-functions",
  "trace": "projects/XXXXXXX/traces/be85c3c2262f49dfc8dd2f0645bfe485",
  "receiveTimestamp": "2023-10-27T13:10:01.539668946Z"
}
Relevant Code:

This is my code:

export default functions.runWith({ memory: "256MB", minInstances: 1 }).auth.user().onCreate(async (user) => {
    await usersCollection.doc(user.uid).set({
        'registeredAt': FieldValue.serverTimestamp(),
        'profile': {
            'name': '',
            'image': null,
        }
    });
});
Ngôn ngữ chính
TypeScript
Star
1.7k
Fork
419
Merge trung bình
4 ngày 20 giờ
Pull request đã merge (30 ngày)
16

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của firebase/firebase-admin-node

Tất cả issue của firebase/firebase-admin-node

Issue tương tự

Thêm issue về TypeScript

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.