question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

the script "joern/graph-for-funcs.sc" cannot run successfully, how to solve it?

See original GitHub issue

enviroment:

computer: Linux version 4.4.0-124-generic (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9) )
java version "1.8.0_251",Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
Scala code runner version 2.13.3 

the error log output: j``` oern> cpg.runScript(“/home/bfs/cct/devign/joern/graph-for-funcs.sc”).toString() Compiling (synthetic)/ammonite/predef/interpBridge.sc Compiling (synthetic)/ammonite/predef/replBridge.sc Compiling (synthetic)/ammonite/predef/sourceBridge.sc Compiling (synthetic)/ammonite/predef/frontEndBridge.sc Compiling (synthetic)/ammonite/predef/DefaultPredef.sc Compiling (synthetic)/ammonite/predef/ArgsPredef.sc Compiling /home/bfs/cct/scala/sbt/(console) Compiling /home/bfs/cct/devign/joern/graph-for-funcs.sc graph-for-funcs.sc:86: value filterOnEnd is not a member of java.util.Iterator[overflowdb.Node] method.out(EdgeTypes.CONTAINS).filterOnEnd(_.isInstanceOf[nodes.CfgNode]).cast[nodes.CfgNode] ^ graph-for-funcs.sc:92: value hasLabel is not a member of java.util.Iterator[overflowdb.Node] possible cause: maybe a semicolon is missing before value hasLabel? .hasLabel(NodeTypes.BLOCK) ^ graph-for-funcs.sc:97: value hasLabel is not a member of java.util.Iterator[overflowdb.Node] val source = new NodeSteps(method.out(EdgeTypes.CONTAINS).hasLabel(NodeTypes.CALL).cast[nodes.Call]).nameNot(“<operator>.*”).dedup ^ java.lang.RuntimeException: Compilation Failed io.shiftleft.console.scripting.AmmoniteExecutor.$anonfun$runScript$7(AmmoniteExecutor.scala:52) cats.effect.internals.IORunLoop$.liftedTree3$1(IORunLoop.scala:229) cats.effect.internals.IORunLoop$.step(IORunLoop.scala:229) cats.effect.IO.unsafeRunTimed(IO.scala:320) cats.effect.IO.unsafeRunSync(IO.scala:239) io.shiftleft.console.scripting.ScriptManager.runScript(ScriptManager.scala:130) io.shiftleft.console.scripting.ScriptManager$CpgScriptRunner.runScript(ScriptManager.scala:64) io.shiftleft.console.scripting.ScriptManager$CpgScriptRunner.runScript(ScriptManager.scala:54) ammonite.$sess.cmd7$.<clinit>(cmd7.sc:1)


Have you encountered this problem ? and do you know where the problem is? I look forward to your help to provide ideas to solve the problem. 
Thank you very much

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
QiuJYWXcommented, Jul 28, 2020

Hi @epicosy , great ! Thanks for the update

1reaction
epicosycommented, Jul 23, 2020

It is most probable that Joern’s implementation was changed with something different. I just extended their script for combining the AST, CGF, and PDG for each method to include the file path. I did a diff between the script in my repository (on the left) and their current version of the script (on the right) here. Was it helpful?

Read more comments on GitHub >

github_iconTop Results From Across the Web

The binary code for the script is not found | VS2019 | MS SQL ...
Please open the script in the designer by clicking Edit Script button and make sure it builds successfully. Error at Script Task: There...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found