You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewError(`Unable to retreive uri for function at ${url}`);
}
returnuri;
}
How to reproduce the issue
Used getFunctionUrl exactly as shown.
Steps to set up and reproduce
Attempt to queue a function using the code shown. EG:
constqueue=getFunctions().taskQueue("reminderEmail");consttargetUrl=awaitgetFunctionUrl("reminderEmail");queue.enqueue({bookingRequestId: event.params.docId},{scheduleTime: newDate(),uri: targetUrl,}).then(()=>{console.log(`Queued reminder email for ${date}.`);});
Debug output
Status code
7 (PERMISSION_DENIED)
Reason to retry
PERMISSION_DENIED(7): HTTP status code 403
Expected behavior
The function runs successfully. The documentation states,
Due to the way Cloud Tasks creates authentication tokens to authenticate requests to the underlying task queue functions, you must specify the Cloud Run URL of the function when enqueuing tasks. We recommend that you programmatically retrieve the URL for your function as demonstrated below...
However, the uri itself does not seem sufficient to authenticate the cloud function.
Actual behavior
The function is missing the necessary authentication.
The text was updated successfully, but these errors were encountered:
Which sample has a bug?
functions-samples/Node/taskqueues-backup-images/functions/index.js
Lines 115 to 132 in 703c035
How to reproduce the issue
Used
getFunctionUrl
exactly as shown.Steps to set up and reproduce
Attempt to queue a function using the code shown. EG:
Debug output
Expected behavior
The function runs successfully. The documentation states,
However, the uri itself does not seem sufficient to authenticate the cloud function.
Actual behavior
The function is missing the necessary authentication.
The text was updated successfully, but these errors were encountered: