{"record":{"id":"e2944f8f918132f4","repo":"FlowiseAI/Flowise","slug":"azure-blob-storage-container-name-env-variable-is","errorCode":null,"errorMessage":"AZURE_BLOB_STORAGE_CONTAINER_NAME env variable is required","messagePattern":"AZURE_BLOB_STORAGE_CONTAINER_NAME env variable is required","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/src/storage/AzureBlobStorageProvider.ts","lineNumber":46,"sourceCode":"\n    constructor() {\n        super()\n        const config = this.initAzureConfig()\n        this.containerClient = config.containerClient\n        this.containerName = config.containerName\n    }\n\n    private initAzureConfig(): {\n        containerClient: ContainerClient\n        containerName: string\n    } {\n        const connectionString = process.env.AZURE_BLOB_STORAGE_CONNECTION_STRING\n        const accountName = process.env.AZURE_BLOB_STORAGE_ACCOUNT_NAME\n        const accountKey = process.env.AZURE_BLOB_STORAGE_ACCOUNT_KEY\n        const containerName = process.env.AZURE_BLOB_STORAGE_CONTAINER_NAME\n\n        if (!containerName || containerName.trim() === '') {\n            throw new Error('AZURE_BLOB_STORAGE_CONTAINER_NAME env variable is required')\n        }\n\n        let blobServiceClient: BlobServiceClient\n\n        // Authenticate either using connection string or account name and key\n        if (connectionString && connectionString.trim() !== '') {\n            blobServiceClient = BlobServiceClient.fromConnectionString(connectionString)\n        } else if (accountName && accountName.trim() !== '' && accountKey && accountKey.trim() !== '') {\n            const sharedKeyCredential = new StorageSharedKeyCredential(accountName, accountKey)\n            blobServiceClient = new BlobServiceClient(`https://${accountName}.blob.core.windows.net`, sharedKeyCredential)\n        } else {\n            throw new Error(\n                'Azure Blob Storage configuration is missing. Provide AZURE_BLOB_STORAGE_CONNECTION_STRING or AZURE_BLOB_STORAGE_ACCOUNT_NAME + AZURE_BLOB_STORAGE_ACCOUNT_KEY'\n            )\n        }\n\n        const containerClient = blobServiceClient.getContainerClient(containerName)\n        return { containerClient, containerName }","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/src/storage/AzureBlobStorageProvider.ts#L28-L64","documentation":"Thrown by AzureBlobStorageProvider.initAzureConfig when the AZURE_BLOB_STORAGE_CONTAINER_NAME environment variable is unset or blank. The container name is mandatory regardless of which authentication path is used, so the provider aborts initialization before constructing a BlobServiceClient.","triggerScenarios":"Selecting Azure Blob Storage as the storage backend without setting AZURE_BLOB_STORAGE_CONTAINER_NAME, or setting it to a whitespace-only value. The guard is `!containerName || containerName.trim() === ''` at AzureBlobStorageProvider.ts:45.","commonSituations":"Missing entry in .env; copying a deployment template that omitted the container name; renaming the container in Azure without updating the env var.","solutions":["Set AZURE_BLOB_STORAGE_CONTAINER_NAME to an existing Azure container name in your environment.","Create the container in the Azure storage account first if it does not exist.","Restart the Flowise process after updating the env so initAzureConfig re-reads it."],"exampleFix":"# before\nAZURE_BLOB_STORAGE_ACCOUNT_NAME=myaccount\n# after\nAZURE_BLOB_STORAGE_ACCOUNT_NAME=myaccount\nAZURE_BLOB_STORAGE_CONTAINER_NAME=flowise-storage","handlingStrategy":"validation","validationCode":"function requireAzureContainerName(): string {\n  const name = process.env.AZURE_BLOB_STORAGE_CONTAINER_NAME\n  if (!name || name.trim() === '') {\n    throw new Error('AZURE_BLOB_STORAGE_CONTAINER_NAME env variable is required')\n  }\n  return name.trim()\n}\n// call at startup before constructing the provider","typeGuard":"function hasAzureContainerName(env: NodeJS.ProcessEnv): env is { AZURE_BLOB_STORAGE_CONTAINER_NAME: string } & NodeJS.ProcessEnv {\n  return typeof env.AZURE_BLOB_STORAGE_CONTAINER_NAME === 'string' && env.AZURE_BLOB_STORAGE_CONTAINER_NAME.trim() !== ''\n}","tryCatchPattern":null,"preventionTips":["Add a startup env-var check that fails fast with a clear message.","Keep a checked-in .env.example listing all required Azure vars.","Run a config validation step in CI for the target storage backend."],"tags":["azure","storage","env","configuration"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}