mozilla/pdf.js · error · Error
Invalid token in parameter list.
Error message
Invalid token in parameter list.
What it means
Error "Invalid token in parameter list." thrown in mozilla/pdf.js.
Source
Thrown at src/core/xfa/formcalc_parser.js:482
default:
return [tok, this.getNode()];
}
tok = this.lexer.next();
}
}
static parseParams(lexer) {
const parser = new SimpleExprParser(lexer);
const params = [];
while (true) {
const [tok, param] = parser.parse();
if (param) {
params.push(param);
}
if (tok.id === TOKEN.rightParen) {
return params;
} else if (tok.id !== TOKEN.comma) {
throw new Error(Errors.params);
}
parser.reset();
}
}
static parseIndex(lexer) {
let tok = lexer.next();
if (tok.id === TOKEN.times) {
tok = lexer.next();
if (tok.id !== TOKEN.rightBracket) {
throw new Error(Errors.index);
}
return new AstEveryOccurence();
}
const [token, expr] = new SimpleExprParser(lexer).parse(tok);
if (token.id !== TOKEN.rightBracket) {
throw new Error(Errors.index);
}View on GitHub (pinned to 5903d58d58)
Solutions
- Fix the FormCalc function call's parameter list; ensure arguments are comma-separated expressions terminated by a closing parenthesis.
When it happens
Trigger: Thrown at src/core/xfa/formcalc_parser.js:482 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Authentication and authorization failures — expired tokens, bad credentials, and missing scopes.
AI-assisted analysis of mozilla/pdf.js@5903d58d58 (2026-08-13).
Data as JSON: /api/errors/28ab710a2cacbb54.
Report an issue: GitHub.