diegosouzapw/OmniRoute · error
Invalid machine ID format. Expected UUID format.
Error message
Invalid machine ID format. Expected UUID format.
What it means
Error "Invalid machine ID format. Expected UUID format." thrown in diegosouzapw/OmniRoute.
Source
Thrown at src/lib/oauth/services/cursor.ts:115
* @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.
return {
accessToken,
machineId: machineId || null,
expiresIn: 86400, // Cursor tokens typically last 24 hours
authMethod: machineId ? "imported" : "cursor-agent",
};
}
/**
* Extract user info from token if possible
* Cursor tokens may contain encoded user info
*/View on GitHub (pinned to a179ffed5b)
When it happens
Trigger: Thrown at src/lib/oauth/services/cursor.ts:115 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/3032cc3d9e38858b.
Report an issue: GitHub.