-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Description
Environment info
firebase-tools: 11.20.0
Platform: Windows
Test case
Fresh Firebase functions project using firebase init functions
const admin = require("firebase-admin");
const functions = require("firebase-functions");
const firestore = require("firebase-admin/firestore");
admin.initializeApp();
const db = firestore.getFirestore();
exports.testOnSummaryUpdated = functions.firestore
.document("/summary/{id}")
.onWrite((change, context) => {
console.log("Summary doc has triggered onWrite");
});
Steps to reproduce
- Deploy to Firebase Functions
Expected behavior
Successful deployment of functions package
Actual behavior
[debug] [2023-01-16T04:17:16.246Z] {
"endpoint": {
"id": "testOnSummaryUpdated",
"project": "asset-compliance",
"region": "us-central1",
"entryPoint": "testOnSummaryUpdated",
"platform": "gcfv1",
"runtime": "nodejs16",
"eventTrigger": {
"eventType": "providers/cloud.firestore/eventTypes/document.write",
"retry": false,
"eventFilters": {
"resource": "projects/asset-compliance/databases/(default)/documents/summary/{id}"
}
},
"labels": {
"deployment-tool": "cli-firebase"
},
"serviceAccount": null,
"ingressSettings": null,
"availableMemoryMb": null,
"timeoutSeconds": null,
"maxInstances": null,
"minInstances": null,
"vpc": null,
"environmentVariables": {
"FIREBASE_CONFIG": "{\"projectId\":\"asset-compliance\",\"storageBucket\":\"asset-compliance.appspot.com\",\"locationId\":\"australia-southeast1\"}",
"GCLOUD_PROJECT": "asset-compliance",
"EVENTARC_CLOUD_EVENT_SOURCE": "projects/asset-compliance/locations/us-central1/functions/testOnSummaryUpdated"
},
"codebase": "default",
"targetedByOnly": false,
"hash": "03154987cdea12a274f4732eab2674d5ad36056e"
},
"op": "create",
"original": {
"name": "FirebaseError",
"children": [],
"exit": 1,
"message": "Failed to configure trigger event-type:providers/cloud.firestore/eventTypes/document.write resource:projects/asset-compliance/databases/(default)/documents/summary/{id} service:firestore.googleapis.com",
"status": 13
}
}
[debug] [2023-01-16T04:17:16.494Z] Error: Failed to create function testOnSummaryUpdated in region us-central1
at C:\Users\James\AppData\Roaming\npm\node_modules\firebase-tools\lib\deploy\functions\release\fabricator.js:48:11
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Fabricator.createV1Function (C:\Users\James\AppData\Roaming\npm\node_modules\firebase-tools\lib\deploy\functions\release\fabricator.js:177:32)
at async Fabricator.createEndpoint (C:\Users\James\AppData\Roaming\npm\node_modules\firebase-tools\lib\deploy\functions\release\fabricator.js:129:13)
at async handle (C:\Users\James\AppData\Roaming\npm\node_modules\firebase-tools\lib\deploy\functions\release\fabricator.js:85:17)
milo-, morizyun, JarnoRFB, Kaeldehta, enpfeff and 2 more