diegosouzapw/OmniRoute · error · Error
The selected file is not valid JSON.
Error message
The selected file is not valid JSON.
What it means
Error "The selected file is not valid JSON." thrown in diegosouzapw/OmniRoute.
Source
Thrown at src/app/(dashboard)/dashboard/tools/agent-bridge/components/AgentBridgeMaintenanceCard.tsx:171
setPasswordModalError(null);
};
const handleExport = () =>
run("export", async () => {
const config = await fetchAgentBridgeConfig();
downloadJson(config, `agent-bridge-config-${Date.now()}.json`);
});
const handleImportFile = async (e: React.ChangeEvent<HTMLInputElement>) => {
const file = e.target.files?.[0];
e.target.value = ""; // allow re-selecting the same file
if (!file) return;
await run("import", async () => {
let parsed: unknown;
try {
parsed = JSON.parse(await file.text());
} catch {
throw new Error(t("importInvalidJson") || "The selected file is not valid JSON.");
}
const result: ImportResult = await importAgentBridgeConfig(parsed as AgentBridgeConfig);
setNotice(
(t("importDone") || "Imported {bypass} bypass · {hosts} hosts · {agents} agents")
.replace("{bypass}", String(result.bypassPatterns))
.replace("{hosts}", String(result.customHosts))
.replace("{agents}", String(result.agents))
);
await onRefresh();
});
};
return (
<>
<div className="rounded-xl border border-border/60 bg-card overflow-hidden">
<div className="flex items-center gap-3 px-5 py-4">
<div className="p-2 rounded-lg bg-primary/10">
<span className="material-symbols-outlined text-[20px] text-primary">build</span>View on GitHub (pinned to a179ffed5b)
When it happens
Trigger: Thrown at src/app/(dashboard)/dashboard/tools/agent-bridge/components/AgentBridgeMaintenanceCard.tsx:171 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/8016f9771b00a5d8.
Report an issue: GitHub.