lbjlaq/Antigravity-Manager · error · Error
Cloudflared install failed
Error message
Cloudflared install failed
What it means
handleCfToggle invokes the cloudflared_install command and throws this if the returned status still reports installed=false after the install attempt, meaning the installer ran but cloudflared is not available.
Solutions
- Install cloudflared manually (package manager or official binary on PATH) and re-toggle
- Check the install command's logs/stderr — surface installStatus error details in the toast
- Verify network access and proxy settings on the machine running the desktop app
- Ensure the app has write permission to the install destination
Example fix
// before
if (!installStatus.installed) {
throw new Error('Cloudflared install failed');
}
// after
if (!installStatus.installed) {
throw new Error(`Cloudflared install failed: ${installStatus.error ?? 'unknown reason'}`);
} Defensive patterns
Strategy: try-catch
Validate before calling
const which = await invoke('cloudflared_check'); if (!which.available) preWarnUser('cloudflared missing and auto-install may fail'); Type guard
null
Try / catch
try { await handleCfToggle(true); } catch (e) { showToast(e.message, 'error'); setCfStatus(s => ({ ...s, enabled: false })); } Prevention
- Check external binary availability before offering the toggle
- Show installer stderr to the user on failure
- Document manual install steps in-app
When it happens
Trigger: Toggling the Cloudflared proxy on when cfStatus.installed is false and the cloudflared_install command completes without successfully installing the binary (missing package manager, no network, unsupported platform, insufficient permissions).
Common situations: Linux distro without a supported install path; corporate proxy blocking the download; user lacks permission to install to the target bin directory.
AI-assisted analysis of lbjlaq/Antigravity-Manager@90a2b6b207 (2026-09-19).
Data as JSON: /api/errors/29ff6637a710645f.
Report an issue: GitHub.
Appendix: source
Thrown at src/pages/ApiProxy.tsx:302
};
// Cloudflared: 启动/停止
const handleCfToggle = async (enable: boolean) => {
if (enable && !status.running) {
showToast(
t('proxy.cloudflared.require_proxy_running', { defaultValue: 'Please start the local proxy service first' }),
'warning'
);
return;
}
setCfLoading(true);
try {
if (enable) {
if (!cfStatus.installed) {
const installStatus = await invoke<typeof cfStatus>('cloudflared_install');
setCfStatus(installStatus);
if (!installStatus.installed) {
throw new Error('Cloudflared install failed');
}
showToast(t('proxy.cloudflared.install_success', { defaultValue: 'Cloudflared installed successfully' }), 'success');
}
const config = {
enabled: true,
mode: cfMode,
port: appConfig?.proxy.port || 8045,
token: cfMode === 'auth' ? cfToken : null,
use_http2: cfUseHttp2,
};
const status = await invoke<typeof cfStatus>('cloudflared_start', { config });
setCfStatus(status);
showToast(t('proxy.cloudflared.started', { defaultValue: 'Tunnel started' }), 'success');
// 持久化“启用”状态
if (appConfig) {
const newConfig = {View on GitHub (pinned to 90a2b6b207)