firestore安全规则会干扰云功能吗?当我尝试在我的应用程序上部署云功能时,我一直收到此错误:
{
"error": {
"code": 401,
"message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.",
"status": "UNAUTHENTICATED"
}
}
这是代码:
const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp();
const increment = admin.firestore.FieldValue.increment(5);
exports.addPointsOnDropOffCreation = functions.firestore
.document('users/{userId}/dropOffs/{dropOffId}')
.onCreate((snapshot, context) => {
const dropOffData = snapshot.data();
if (dropOffData) {
const userRef = admin.firestore().doc(`users/${dropOffData.userId}`)
return userRef.update({ points: increment })
} else {
return null;
}
})
我已经运行firebase登录进行检查,并且我使用的是正确的帐户。我已经解决了这个问题两天了,没有任何实际进展。我运行了它们在文档中提供的示例云功能,以测试它们是否可以工作,并且能够部署它们。无论是在此功能上还是在控制数据库的安全规则上,我都感觉自己在做错什么。
编辑:根据Redditor的评论,我在下面添加了完整的调试日志:
[2020-11-16T17:21:14.053Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[2020-11-16T17:21:14.055Z] > authorizing via signed-in user
[2020-11-16T17:21:14.055Z] [iam] checking project scrapitapp-74f38 for permissions ["cloudfunctions.functions.create","cloudfunctions.functions.delete","cloudfunctions.functions.get","cloudfunctions.functions.list","cloudfunctions.functions.update","cloudfunctions.operations.get","firebase.projects.get"]
[2020-11-16T17:21:14.057Z] >>> HTTP REQUEST POST https://cloudresourcemanager.googleapis.com/v1/projects/scrapitapp-74f38:testIamPermissions
{"permissions":["cloudfunctions.functions.create","cloudfunctions.functions.delete","cloudfunctions.functions.get","cloudfunctions.functions.list","cloudfunctions.functions.update","cloudfunctions.operations.get","firebase.projects.get"]}
[2020-11-16T17:21:14.225Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Mon, 16 Nov 2020 17:21:14 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","server-timing":"gfet4t7; dur=88","alt-svc":"h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[2020-11-16T17:21:14.227Z] >>> HTTP REQUEST POST https://iam.googleapis.com/v1/projects/scrapitapp-74f38/serviceAccounts/scrapitapp-74f38@appspot.gserviceaccount.com:testIamPermissions
{"permissions":["iam.serviceAccounts.actAs"]}
[2020-11-16T17:21:14.326Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Mon, 16 Nov 2020 17:21:14 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
=== Deploying to 'scrapitapp-74f38'...
i deploying functions
[2020-11-16T17:21:16.187Z] > [functions] package.json contents: {
"name": "functions",
"description": "Cloud Functions for Firebase",
"scripts": {
"serve": "firebase emulators:start --only functions",
"shell": "firebase functions:shell",
"start": "npm run shell",
"deploy": "firebase deploy --only functions",
"logs": "firebase functions:log"
},
"engines": {
"node": "12"
},
"main": "index.js",
"dependencies": {
"firebase-admin": "^9.3.0",
"firebase-functions": "^3.11.0"
},
"devDependencies": {
"firebase-functions-test": "^0.2.0"
},
"private": true
}
i functions: ensuring required API cloudfunctions.googleapis.com is enabled...
i functions: ensuring required API cloudbuild.googleapis.com is enabled...
[2020-11-16T17:21:17.235Z] >>> HTTP REQUEST GET https://serviceusage.googleapis.com/v1/projects/scrapitapp-74f38/services/cloudfunctions.googleapis.com
[2020-11-16T17:21:17.236Z] >>> HTTP REQUEST GET https://serviceusage.googleapis.com/v1/projects/scrapitapp-74f38/services/runtimeconfig.googleapis.com
[2020-11-16T17:21:17.236Z] >>> HTTP REQUEST GET https://serviceusage.googleapis.com/v1/projects/scrapitapp-74f38/services/cloudbuild.googleapis.com
[2020-11-16T17:21:17.493Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Mon, 16 Nov 2020 17:21:17 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[2020-11-16T17:21:17.511Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Mon, 16 Nov 2020 17:21:17 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
✔ functions: required API cloudbuild.googleapis.com is enabled
[2020-11-16T17:21:17.540Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Mon, 16 Nov 2020 17:21:17 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
✔ functions: required API cloudfunctions.googleapis.com is enabled
[2020-11-16T17:21:17.542Z] >>> HTTP REQUEST GET https://firebase.googleapis.com/v1beta1/projects/scrapitapp-74f38/adminSdkConfig
[2020-11-16T17:21:17.667Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Mon, 16 Nov 2020 17:21:17 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
i functions: preparing functions directory for uploading...
[2020-11-16T17:21:17.670Z] >>> HTTP REQUEST GET https://runtimeconfig.googleapis.com/v1beta1/projects/scrapitapp-74f38/configs
[2020-11-16T17:21:17.810Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Mon, 16 Nov 2020 17:21:17 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
i functions: packaged functions (24.22 KB) for uploading
[2020-11-16T17:21:18.162Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/projects/scrapitapp-74f38/locations/-/functions
[2020-11-16T17:21:18.589Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Mon, 16 Nov 2020 17:21:18 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[2020-11-16T17:21:18.594Z] >>> HTTP REQUEST POST https://cloudfunctions.googleapis.com/v1/projects/scrapitapp-74f38/locations/us-central1/functions:generateUploadUrl
[2020-11-16T17:21:18.961Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Mon, 16 Nov 2020 17:21:18 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[2020-11-16T17:21:18.963Z] >>> HTTP REQUEST PUT https://storage.googleapis.com/gcf-upload-us-central1-32278de5-25cb-4c33-90a2-094b4d597f04/21ea53f0-8f02-4766-baf0-6a8ea6f41d6b.zip?GoogleAccessId=service-645504965265@gcf-admin-robot.iam.gserviceaccount.com&Expires=1605549078&Signature=AZuP%2BLAEfU3k5865jX2KtH5%2Fqm5vFTqsD7VSGu6giuhaEhJaw3p9b14D9L2C%2Fibz5RL6gJZXTjqDFi7LxHxIy96IqAoKCVZ08Q8XaAYf%2F0uF1aACBTYolVOlArS%2BXmbBXpjhm%2BUmaEP115UhO2i8jIo3nsL8Ugg0KXFCK%2BNnZF5Q2thpynQdnbRYXP8Azv4xI7WrWCPrjIC1iyEzo4sBVcpMGX7LJIkZ0ChwFagp6OTnTs9aYIr4m3ttcZ2ibowKOM%2FY4Riix4skOSCM6yWGjBgyf6BJkduex%2B7cVDO0NDzPyiEUYNaQ19jBpqTd92%2BLC9m36Z1sOQzJWMHq0pwjVw%3D%3D
<request body omitted>
[2020-11-16T17:21:19.121Z] <<< HTTP RESPONSE 200 {"x-guploader-uploadid":"ABg5-UxJe067SCYCENF3jBU6SBtzhiF6ihkDNnWl3jD9h7_vrKwyuGNmkFVQWvc3Z0VY-W0XbUnV2uniNgciPAi3kioBXVVPAA","etag":"\"e10bd5ff844f59e577da5aad37dcffd6\"","x-goog-generation":"1605547279105924","x-goog-metageneration":"1","x-goog-hash":"crc32c=wn/cww==, md5=4QvV/4RPWeV32lqtN9z/1g==","x-goog-stored-content-length":"24806","x-goog-stored-content-encoding":"identity","vary":"Origin","content-length":"0","date":"Mon, 16 Nov 2020 17:21:19 GMT","server":"UploadServer","content-type":"text/html; charset=UTF-8","alt-svc":"h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\""}
✔ functions: functions folder uploaded successfully
i functions: creating Node.js 12 function addPointsOnDropOffCreation(us-central1)...
[2020-11-16T17:21:19.124Z] Trigger is: {"eventTrigger":{"resource":"projects/scrapitapp-74f38/databases/(default)/documents/users/{userId}/dropOffs/{dropOffId}","eventType":"providers/cloud.firestore/eventTypes/document.create","service":"firestore.googleapis.com"}}
[2020-11-16T17:21:19.126Z] >>> HTTP REQUEST POST https://cloudfunctions.googleapis.com/v1/projects/scrapitapp-74f38/locations/us-central1/functions
{"sourceUploadUrl":"https://storage.googleapis.com/gcf-upload-us-central1-32278de5-25cb-4c33-90a2-094b4d597f04/21ea53f0-8f02-4766-baf0-6a8ea6f41d6b.zip?GoogleAccessId=service-645504965265@gcf-admin-robot.iam.gserviceaccount.com&Expires=1605549078&Signature=AZuP%2BLAEfU3k5865jX2KtH5%2Fqm5vFTqsD7VSGu6giuhaEhJaw3p9b14D9L2C%2Fibz5RL6gJZXTjqDFi7LxHxIy96IqAoKCVZ08Q8XaAYf%2F0uF1aACBTYolVOlArS%2BXmbBXpjhm%2BUmaEP115UhO2i8jIo3nsL8Ugg0KXFCK%2BNnZF5Q2thpynQdnbRYXP8Azv4xI7WrWCPrjIC1iyEzo4sBVcpMGX7LJIkZ0ChwFagp6OTnTs9aYIr4m3ttcZ2ibowKOM%2FY4Riix4skOSCM6yWGjBgyf6BJkduex%2B7cVDO0NDzPyiEUYNaQ19jBpqTd92%2BLC9m36Z1sOQzJWMHq0pwjVw%3D%3D","name":"projects/scrapitapp-74f38/locations/us-central1/functions/addPointsOnDropOffCreation","entryPoint":"addPointsOnDropOffCreation","labels":{"deployment-tool":"cli-firebase"},"runtime":"nodejs12","environmentVariables":{"FIREBASE_CONFIG":"{\"projectId\":\"scrapitapp-74f38\",\"databaseURL\":\"https://scrapitapp-74f38.firebaseio.com\",\"storageBucket\":\"scrapitapp-74f38.appspot.com\",\"locationId\":\"us-central\"}"},"eventTrigger":{"resource":"projects/scrapitapp-74f38/databases/(default)/documents/users/{userId}/dropOffs/{dropOffId}","eventType":"providers/cloud.firestore/eventTypes/document.create","service":"firestore.googleapis.com"}}
[2020-11-16T17:21:19.517Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Mon, 16 Nov 2020 17:21:19 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[2020-11-16T17:21:19.534Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/c2NyYXBpdGFwcC03NGYzOC91cy1jZW50cmFsMS9hZGRQb2ludHNPbkRyb3BPZmZDcmVhdGlvbi9rU3A0UXZsTWhaTQ
[2020-11-16T17:21:19.673Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Mon, 16 Nov 2020 17:21:19 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[2020-11-16T17:21:21.680Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/c2NyYXBpdGFwcC03NGYzOC91cy1jZW50cmFsMS9hZGRQb2ludHNPbkRyb3BPZmZDcmVhdGlvbi9rU3A0UXZsTWhaTQ
[2020-11-16T17:21:21.817Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Mon, 16 Nov 2020 17:21:21 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[2020-11-16T17:21:23.820Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/c2NyYXBpdGFwcC03NGYzOC91cy1jZW50cmFsMS9hZGRQb2ludHNPbkRyb3BPZmZDcmVhdGlvbi9rU3A0UXZsTWhaTQ
[2020-11-16T17:21:23.996Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Mon, 16 Nov 2020 17:21:23 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[2020-11-16T17:21:26.000Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/c2NyYXBpdGFwcC03NGYzOC91cy1jZW50cmFsMS9hZGRQb2ludHNPbkRyb3BPZmZDcmVhdGlvbi9rU3A0UXZsTWhaTQ
[2020-11-16T17:21:26.139Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Mon, 16 Nov 2020 17:21:26 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[2020-11-16T17:21:28.142Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/c2NyYXBpdGFwcC03NGYzOC91cy1jZW50cmFsMS9hZGRQb2ludHNPbkRyb3BPZmZDcmVhdGlvbi9rU3A0UXZsTWhaTQ
[2020-11-16T17:21:28.239Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Mon, 16 Nov 2020 17:21:28 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[2020-11-16T17:21:30.243Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/c2NyYXBpdGFwcC03NGYzOC91cy1jZW50cmFsMS9hZGRQb2ludHNPbkRyb3BPZmZDcmVhdGlvbi9rU3A0UXZsTWhaTQ
[2020-11-16T17:21:30.385Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Mon, 16 Nov 2020 17:21:30 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[2020-11-16T17:21:32.390Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/c2NyYXBpdGFwcC03NGYzOC91cy1jZW50cmFsMS9hZGRQb2ludHNPbkRyb3BPZmZDcmVhdGlvbi9rU3A0UXZsTWhaTQ
[2020-11-16T17:21:32.532Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Mon, 16 Nov 2020 17:21:32 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[2020-11-16T17:21:34.535Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/c2NyYXBpdGFwcC03NGYzOC91cy1jZW50cmFsMS9hZGRQb2ludHNPbkRyb3BPZmZDcmVhdGlvbi9rU3A0UXZsTWhaTQ
[2020-11-16T17:21:34.636Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Mon, 16 Nov 2020 17:21:34 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[2020-11-16T17:21:36.639Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/c2NyYXBpdGFwcC03NGYzOC91cy1jZW50cmFsMS9hZGRQb2ludHNPbkRyb3BPZmZDcmVhdGlvbi9rU3A0UXZsTWhaTQ
[2020-11-16T17:21:36.765Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Mon, 16 Nov 2020 17:21:36 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[2020-11-16T17:21:38.767Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/c2NyYXBpdGFwcC03NGYzOC91cy1jZW50cmFsMS9hZGRQb2ludHNPbkRyb3BPZmZDcmVhdGlvbi9rU3A0UXZsTWhaTQ
[2020-11-16T17:21:38.875Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Mon, 16 Nov 2020 17:21:38 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[2020-11-16T17:21:40.878Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/c2NyYXBpdGFwcC03NGYzOC91cy1jZW50cmFsMS9hZGRQb2ludHNPbkRyb3BPZmZDcmVhdGlvbi9rU3A0UXZsTWhaTQ
[2020-11-16T17:21:40.988Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Mon, 16 Nov 2020 17:21:40 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[2020-11-16T17:21:42.992Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/c2NyYXBpdGFwcC03NGYzOC91cy1jZW50cmFsMS9hZGRQb2ludHNPbkRyb3BPZmZDcmVhdGlvbi9rU3A0UXZsTWhaTQ
[2020-11-16T17:21:43.119Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Mon, 16 Nov 2020 17:21:43 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[2020-11-16T17:21:45.122Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/c2NyYXBpdGFwcC03NGYzOC91cy1jZW50cmFsMS9hZGRQb2ludHNPbkRyb3BPZmZDcmVhdGlvbi9rU3A0UXZsTWhaTQ
[2020-11-16T17:21:45.240Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Mon, 16 Nov 2020 17:21:45 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[2020-11-16T17:21:47.243Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/c2NyYXBpdGFwcC03NGYzOC91cy1jZW50cmFsMS9hZGRQb2ludHNPbkRyb3BPZmZDcmVhdGlvbi9rU3A0UXZsTWhaTQ
[2020-11-16T17:21:47.346Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Mon, 16 Nov 2020 17:21:47 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[2020-11-16T17:21:49.349Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/c2NyYXBpdGFwcC03NGYzOC91cy1jZW50cmFsMS9hZGRQb2ludHNPbkRyb3BPZmZDcmVhdGlvbi9rU3A0UXZsTWhaTQ
[2020-11-16T17:21:49.455Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Mon, 16 Nov 2020 17:21:49 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[2020-11-16T17:21:51.458Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/c2NyYXBpdGFwcC03NGYzOC91cy1jZW50cmFsMS9hZGRQb2ludHNPbkRyb3BPZmZDcmVhdGlvbi9rU3A0UXZsTWhaTQ
[2020-11-16T17:21:51.577Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Mon, 16 Nov 2020 17:21:51 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[2020-11-16T17:21:53.582Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/c2NyYXBpdGFwcC03NGYzOC91cy1jZW50cmFsMS9hZGRQb2ludHNPbkRyb3BPZmZDcmVhdGlvbi9rU3A0UXZsTWhaTQ
[2020-11-16T17:21:53.727Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Mon, 16 Nov 2020 17:21:53 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
答案 0 :(得分:1)
firestore安全规则会干扰云功能吗?
安全规则仅影响使用Web和移动SDK的代码。它们不会影响使用Firebase Admin SDK的代码。该代码在何处运行都无关紧要-如果它是使用服务帐户初始化的(在您运行initializeApp()
时会被使用),那么它将绕过所有安全规则。
如果在部署过程中收到错误消息 ,则与代码本身或任何安全规则无关。这就是Firebase CLI告诉您的帐户或项目有其他问题。如果错误消息对您没有帮助,请向Firebase support寻求帮助。