Semgrep: NoTokenLocation min_max, empty list exn while processing file

Created on 23 May 2020  路  5Comments  路  Source: returntocorp/semgrep

Describe the bug

I ran semgrep --config r2c on my code and got

an internal error occured while invoking the semgrep engine: unknown exception: (Failure
  "NoTokenLocation min_max, empty list exn while processing ./short.js for rule 55..3, with metavar $Y, close location = { \"line\": 2, \"col\": 5, \"offset\": 43 }").  

To Reproduce

Just run semgrep --config r2c on file containing

async function bar(msg) {
    let x, y;
    y = foo(msg);
}

Expected behavior

I expect no message on internal error

Screenshots
If applicable, add screenshots to help explain your problem.

Environment
If not using semgrep.live: are you running off docker, an official binary, a local build?

local build installed from brew

bug external-user fixed javascript high

Most helpful comment

It is probably not related

All 5 comments

Thank you for opening this issue @ghbren. Adding this to my queue to investigate first thing Tuesday (given Memorial Day). Are you blocked and would you like me to prioritize this sooner?

@ievans Is this related to #670? Defer to you on deduping.

It is probably not related

@dlukeomalley No need to prioritize this sooner. Please enjoy the long weekend 馃槂

@ievans how do I find the rule corresponding to rule 55..3 in semgrep-rules?
Here is the error:
"NoTokenLocation min_max, empty list exn while processing ./short.js for rule 55..3, with metavar $Y, close location = { "line": 2, "col": 5, "offset": 43 }").

In the mean time, each time there is an error in semgrep-core, I save the rule file passed from semgrep to /tmp/semgrep_core_xxx.yaml so that should be enough.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

msorens picture msorens  路  5Comments

Mandawi picture Mandawi  路  4Comments

ievans picture ievans  路  5Comments

brendongo picture brendongo  路  5Comments

ajinabraham picture ajinabraham  路  6Comments