diegosouzapw/OmniRoute · error · Error
next.data?.error ||…
Error message
next.data?.error || translateOrFallback("tailscaleEnableFailed", "Failed to enable Tailscale Funnel") What it means
Inside the funnel-enable polling loop (up to 40 attempts, 3s apart, after the operator opened the enableUrl tab): a re-probe POST to /api/tunnels/tailscale/enable returned non-OK mid-wait; prefers next.data?.error over the tailscaleEnableFailed fallback and aborts the loop.
Solutions
- Tolerate transient poll failures instead of aborting the loop immediately
- Verify the Funnel enable URL is still valid
- Check server logs for the tailscale enable route
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at src/app/(dashboard)/dashboard/endpoint/EndpointPageClient.tsx:874 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25).
Data as JSON: /api/errors/700f208d22cf2c57.
Report an issue: GitHub.
Appendix: source
Thrown at src/app/(dashboard)/dashboard/endpoint/EndpointPageClient.tsx:874
if (data?.funnelNotEnabled && data?.enableUrl) {
window.open(data.enableUrl, "tailscale_funnel", "width=680,height=780");
setTailscaleNotice({
type: "info",
message: translateOrFallback(
"tailscaleWaitingForFunnel",
"Enable Funnel for this device in the opened browser tab. OmniRoute will keep polling."
),
});
let enabled = null;
for (let attempt = 0; attempt < 40; attempt += 1) {
await new Promise((resolve) => setTimeout(resolve, 3000));
const next = await requestTailscaleEnable({
sudoPassword: tailscalePassword || undefined,
});
if (!next.res.ok) {
throw new Error(
next.data?.error ||
translateOrFallback("tailscaleEnableFailed", "Failed to enable Tailscale Funnel")
);
}
if (next.data?.success) {
enabled = next;
break;
}
if (!next.data?.funnelNotEnabled) {
enabled = next;
break;
}
}
if (!enabled?.data?.success) {
throw new Error(
translateOrFallback(
"tailscaleFunnelTimedOut",View on GitHub (pinned to a179ffed5b)