Comments (2)
I have enabled logs for the task and I'm getting a 401
{
"textPayload": "The request was not authorized to invoke this service. Read more at https://cloud.google.com/run/docs/securing/authenticating Additional troubleshooting documentation can be found at: https://cloud.google.com/run/docs/troubleshooting#401",
"insertId": "646f8e03000a6f22b18e5817",
"httpRequest": {
"requestMethod": "POST",
"requestUrl": "...",
"requestSize": "1575",
"status": 401,
"userAgent": "Google-Cloud-Tasks",
"remoteIp": "35.243.23.219",
"serverIp": "216.239.36.54",
"latency": "0s",
"protocol": "HTTP/1.1"
},
"resource": {
"type": "cloud_run_revision",
"labels": {
"configuration_name": "synchronizetask",
"revision_name": "synchronizetask-00003-doq",
"service_name": "synchronizetask",
"project_id": "...",
"location": "us-central1"
}
},
"timestamp": "2023-05-25T16:34:11.682815Z",
"severity": "WARNING",
"labels": {
"goog-managed-by": "cloudfunctions"
},
"logName": "projects/.../logs/run.googleapis.com%2Frequests",
"trace": "projects/.../traces/36c6c7d9ced30537f7ee2925be9bd7ad",
"receiveTimestamp": "2023-05-25T16:34:11.694423190Z",
"spanId": "8111407204631128905"
}
from functions-samples.
What worked for me was to go to Cloud Functions in Google Cloud Console, select the task function that was created with onTaskDispatched
, and give Cloud Functions Admin role to the Firebase Service Account. I hope this helps someone. This was a very easy thing to do and docs were unnecessarily cryptic. If this is too broad of a permission, it is upon the docs authors to clearly present what's needed.
from functions-samples.
Related Issues (20)
- [BUG] in sample: quickstarts/taskqueues-backup-images/functions/index.js
- [BUG] in sample:
- [BUG] in sample: fcm functions
- Firebase Cloud Functions : How to split a function into multiple files? HOT 1
- [DOCS] for sample: https://github.com/firebase/functions-samples/tree/main/2nd-gen/instrument-with-opentelemetry HOT 7
- [DOCS] for sample: Unclear if open telemetry is supported in cloud functions v1
- [DOCS] for sample: /quickstarts/email-users
- Storage link error
- [DOCS] for sample:
- [DOCS] cloud_functions onCall : How can I get idToken ?
- [BUG] in sample:
- No alert function detected
- [BUG] in sample: firebase function (2nd generation) HOT 2
- [DOCS] for sample:
- [BUG] in sample:
- [BUG] in sample:
- LGTM
- [DOCS] Example app in readme.md does not work HOT 1
- [BUG] in sample: alert
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from functions-samples.