windmill-labs/windmill · error
Path is not set
Error message
Path is not set
What it means
In the Windmill frontend's app OAuth connection flow (`AppConnectInner.svelte`), the `next()` state machine requires a variable `path` to store the OAuth credentials. When the flow reaches the step that checks/creates the variable and `path` is still empty, it throws 'Path is not set'. The library throws this to force the user to choose a destination path before the connection variables are written.
Source
Thrown at frontend/src/lib/components/AppConnectInner.svelte:725
* Authorization code flow: Traditional OAuth popup window
* Requires user interaction and consent
* Opens popup for user to authenticate with OAuth provider
*/
const url = new URL(`/api/oauth/connect/${connectClient}`, window.location.origin)
url.searchParams.append('scopes', scopes.join('+'))
if (extra_params.length > 0) {
extra_params.forEach(([key, value]) => url.searchParams.append(key, value))
}
window.addEventListener('message', popupListener)
window.addEventListener('storage', handleStorageEvent)
console.log('opening popup', url.toString())
window.open(url.toString(), '_blank', 'popup=true')
step += 1
}
} else {
if (!path) {
if (step == 2) return
throw Error('Path is not set')
}
// Check if variable paths already exist
if (!manual || linkedSecrets.length <= 1) {
const exists = await VariableService.existsVariable({
workspace: effectiveWorkspace,
path
})
if (exists) {
throw Error(`Variable at path ${path} already exists. Delete it or pick another path`)
}
} else {
for (const secretField of linkedSecrets) {
const varPath = `${path}_${secretField}`
const exists = await VariableService.existsVariable({
workspace: effectiveWorkspace,
path: varPath
})
if (exists) {View on GitHub (pinned to e474e8803c)
Solutions
- Fill in the 'Path' field in the connect dialog before clicking Next.
- Verify the path is a valid variable path (no spaces, correct naming) — an invalid/empty derived path counts as unset.
- If embedding the component, pass a `path` prop/default so the state is populated before `next()` is called.
- Check step state: at step 2 the check is silently skipped; if you expect a skip, ensure the flow actually reaches step 2 or provides a path.
Example fix
// before: calling next() with no path set
await next();
// after: guard in the caller
if (!path) {
path = 'my_app_oauth_credentials'; // or surface a validation message
}
await next(); Defensive patterns
Strategy: validation
Validate before calling
// before invoking the connect flow's next()
if (!path || typeof path !== 'string' || !path.trim()) {
throw new Error('Set a destination variable path before continuing');
} Type guard
function isNonEmptyString(v: unknown): v is string {
return typeof v === 'string' && v.trim().length > 0;
} Try / catch
try {
await next();
} catch (e) {
if (e instanceof Error && e.message === 'Path is not set') {
focusPathInput(); // prompt the user to fill the path field
} else throw e;
} Prevention
- Always populate the path field before advancing the connect wizard.
- Disable the Next button until a valid, non-empty path is entered.
- If embedding the component, pass a sensible default path derived from the app name.
- Validate the path format (no spaces, workspace-unique) before submission.
When it happens
Trigger: Clicking through the app-connect wizard (`next`, called from `connectOauth`, `selectFromOthers`, `open`, `processPopupData`) with the path input left blank (or non-manual flows where no path was derived), reaching the else branch at step state where `!path` is true and `step != 2`.
Common situations: User skips the path field in the connect dialog and hits Next; a prefilled/derived path is missing because the integration name is empty; automation calling the component's flow without setting the path state.
Related errors
- Variable at path ${path} already exists. Delete it or pick a
- Variable at path ${varPath} already exists. Delete it or pic
- local script ${path} has no content/language
- Pipeline node content must declare the pipeline annotation o
- Cannot save invalid repository
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/2c48b16f50328a0b.
Report an issue: GitHub.