无法部署 firebase 云功能
Unable to deploy firebase cloud function
我正在尝试部署一个 firebase 云函数。它适用于本地 firebase 模拟器,但当我尝试部署时,它在 firebase 控制台云功能日志中出现以下错误:
{"@type":"type.googleapis.com/google.cloud.audit.AuditLog","status":{"code":13,"message":"Failed to configure trigger for event-type:providers/cloud.firestore/eventTypes/document.update resource:projects/kapsule-1099e/databases/(default)/documents/roles/warehouser/{warehouseName}/{warehouseName}/Inventory/{assetName} service:firestore.googleapis.com."},"authenticationInfo":{"principalEmail":"malickfaizann@gmail.com"},"serviceName":"cloudfunctions.googleapis.com","methodName":"google.cloud.functions.v1.CloudFunctionsService.UpdateFunction","resourceName":"projects/kapsule-1099e/locations/us-central1/functions/sendNotificationOnLowStock"}
我解决了。路径参数不能有相同的名称,即使它们的值相同。我重命名了其中一个并且它起作用了。
最终路径是:
roles/warehouser/{warehouseName}/{warehouseName2}/Inventory/{assetName}
我正在尝试部署一个 firebase 云函数。它适用于本地 firebase 模拟器,但当我尝试部署时,它在 firebase 控制台云功能日志中出现以下错误:
{"@type":"type.googleapis.com/google.cloud.audit.AuditLog","status":{"code":13,"message":"Failed to configure trigger for event-type:providers/cloud.firestore/eventTypes/document.update resource:projects/kapsule-1099e/databases/(default)/documents/roles/warehouser/{warehouseName}/{warehouseName}/Inventory/{assetName} service:firestore.googleapis.com."},"authenticationInfo":{"principalEmail":"malickfaizann@gmail.com"},"serviceName":"cloudfunctions.googleapis.com","methodName":"google.cloud.functions.v1.CloudFunctionsService.UpdateFunction","resourceName":"projects/kapsule-1099e/locations/us-central1/functions/sendNotificationOnLowStock"}
我解决了。路径参数不能有相同的名称,即使它们的值相同。我重命名了其中一个并且它起作用了。 最终路径是:
roles/warehouser/{warehouseName}/{warehouseName2}/Inventory/{assetName}