auth.user().onCreate() fails with node: ../deps/uv/src/unix/epoll.c:312: uv__io_poll: Assertion `loop->watchers != NULL' failed.
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
- Domain
- authentication, backend
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
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from firebase/firebase-admin-node
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
firebase/firebase-admin-node#3234 ·
-
[email protected] stable dependency tree fails npm audit via Storage uuid and Firestore google-gax Open
firebase/firebase-admin-node#3221 · 3 comments · 1 assignee ·
-
api: messaging
Difficulty 3/5 1-2 days Newbie friendliness 70/100
firebase/firebase-admin-node#3215 ·
-
api: messaging
Difficulty 5/5 Over a week Newbie friendliness 28/100
firebase/firebase-admin-node#3214 ·
-
api: firestore type: feature request
firebase/firebase-admin-node#3183 · 1 comment · 1 assignee ·
All issues in firebase/firebase-admin-node
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
receptron/mulmoterminal#2264 ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
components-web-app/docs#96 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
simonsobs/tileviewer#114 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100