Project Details:
-
Original Project ID: (PII Removed by Staff)
-
New Project ID (Issue persists here):
compliance-checker-final -
Service Name: (PII Removed by Staff)
-
Region:
asia-southeast1
Problem Summary: We are experiencing an issue where a Cloud Run deployment persistently runs an outdated version of our source code, despite all cache-busting measures. The specific symptom is a crash indicating an incorrect import method that has been corrected in the source file multiple times. This issue persists even when deploying to a brand-new Google Cloud Project.
Specific Error Symptom (Found in Logs): Despite applying the latest code fix (explicit CommonJS import syntax), the service consistently fails on startup:
/usr/src/app/app.js:12 const ai = new GoogleGenerativeAI(apiKey); ^ TypeError: GoogleGenerativeAI is not a constructor
Client-Side Troubleshooting Steps Taken (All Failed):
-
Code Fixes: Applied multiple fixes, including the final, explicit CommonJS syntax:
const GoogleGenerativeAI = require('@google/genai').GoogleGenerativeAI;. -
Environment Bypasses: Created a brand new Google Cloud Project (
compliance-checker-final) and switched context. -
Deployment Bypasses:
-
All
gcloud builds submitcommands used the--no-cacheflag. -
Used multiple image tags (
:v4through:v9). -
The
Dockerfilewas modified to use explicitCOPY app.js .commands to prevent ambiguity.
-
Request: We believe this is an unprecedented Cloud Build/Cloud Run systemic cache corruption on the backend that is not respecting client-side commands. Please investigate and manually clear any build artifacts or caches associated with this repository/account that may be injecting the outdated code during the build process.