
[英]Firebase Deploy Functions - Failed to update function - Firebase Admin this.appStore?.removeApp(this.name);
[英]Firebase functions deploy problem (Failed to create/update function)
想請熟悉Firebase功能的人幫忙。 我正在努力解決通過 firebase cli 上傳代碼失敗的問題。 幾天前它還在工作,我沒有改變任何東西,我的意思是通過配置。 它卡在了一個甚至沒有進行代碼更改的部分。 自從客戶將編輯角色設置為所有者角色后,我就遇到了這個問題。 但理論上這應該不是問題。
firebase deploy --debug
返回:
{"error":{"code":403,"message":"Unable to retrieve the repository metadata for projects/{projectname}/locations/us-central1/repositories/gcf-artifacts. Ensure that the Cloud Functions service account has 'artifactregistry.repositories.list' and 'artifactregistry.repositories.get' permissions. You can add the permissions by granting the role 'roles/artifactregistry.reader'.","status":"PERMISSION_DENIED"}}
我設置了它,但它仍然不起作用。 也許在錯誤的地方或者我不知道。 我只在 .net 上遇到過類似的問題,但都沒有幫助。 我不知道該怎么辦。 Artifactregistry api 也已啟用。
firebase 功能:日志:
2022-11-09T22:15:55.891760Z E friendRequestNotification: {"@type":"type.googleapis.com/google.cloud.audit.AuditLog","status":{"code":7,"message":"Unable to retrieve the repository metadata for projects/{projectname}/locations/us-central1/repositories/gcf-artifacts. Ensure that the Cloud Functions service account has 'artifactregistry.repositories.list' and 'artifactregistry.repositories.get' permissions. You can add the permissions by granting the role 'roles/artifactregistry.reader'."},"authenticationInfo":{"principalEmail":"{email}"},"requestMetadata":{"callerIp":"{ip}","callerSuppliedUserAgent":"FirebaseCLI/11.16.0,gzip(gfe),gzip(gfe)","requestAttributes":{"time":"2022-11-09T22:15:56.055987Z","auth":{}},"destinationAttributes":{}},"serviceName":"cloudfunctions.googleapis.com","methodName":"google.cloud.functions.v1.CloudFunctionsService.CreateFunction","authorizationInfo":[{"resource":"projects/{projectname}/locations/us-central1/functions/friendRequestNotification","permission":"cloudfunctions.functions.create","granted":true,"authorizationLoggingOptions":{"permissionType":"ADMIN_WRITE"},"resourceAttributes":{}}],"resourceName":"projects/{projectname}/locations/us-central1/functions/friendRequestNotification","request":{"function":{"sourceUploadUrl":"https://storage.googleapis.com/uploads-760418412171.us-central1.cloudfunctions.appspot.com/6d1f7217-7899-484f-911c-1dbcb4512d8d.zip?GoogleAccessId=service-{}@gcf-admin-robot.iam.gserviceaccount.com&Expires={}","labels":{"deployment-tool":"cli-firebase","firebase-functions-hash":"{hash}"},"runtime":"nodejs16","dockerRegistry":"ARTIFACT_REGISTRY","entryPoint":"friendRequestNotification","name":"projects/{projectname}/locations/us-central1/functions/friendRequestNotification","eventTrigger":{"eventType":"providers/cloud.firestore/eventTypes/document.create","resource":"projects/{projectname}/databases/(default)/documents/users/{userId}/friends/{friendId}"}},"location":"projects/{projectname}/locations/us-central1","@type":"type.googleapis.com/google.cloud.functions.v1.CreateFunctionRequest"},"resourceLocation":{"currentLocations":["us-central1"]}}
我已經嘗試了谷歌雲 iam&admin 設置中的所有選項,但沒有。
嘗試在 Google Cloud Console https://console.cloud.google.com/artifacts上為您的項目啟用創建的工件
好吧,我通過更新信用卡解決了這個問題。 基本上,賬單被禁用是因為我的信用卡已過期並且所有權限都被禁用了。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.