Budibase/budibase · error
No google configuration found
Error message
No google configuration found
What it means
fetchGoogleCreds loads the Google datasource configuration from the config store and throws 'No google configuration found' when none exists. Google OAuth datasource flows cannot proceed without stored clientID/clientSecret configuration.
Source
Thrown at packages/backend-core/src/middleware/passport/datasource/google.ts:19
import * as google from "../sso/google"
import { Cookie } from "../../../constants"
import * as configs from "../../../configs"
import * as cache from "../../../cache"
import * as utils from "../../../utils"
import { UserCtx, SSOProfile } from "@budibase/types"
import { ssoSaveUserNoOp } from "../sso/sso"
const GoogleStrategy = require("passport-google-oauth").OAuth2Strategy
type Passport = {
authenticate: any
}
async function fetchGoogleCreds() {
let config = await configs.getGoogleDatasourceConfig()
if (!config) {
throw new Error("No google configuration found")
}
return config
}
export async function preAuth(
passport: Passport,
ctx: UserCtx,
next: Function
) {
// get the relevant config
const googleConfig = await fetchGoogleCreds()
const platformUrl = await configs.getPlatformUrl({ tenantAware: false })
let callbackUrl = `${platformUrl}/api/global/auth/datasource/google/callback`
const strategy = await google.strategyFactory(
googleConfig,
callbackUrl,
ssoSaveUserNoOpView on GitHub (pinned to a81a902e9a)
Solutions
- Create and save the Google datasource config (clientID + clientSecret) in the builder before initiating auth
- Verify the config was saved under the correct tenant/production app
- Check configs DB (providers config documents) contains the google datasource doc
- Re-create the Google datasource if the underlying config document was removed
Example fix
// before
const strategy = await google.config(ctx) // throws if unconfigured
// after
const cfg = await configs.getGoogleDatasourceConfig()
if (!cfg) {
await configs.saveGoogleDatasourceConfig({ clientID, clientSecret })
}
const strategy = await google.config(ctx) Defensive patterns
Strategy: fallback
Validate before calling
const cfg = await configs.getGoogleDatasourceConfig()
if (!cfg?.clientID || !cfg?.clientSecret) {
throw new Error("Save Google datasource credentials before authenticating")
} Try / catch
try {
await fetchGoogleCreds()
// continue OAuth flow
} catch (e) {
if (e.message === "No google configuration found") {
return ctx.redirect("/settings/datasources/google") // prompt setup
}
throw e
} Prevention
- Check config presence before rendering the 'Connect Google' UI
- Recreate the config after tenant/app migrations
- Back up the configs DB as part of environment provisioning
When it happens
Trigger: Starting a Google datasource OAuth flow (preAuth/authenticate) before any Google datasource config has been saved for the tenant/app, or after the config was deleted.
Common situations: Fresh environment where Google Cloud OAuth credentials were never entered; config stored under a different type/tenant; migration losing configs DB documents; typo'd datasource config creation.
Related errors
- Configuration invalid. Must contain google clientID and clie
- Google config not found
- Unable to fetch datasource auth cookie
- Error constructing google authentication strategy: ${err}
- Slack OAuth client credentials are not configured
AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29).
Data as JSON: /api/errors/71dcd2367e9490d3.
Report an issue: GitHub.