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

Cleaning a Java exercise without Java installed results in an ambigious error #661

Open
sebazai opened this issue Sep 1, 2022 · 0 comments

Comments

@sebazai
Copy link
Contributor

sebazai commented Sep 1, 2022

Describe the bug
error is: "Failed to clean exercise."

Expected behavior
Expect it to show Java is not installed or not added in the system PATH

Desktop (please complete the following information):

  • OS: macOS Monetery
  • VSCode Version 1.70.2
  • TMC Extension Version 2.1.5

TMC Extension logs
TMC -> Settings -> Set log level to verbose and reproduce error and paste logs.

[2022-09-01 20:45:37:526] [INFO] Run: "/Users/subustian/Library/Application Support/Code/User/globalStorage/moocfi.test-my-code/cli/tmc-langs-cli-aarch64-apple-darwin-0.25.2" "--client-name" "vscode_plugin" "--client-version" "2.1.5" "clean" "--exercise-path" "/Users/subustian/tmc-exercises/mooc-ohjelmoinnin-jatkokurssi/osa01-Osa01_10.Tarina"
[2022-09-01 20:45:37:579] [ERROR] Failed to clean exercise.
Runtime Error — Error in plugin — Runtime Error: Error in plugin
    at u._checkLangsResponse (/Users/subustian/.vscode/extensions/moocfi.test-my-code-2.1.5/dist/lib.js:2:436918)
    at /Users/subustian/.vscode/extensions/moocfi.test-my-code-2.1.5/dist/lib.js:2:433916
    at e.andThen (/Users/subustian/.vscode/extensions/moocfi.test-my-code-2.1.5/dist/lib.js:2:543900)
    at u.<anonymous> (/Users/subustian/.vscode/extensions/moocfi.test-my-code-2.1.5/dist/lib.js:2:433899)
    at Generator.next (<anonymous>)
    at o (/Users/subustian/.vscode/extensions/moocfi.test-my-code-2.1.5/dist/lib.js:2:374175)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Additional context
Ran the same command with RUST_BACKTRACE=1 and received a lot better error message:

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
{"output-kind":"output-data","status":"finished","message":"Error in plugin","result":"error","data":{"output-data-kind":"error","output-data":{"kind":"generic","trace":["Caused by: Error in plugin","Caused by: J4rs panicked: Could find the jvm dynamic library: JavaLocatorError { description: \"Java is not installed or not added in the system PATH\" }"]}}}
WD00039:~ subustian$ RUST_BACKTRACE=1 "/Users/subustian/Library/Application Support/Code/User/globalStorage/moocfi.test-my-code/cli/tmc-langs-cli-aarch64-apple-darwin-0.25.2" "--client-name" "vscode_plugin" "--client-version" "2.1.5" "clean" "--exercise-path" "/Users/subustian/tmc-exercises/mooc-ohjelmoinnin-jatkokurssi/osa01-Osa01_10.Tarina"
thread 'main' panicked at 'Could find the jvm dynamic library: JavaLocatorError { description: "Java is not installed or not added in the system PATH" }', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/j4rs-0.13.0/src/api_tweaks/generic.rs:41:38
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
{"output-kind":"output-data","status":"finished","message":"Error in plugin","result":"error","data":{"output-data-kind":"error","output-data":{"kind":"generic","trace":["Caused by: Error in plugin","Caused by: J4rs panicked: Could find the jvm dynamic library: JavaLocatorError { description: \"Java is not installed or not added in the system PATH\" }"]}}}
WD00039:~ subustian$ 
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

No branches or pull requests

1 participant