Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#2,361 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
28/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
firebase, nodejs

Research direction

Start with the provided functions.auth.user().onCreate() handler and the Google Cloud log for auth-onRegistered, then compare the Firebase Functions SDK and Cloud Functions v1 Node.js runtime versions. Done means reproducing the assertion or establishing its cause and documenting a verified fix or workaround.

Written by the indexing model from the issue text.

Description

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,
        }
    });
});
Dominant language
TypeScript
Stars
1.7k
Forks
419
Avg merge
4d 20h
Merged PRs (30d)
16

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from firebase/firebase-admin-node

All issues in firebase/firebase-admin-node

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.