Open kbroughton opened 2 years ago
Even i had same issue but it was solved by adding GCP_PROJECT in Runtime environment variables in cloud functions
You got this error because you are running this on a higher version of node8, adding GCP_PROJECT
(in the auth and watch function/s) with value the gcloud project in the env variables (env_vars.yaml file in this case) should be fixed.
for the next problem you will see, you will need this info https://github.com/googlecodelabs/gcf-gmail-codelab/issues/17#issuecomment-1039137404
GCP Node10 runtime introduced some environment variable changes which require modifications of the source code.
I was able to deploy the functions and add all the env_vars.yml and deploy a second time having completed the permissions grants. However, at step 5 "Setup Gmail push notifications" after clicking "Allow" I get the error: "An error has occurred in the authorization process".
GCP Logging is full of only one error, but this was present before I was able to get to the "Allow" step 5.
Note the "Error: Missing required keys: GCP_PROJECT". I tried to set GCP_PROJECT in the env vars, but get an error that it is a protected env var. I renamed the value in index.js to _GCP_PROJECT and did the same for env vars, but the error persisted making me think it is in another lib.
A note to the authors, the URLs of auth_callback and the pubsub only differ by GCP project. Several steps could be saved by creating the values in the file at the beginning.