Describe the bug
an internal error occured while invoking the semgrep engine: unknown exception: (Failure
"NoTokenLocation min_max, empty list exn while processing ./foundation.min.js for rule 13..3, with metavar $Y, close location = { \"line\": 9, \"col\": 7894, \"offset\": 8136 }").
To Reproduce
With this file: https://github.com/daghan/lets-be-bad-guys/blob/master/badguys/static/js/foundation.min.js
semgrep --config https://semgrep.live/r/javascript foundation.min.js
Environment
Repro'ed with semgrep (brew) v0.8, semgrep GH action and semgrep.live
@aryx @ievans Any relation to recent bug fixes? I suspect this interferes with our demos.
@daghan Is there an unminified version of this file somewhere we can play with?
FWIW, I beautified this using beautify-js, and the offending lines of the file are:
var r = function(e) {
return /blackout/.test(e.selector) ? e : e.closest(".clearing-blackout")
}(e(n)), i, s;
https://semgrep.live/APp for an online version
A simpler repro is at: https://semgrep.live/DBY
Note that ./pfff -dump_js parses the latter example successfully.
I think I've fixed that yesterday.
Same than https://github.com/returntocorp/semgrep/issues/824