Custom domains - Google Cloud Load Balancing integration failure with a Cloud Run function

I am trying to set up a custom domain mapping for my Cloud Run function with the Google Cloud Load Balancing option presented to me when going through the "Manage Custom Domains" -> "Add Mapping" interface. In that interface, I have granted all the necessary permissions and created all the necessary roles. 

However, when I click "Submit", I encounter a "Failed to create integration" error with the following text:
'build "projects/..../locations/us-central1/builds/...." failed: Resource [function-name] failed with error: resource is in failed state "Ready:False", message: Revision 'function-name-xxxx-xxx' is not ready and cannot server traffic. Image 'us-central1-docker.pkg.dev./project-name-xxxx/gcf-artifacts/function__name:version_1' not found.'

2 2 129
2 REPLIES 2

Hello @devdankotov,

Welcome to the Google Cloud Community!

Let's break down the error message you received:

1. "Revision 'function-name-xxxx-xxx' is not ready and cannot serve traffic." This means that the specific revision of your Cloud Run function is not ready for deployment. Please review your health checks and logs for any errors that might be preventing the function from starting. Common issues can be found in the Google Cloud Function Troubleshooting guide, such as deployment errors, missing dependencies, or runtime problems.

2. "Image 'us-central1-docker.pkg.dev./project-name-xxxx/gcf-artifacts/function__name:version_1' not found." This error suggests that the Docker image needed for your function is missing in the repository or there might be a typo in the image path or name.

Please double-check these details and try rebuilding and redeploying your function.

Hi @juliadeanne,

Thanks for your suggestions.

My Cloud Run function is deployed via the firebase cli. After it is deployed from the cli, I have confirmed it passes all the health checks and performs what it has to on HTTP requests to the auto-generated URL.

Issues start when I attempt to integrate the Custom domains - Google Cloud Load Balancing feature with this function. When starting the integration, what I think happens, is the GCP automatically builds & creates a new deploy version, which is when it fails to do so for some reason. 

The 'us-central1-docker....' string references the Docker image that was generated in the step described in the last paragraph. 

Unfortunately, since everything that fails only has to do with what GCP is trying to do automatically, I am struggling to understand what the issue might be as I am not involved in that automatic process.