cube-js/cube · warning
Wrong driver
Error message
Wrong driver
What it means
The Dev Server's /playground/driver endpoint (packages/cubejs-server-core/src/core/DevServer.ts:330) validates the `driver` query parameter against the known DriverDependencies map. If it's missing, not a string, or not a recognized driver key, it responds 400 'Wrong driver'. It's used by the Playground to check/install database driver packages.
Source
Thrown at packages/cubejs-server-core/src/core/DevServer.ts:330
app.get('/playground/dashboard-app-status', catchErrors(async (req, res) => {
this.cubejsServer.event('Dev Server Dashboard App Status');
const dashboardPort = this.dashboardAppProcess && await this.dashboardAppProcess.dashboardUrlPromise;
res.json({
running: !!dashboardPort,
dashboardPort,
dashboardAppPath: path.resolve(options.dashboardAppPath)
});
}));
let driverPromise: Promise<void> | null = null;
let driverError: Error | null = null;
app.get('/playground/driver', catchErrors(async (req: Request, res: Response) => {
const { driver } = req.query;
if (!driver || typeof driver !== 'string' || !DriverDependencies[driver as keyof typeof DriverDependencies]) {
return res.status(400).json('Wrong driver');
}
if (packageExists(DriverDependencies[driver as keyof typeof DriverDependencies])) {
return res.json({ status: 'installed' });
} else if (driverPromise) {
return res.json({ status: 'installing' });
} else if (driverError) {
return res.status(500).json({
status: 'error',
error: driverError.toString()
});
}
return res.json({ status: null });
}));
app.post('/playground/driver', catchErrors((req, res) => {
const { driver } = req.body;View on GitHub (pinned to 7d981676b3)
Solutions
- Use an exact supported driver key, e.g. /playground/driver?driver=postgres
- Check spelling against the DriverDependencies map in your installed cubejs-server-core version
- Update @cubejs-server-core and the Playground frontend together so driver keys match
- If behind a proxy, verify the query string is forwarded intact
Example fix
// before GET /playground/driver?driver=postgress // after GET /playground/driver?driver=postgres
Defensive patterns
Strategy: validation
Validate before calling
const SUPPORTED_DRIVERS = ['postgres','mysql','mariadb','clickhouse','bigquery','snowflake','duckdb','mssql','mongodb','elasticsearch','firehose','cubestore'];
if (!SUPPORTED_DRIVERS.includes(driver)) throw new Error(`Unsupported driver: ${driver}`); Prevention
- Use the Playground UI instead of hand-crafted /playground/driver URLs
- Keep @cubejs-server-core and Playground versions in sync so driver keys match
- Validate driver names against the DriverDependencies map of your installed version
When it happens
Trigger: GET /playground/driver with no `driver` param, a non-string param, or a key absent from DriverDependencies (e.g. a typo like 'postgress' or a driver removed in your server-core version).
Common situations: Hand-typing the Playground driver-install URL; a stale/older Playground frontend sending driver keys renamed or dropped by a newer cubejs-server-core; proxies stripping the query string.
Related errors
- ${type} is required
- You have to select at least one table
- Unknown schema format. Must be one of ${Object.values(Schema
- Dashboard app creating
- Dashboard app not found in '${path.resolve(options.dashboard
AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02).
Data as JSON: /api/errors/167d7f95d9fc737e.
Report an issue: GitHub.