{"record":{"id":"2c48b16f50328a0b","repo":"windmill-labs/windmill","slug":"path-is-not-set","errorCode":null,"errorMessage":"Path is not set","messagePattern":"Path is not set","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"frontend/src/lib/components/AppConnectInner.svelte","lineNumber":725,"sourceCode":"\t\t\t\t * Authorization code flow: Traditional OAuth popup window\n\t\t\t\t * Requires user interaction and consent\n\t\t\t\t * Opens popup for user to authenticate with OAuth provider\n\t\t\t\t */\n\t\t\t\tconst url = new URL(`/api/oauth/connect/${connectClient}`, window.location.origin)\n\t\t\t\turl.searchParams.append('scopes', scopes.join('+'))\n\t\t\t\tif (extra_params.length > 0) {\n\t\t\t\t\textra_params.forEach(([key, value]) => url.searchParams.append(key, value))\n\t\t\t\t}\n\t\t\t\twindow.addEventListener('message', popupListener)\n\t\t\t\twindow.addEventListener('storage', handleStorageEvent)\n\t\t\t\tconsole.log('opening popup', url.toString())\n\t\t\t\twindow.open(url.toString(), '_blank', 'popup=true')\n\t\t\t\tstep += 1\n\t\t\t}\n\t\t} else {\n\t\t\tif (!path) {\n\t\t\t\tif (step == 2) return\n\t\t\t\tthrow Error('Path is not set')\n\t\t\t}\n\t\t\t// Check if variable paths already exist\n\t\t\tif (!manual || linkedSecrets.length <= 1) {\n\t\t\t\tconst exists = await VariableService.existsVariable({\n\t\t\t\t\tworkspace: effectiveWorkspace,\n\t\t\t\t\tpath\n\t\t\t\t})\n\t\t\t\tif (exists) {\n\t\t\t\t\tthrow Error(`Variable at path ${path} already exists. Delete it or pick another path`)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (const secretField of linkedSecrets) {\n\t\t\t\t\tconst varPath = `${path}_${secretField}`\n\t\t\t\t\tconst exists = await VariableService.existsVariable({\n\t\t\t\t\t\tworkspace: effectiveWorkspace,\n\t\t\t\t\t\tpath: varPath\n\t\t\t\t\t})\n\t\t\t\t\tif (exists) {","sourceCodeStart":707,"sourceCodeEnd":743,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/frontend/src/lib/components/AppConnectInner.svelte#L707-L743","documentation":"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.","triggerScenarios":"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`.","commonSituations":"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.","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."],"exampleFix":"// before: calling next() with no path set\nawait next();\n\n// after: guard in the caller\nif (!path) {\n  path = 'my_app_oauth_credentials'; // or surface a validation message\n}\nawait next();","handlingStrategy":"validation","validationCode":"// before invoking the connect flow's next()\nif (!path || typeof path !== 'string' || !path.trim()) {\n  throw new Error('Set a destination variable path before continuing');\n}","typeGuard":"function isNonEmptyString(v: unknown): v is string {\n  return typeof v === 'string' && v.trim().length > 0;\n}","tryCatchPattern":"try {\n  await next();\n} catch (e) {\n  if (e instanceof Error && e.message === 'Path is not set') {\n    focusPathInput(); // prompt the user to fill the path field\n  } else throw e;\n}","preventionTips":["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."],"tags":["windmill","svelte","frontend","oauth","variable-path","validation"],"backgroundTag":"missing-required-path","analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}