cube-js/cube · error · TypeError
The ${keyByDataSource('CUBEJS_DB_DUCKDB_S3_USE_CREDENTIAL_CH
Error message
The ${keyByDataSource('CUBEJS_DB_DUCKDB_S3_USE_CREDENTIAL_CHAIN', dataSource, preAggregations)} must be either 'true' or 'false'. What it means
Env type validation in env.ts duckdbS3UseCredentialChain: CUBEJS_DB_DUCKDB_S3_USE_CREDENTIAL_CHAIN is set but is not the string 'true' or 'false' (case-insensitive). The strict boolean parse throws a TypeError when DuckDB S3 credential-chain options are resolved.
Source
Thrown at packages/cubejs-backend-shared/src/env.ts:1796
if (extensions) {
return extensions.split(',').map(e => e.trim());
}
return [];
},
duckdbS3UseCredentialChain: ({
dataSource,
preAggregations,
}: DataSourceOpts) => {
const val = get(keyByDataSource('CUBEJS_DB_DUCKDB_S3_USE_CREDENTIAL_CHAIN', dataSource, preAggregations)).asString();
if (val) {
if (val.toLocaleLowerCase() === 'true') {
return true;
} else if (val.toLowerCase() === 'false') {
return false;
} else {
throw new TypeError(
`The ${
keyByDataSource(
'CUBEJS_DB_DUCKDB_S3_USE_CREDENTIAL_CHAIN',
dataSource,
)
} must be either 'true' or 'false'.`
);
}
} else {
return false;
}
},
/** ***************************************************************
* Presto/Trino Driver *
**************************************************************** */
/**View on GitHub (pinned to 7d981676b3)
Solutions
- Set the variable to exactly 'true' or 'false'.
- Remove it to use the default credential behavior.
- Watch for typos and surrounding quotes/whitespace in the env configuration.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/cubejs-backend-shared/src/env.ts:1796 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02).
Data as JSON: /api/errors/ad0fa950c939c586.
Report an issue: GitHub.