TL;DR: Just go to the Google Cloud Console; select your project; choose a function you'd like to debug; and click on "view logs".
Error setting up the execution environment for your function. Please try deploying again after a few minutes.
It doesn't give you many details. At first, I thought it might be just a network issue because it was asking me to deploy again after a few minutes.
After failing for a couple of days, I've decided to look into the Firebase Console to see the log details. The error messages there, however, didn't help very much either.
That's because the Firebase console is just a UI connecting to services provided by the Google Cloud Platform. Their integration isn't very good yet.
However, if you go to the Google Cloud Console, you can find detailed logs which will help you to debug your code:
- Go to the console
- Select your project
- Choose a function you'd like to debug
- Click on "view logs"
That's it! Happy debugging! :)