{"record":{"id":"8a28339622809171","repo":"sipeed/picoclaw","slug":"launch-at-login-is-not-supported-on-this-platform","errorCode":null,"errorMessage":"Launch at login is not supported on this platform.","messagePattern":"Launch at login is not supported on this platform\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"web/frontend/src/components/config/config-page.tsx","lineNumber":700,"sourceCode":"        const result = await postLauncherDashboardSetup(password, confirm)\n        if (!result.ok) {\n          throw new Error(result.error)\n        }\n\n        const clearedLauncherForm = savedLauncherForm ?? {\n          ...launcherForm,\n          dashboardPassword: \"\",\n          dashboardPasswordConfirm: \"\",\n        }\n        setLauncherForm(clearedLauncherForm)\n        if (savedLauncherForm) {\n          setLauncherBaseline(savedLauncherForm)\n        }\n      }\n\n      if (autoStartDirty) {\n        if (!autoStartSupported) {\n          throw new Error(t(\"pages.config.autostart_unsupported\"))\n        }\n        const status = await updateAutoStartEnabled(autoStartEnabled)\n        setAutoStartEnabled(status.enabled)\n        setAutoStartBaseline(status.enabled)\n        queryClient.setQueryData([\"system\", \"autostart\"], status)\n      }\n\n      const gateway = await refreshGatewayState({ force: true })\n      showSaveSuccessOrRestartToast(\n        t,\n        t(\"pages.config.save_success\"),\n        t(\"navigation.config\"),\n        gateway?.restartRequired === true,\n      )\n    } catch (err) {\n      toast.error(\n        err instanceof Error ? err.message : t(\"pages.config.save_error\"),\n      )","sourceCodeStart":682,"sourceCodeEnd":718,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/web/frontend/src/components/config/config-page.tsx#L682-L718","documentation":"Thrown in handleSave (web/frontend/src/components/config/config-page.tsx:700, message from i18n key pages.config.autostart_unsupported) when the 'launch at login' toggle is dirty and the backend reports the platform cannot do autostart. autoStartSupported is derived from the autostart status query (autoStartStatus?.supported !== false), which reflects the launcher backend's OS integration capabilities.","triggerScenarios":"Toggling 'launch at login' on a platform where the backend's autostart integration (login-item/desktop-file registration) is unavailable — e.g. a headless Linux server, an unsupported distribution without a desktop environment, or an OS the backend has no launcher integration for — then saving.","commonSituations":"Running the dashboard on a server/NAS where there is no login session to hook; running in a container; the autostart status endpoint returned supported:false after an OS update; UI rendered the toggle because the status query had not loaded yet (undefined is treated as supported).","solutions":["Turn the 'launch at login' toggle back off and save — the toggle state is only persisted when supported","If you need autostart anyway, use the OS's own mechanism (systemd user unit, cron @reboot, Task Scheduler) to start the launcher","On desktop installs, update the launcher backend so its platform autostart integration reports supported:true"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// before enabling/saving the toggle\nconst { data: autoStartStatus } = useQuery({ queryKey: [\"system\", \"autostart\"], queryFn: getAutoStartStatus })\nif (autoStartDirty && autoStartStatus?.supported === false) {\n  setFieldError(t(\"pages.config.autostart_unsupported\"))\n  return\n}","typeGuard":"function isAutoStartSupported(status: unknown): boolean {\n  return !!status && (status as { supported?: boolean }).supported !== false\n}","tryCatchPattern":"try {\n  await handleSave()\n} catch (err) {\n  if (err instanceof Error) setError(err.message)\n}","preventionTips":["Hide or disable the 'launch at login' toggle when the autostart status reports supported:false (the page already does this at the UI level)","Wait for the autostart status query to load before enabling the control so undefined is never mistaken for supported","On unsupported platforms, offer a documented alternative (systemd unit, cron @reboot) next to the toggle"],"tags":["platform","autostart","frontend","config","i18n"],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}