firebase功能组部署错误(未定义)
我正在尝试部署firebase函数index.js文件。如果我尝试部署单个函数,比如(firebase deploy--only functions:phaseStart),它工作得很好。但是,如果我部署整个functions文件夹,比如(firebase deploy——仅限函数),就会出现错误。就在昨天,我部署了这些功能,但这些都没有发生。index.js文件中有问题吗?还是我部署了这么多功能 错误代码如下所示firebase功能组部署错误(未定义),firebase,google-cloud-firestore,google-cloud-functions,Firebase,Google Cloud Firestore,Google Cloud Functions,我正在尝试部署firebase函数index.js文件。如果我尝试部署单个函数,比如(firebase deploy--only functions:phaseStart),它工作得很好。但是,如果我部署整个functions文件夹,比如(firebase deploy——仅限函数),就会出现错误。就在昨天,我部署了这些功能,但这些都没有发生。index.js文件中有问题吗?还是我部署了这么多功能 错误代码如下所示 + functions: Finished running predeploy
+ functions: Finished running predeploy script.
i functions: ensuring necessary APIs are enabled...
+ functions: all necessary APIs are enabled
i functions: preparing functions directory for uploading...
i functions: packaged functions (46.47 KB) for uploading
+ functions: functions folder uploaded successfully
i functions: updating Node.js 8 function roomRemoved(asia-northeast1)...
i functions: updating Node.js 8 function gameStart(asia-northeast1)...
i functions: updating Node.js 8 function phaseStart(asia-northeast1)...
i functions: updating Node.js 8 function nightAction(asia-northeast1)...
i functions: updating Node.js 8 function vote(asia-northeast1)...
i functions: updating Node.js 8 function userCreated(asia-northeast1)...
i functions: updating Node.js 8 function userDeleted(asia-northeast1)...
! functions[userDeleted(asia-northeast1)]: Deployment error.
undefined
! functions[phaseStart(asia-northeast1)]: Deployment error.
undefined
! functions[vote(asia-northeast1)]: Deployment error.
undefined
! functions[gameStart(asia-northeast1)]: Deployment error.
undefined
! functions[roomRemoved(asia-northeast1)]: Deployment error.
undefined
! functions[nightAction(asia-northeast1)]: Deployment error.
undefined
+ functions[userCreated(asia-northeast1)]: Successful update operation.
Functions deploy had errors with the following functions:
gameStart
nightAction
phaseStart
roomRemoved
userDeleted
vote
To try redeploying those functions, run:
firebase deploy --only functions:gameStart,functions:nightAction,functions:phaseStart,functions:roomRemoved,functions:userDeleted,functions:vote
To continue deploying other features (such as database), run:
firebase deploy --except functions
Error: Functions did not deploy properly.
我还在firebase控制台上找到了auditlog
{"@type":"type.googleapis.com/google.cloud.audit.AuditLog","status":{"code":13,"message":"INTERNAL"},"authenticationInfo":{"principalEmail":"blabla"},"requestMetadata":{"requestAttributes":{},"destinationAttributes":{}},"serviceName":"cloudfunctions.googleapis.com","methodName":"google.cloud.functions.v1.CloudFunctionsService.UpdateFunction","resourceName":"projects/blabla/locations/asia-northeast1/functions/gameStart"}
这是我的职责之一
exports.userDeleted = functions
.region('asia-northeast1')
.auth.user().onDelete(async user => {
return db.collection('uid_list').doc(user.uid).delete().catch(e => {
console.error(e.code)
console.log(e.message)
})
})
你能至少提供一个函数吗?你在YouTube上看过Doug Stevenson的async Wait视频吗?@ConstantinBeer哦,那是我无意中放的东西。如果没有它,这看起来很正常,对吗?我不是很确定,但我想你可以省去返回的
。但我不知道这是否能解决你的问题。以前从未在firebase中真正使用过触发器。@MasatomoNakano我向firebase团队报告了这个问题。他们说要将我的firebase工具更新为最新版本7.2.4,但没有任何改变。我给他们发送了调试日志文件。我猜功能服务器有问题。你能至少提供一个功能吗?你在YouTube上看过Doug Stevenson的async Wait视频吗?@ConstantinBeer哦,async是我无意中放的东西。如果没有它,这看起来很正常,对吗?我不是很确定,但我想你可以省去返回的。但我不知道这是否能解决你的问题。以前从未在firebase中真正使用过触发器。@MasatomoNakano我向firebase团队报告了这个问题。他们说要将我的firebase工具更新为最新版本7.2.4,但没有任何改变。我给他们发送了调试日志文件。我想服务器的功能有问题。