diegosouzapw/OmniRoute · error
Access token is required
Error message
Access token is required
What it means
Error "Access token is required" thrown in diegosouzapw/OmniRoute.
Source
Thrown at src/lib/oauth/services/cursor.ts:103
const arch = process.arch;
if (arch === "x64") return "x86_64";
if (arch === "arm64") return "aarch64";
return arch;
}
return "x86_64";
}
/**
* Validate and import token from Cursor IDE or cursor-agent CLI.
* Note: We skip API validation because Cursor API uses complex protobuf format.
* Token will be validated when actually used for requests.
* @param {string} accessToken - Access token from state.vscdb or auth.json
* @param {string} [machineId] - Machine ID from state.vscdb (optional for cursor-agent imports)
*/
async validateImportToken(accessToken: string, machineId?: string) {
// Basic validation
if (!accessToken || typeof accessToken !== "string") {
throw new Error("Access token is required");
}
// Token format validation (Cursor tokens are typically long strings)
if (accessToken.length < 50) {
throw new Error("Invalid token format. Token appears too short.");
}
// Machine ID format validation (only if provided — cursor-agent imports don't have one)
if (machineId) {
const uuidRegex = /^[a-f0-9-]{32,}$/i;
if (!uuidRegex.test(machineId.replace(/-/g, ""))) {
throw new Error("Invalid machine ID format. Expected UUID format.");
}
}
// Note: We don't validate against API because Cursor uses complex protobuf.
// Token will be validated when used for actual requests.
View on GitHub (pinned to a179ffed5b)
When it happens
Trigger: Thrown at src/lib/oauth/services/cursor.ts:103 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/40070051dc099086.
Report an issue: GitHub.