简体   繁体   English

无法部署 firebase 云 function

[英]Unable to deploy firebase cloud function

I am trying to deploy a firebase cloud function. It works on local firebase emulator but when I try to deploy, it's giving the following error on firebase console cloud functions log: {"@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"}我正在尝试部署一个 firebase 云 function。它在本地 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"}

I solved it.我解决了。 Path params cannot have same name even if their values are same.路径参数不能有相同的名称,即使它们的值相同。 I renamed one of them and it worked.我重命名了其中一个并且它起作用了。 Final path is:最终路径为:

roles/warehouser/{warehouseName}/{warehouseName2}/Inventory/{assetName}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM