Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[predef] importCode command appears to be broken #62

Closed
prabhu opened this issue Jan 14, 2024 · 0 comments · Fixed by #63
Closed

[predef] importCode command appears to be broken #62

prabhu opened this issue Jan 14, 2024 · 0 comments · Fixed by #63

Comments

@prabhu
Copy link
Contributor

prabhu commented Jan 14, 2024

After successful creation, it is trying to load the atom from an incorrect directory.

importCode("/mnt/work/sandbox/node-express-server-rest-api")
Creating project `node-express-server-rest-api` for code at `/mnt/work/sandbox/node-express-server-rest-api`
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Djna.library.path=/home/prabhu/miniconda3/envs/chenpy-dev/lib
Slicing the atom for usages. This might take a few minutes ...
Slices have been successfully written to /mnt/work/AppThreat/chen/usages.json
io.appthreat.console.ConsoleException: Error creating project for input path: `/mnt/work/sandbox/node-express-server-rest-api`
Caused by: java.nio.file.NoSuchFileException: /mnt/work/AppThreat/chen/workspace/node-express-server-rest-api/app.atom
  at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
  at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
  at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
  at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:261)
  at java.base/java.nio.file.Files.newByteChannel(Files.java:379)
  at java.base/java.nio.file.Files.newByteChannel(Files.java:431)
  at java.base/java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:420)
  at java.base/java.nio.file.Files.newInputStream(Files.java:159)
  at better.files.File.newInputStream(File.scala:442)
  at better.files.File.bytes(File.scala:234)
  at io.appthreat.console.cpgcreation.CpgGeneratorFactory.isZipFile(CpgGeneratorFactory.scala:88)
  at io.appthreat.console.cpgcreation.CpgGeneratorFactory.runGenerator$$anonfun$1(CpgGeneratorFactory.scala:68)
  at scala.util.Success.map(Try.scala:262)
  at io.appthreat.console.cpgcreation.CpgGeneratorFactory.runGenerator(CpgGeneratorFactory.scala:77)
  at io.appthreat.console.cpgcreation.ImportCode.$anonfun$6(ImportCode.scala:211)
  at scala.Option.flatMap(Option.scala:283)
  at io.appthreat.console.cpgcreation.ImportCode.io$appthreat$console$cpgcreation$ImportCode$$apply(ImportCode.scala:219)
  at io.appthreat.console.cpgcreation.ImportCode.apply(ImportCode.scala:56)
  ... 39 elided
@prabhu prabhu mentioned this issue Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant