{"record":{"id":"0c2ecb416ed31a93","repo":"FlowiseAI/Flowise","slug":"google-cloud-storage-bucket-name-env-variable-is-r","errorCode":null,"errorMessage":"GOOGLE_CLOUD_STORAGE_BUCKET_NAME env variable is required","messagePattern":"GOOGLE_CLOUD_STORAGE_BUCKET_NAME env variable is required","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/src/storage/GCSStorageProvider.ts","lineNumber":37,"sourceCode":"\n        this.bucket = config.bucket\n        this.bucketName = config.bucketName\n        this.projectId = config.projectId\n        this.keyFilename = config.keyFilename\n    }\n\n    private initGCSConfig(): {\n        bucket: Bucket\n        bucketName: string\n        projectId: string | undefined\n        keyFilename: string | undefined\n    } {\n        const keyFilename = process.env.GOOGLE_CLOUD_STORAGE_CREDENTIAL\n        const projectId = process.env.GOOGLE_CLOUD_STORAGE_PROJ_ID\n        const bucketName = process.env.GOOGLE_CLOUD_STORAGE_BUCKET_NAME\n\n        if (!bucketName) {\n            throw new Error('GOOGLE_CLOUD_STORAGE_BUCKET_NAME env variable is required')\n        }\n\n        const storageConfig = {\n            ...(keyFilename ? { keyFilename } : {}),\n            ...(projectId ? { projectId } : {})\n        }\n\n        const storage = new Storage(storageConfig)\n        const bucket = storage.bucket(bucketName)\n        return { bucket, bucketName, projectId, keyFilename }\n    }\n\n    getStorageType(): string {\n        return 'gcs'\n    }\n\n    getConfig(): any {\n        return {","sourceCodeStart":19,"sourceCodeEnd":55,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/src/storage/GCSStorageProvider.ts#L19-L55","documentation":"Thrown by GCSStorageProvider.initGCSConfig when GOOGLE_CLOUD_STORAGE_BUCKET_NAME is not set. The bucket name is mandatory; project ID and key file are optional only when Application Default Credentials are available, but a target bucket must always be named.","triggerScenarios":"Selecting Google Cloud Storage as the backend without setting GOOGLE_CLOUD_STORAGE_BUCKET_NAME. The guard is `!bucketName` at GCSStorageProvider.ts:36.","commonSituations":"Missing env entry in .env; deploying with a templated env file that left the bucket name blank; renaming the bucket in GCP without updating the env var.","solutions":["Set GOOGLE_CLOUD_STORAGE_BUCKET_NAME to an existing GCS bucket.","Create the bucket in GCP first if it does not exist, in the matching project/region.","Restart Flowise so initGCSConfig re-reads the environment."],"exampleFix":"# before\nGOOGLE_CLOUD_STORAGE_PROJ_ID=my-project\n# after\nGOOGLE_CLOUD_STORAGE_PROJ_ID=my-project\nGOOGLE_CLOUD_STORAGE_BUCKET_NAME=flowise-storage","handlingStrategy":"validation","validationCode":"function requireGcsBucketName(): string {\n  const name = process.env.GOOGLE_CLOUD_STORAGE_BUCKET_NAME\n  if (!name) throw new Error('GOOGLE_CLOUD_STORAGE_BUCKET_NAME env variable is required')\n  return name\n}","typeGuard":"function hasGcsBucketName(env: NodeJS.ProcessEnv): env is { GOOGLE_CLOUD_STORAGE_BUCKET_NAME: string } & NodeJS.ProcessEnv {\n  return typeof env.GOOGLE_CLOUD_STORAGE_BUCKET_NAME === 'string' && env.GOOGLE_CLOUD_STORAGE_BUCKET_NAME.length > 0\n}","tryCatchPattern":null,"preventionTips":["Set GOOGLE_CLOUD_STORAGE_BUCKET_NAME to an existing bucket.","Create the bucket in GCP before enabling the backend.","Validate required GCS env vars at startup."],"tags":["gcp","storage","env","configuration"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}