PAC file does not parse
critical
The file is not valid JavaScript. No engine can run it; every browser falls back to its no-PAC behaviour, which in practice is DIRECT.
Why it matters
A PAC file is a JavaScript program. If it does not parse, no engine ever gets to call
FindProxyForURL, and the client behaves as if no proxy were configured. In Chromium the
failed script is logged and connections go direct unless the ProxyPacMandatory policy is
set. For an enterprise that relies on the proxy for inspection and logging this is the
worst possible outcome: every request bypasses the proxy and nobody is told.
Typical causes: a missing brace or quote, a copy-paste accident, smart quotes from a word processor (see PAC-E014), ES2015 syntax on an ES5 engine (see PAC-K001, reported separately because it parses in modern browsers).
How to fix
Fix the reported syntax error; run the file through a JavaScript parser (ES5 mode) before deploying.
Examples
Bad
function FindProxyForURL(url, host) {
if (isPlainHostName(host)) {
return "DIRECT";
return "PROXY proxy.corp.example:8080";
}
Open bad example in checkerGood
function FindProxyForURL(url, host) {
if (isPlainHostName(host)) {
return "DIRECT";
}
return "PROXY proxy.corp.example:8080";
}
Open good example in checkerEngine behaviour
| Engine | Behaviour | Source |
|---|---|---|
| chromium | Script load fails; requests go DIRECT unless the ProxyPacMandatory policy is set. | doc, verified 2026-10-04 · ref |
Related rules
- No FindProxyForURL function PAC-E002
- Non-ASCII characters in code PAC-E014
- ES2015+ syntax (let, const, arrow functions, template literals) PAC-K001