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

Problem with the Intellij IDEA 2024.1.6 #88

Open
BeneInfosec opened this issue Sep 23, 2024 · 3 comments
Open

Problem with the Intellij IDEA 2024.1.6 #88

BeneInfosec opened this issue Sep 23, 2024 · 3 comments

Comments

@BeneInfosec
Copy link

Semgrep does not working properly with Intellij IDEA 2024.1.6

The following errors are follow:
Semgrep: Refused to set unsafe header "host"
image
image

@ajbt200128
Copy link
Collaborator

looks like the semgrep version is 1.76.0. What platform are you on? Could you update semgrep to the newest version?

@BeneInfosec
Copy link
Author

BeneInfosec commented Sep 26, 2024

image
This is the version of Semgrep in Intelli-J, it is the last update of the plugin
image

@ikarusnc
Copy link

ikarusnc commented Nov 19, 2024

Hi there, I have the very same problem on RUST ROVER 2024.2.5, Semgrep Plugin 0.3.0, Semgrep 1.96.0.

Also the semgrep server error output:

Initializing server
Caching workspace targets
Finished caching workspace targets
Server initialized
Refreshing rules
[00.98][ERROR]: Unhandled message:
{
  "id": "id-removed-from-here",
  "jsonrpc": "2.0",
  "result": null
}
Loaded 22485 rules from Semgrep Deployment
Got 31 errors from Semgrep Deployment
Rules refreshed
Scanning open documents
[42.27][WARNING]: No targets to scan! Not scanning anything.
Scanned open documents
[42.28][ERROR]: Unhandled message:
{
  "id": "id-removed-from-here",
  "jsonrpc": "2.0",
  "result": null
}
Scanning workspace
┌─────────────┐
│ Scan Status │
└─────────────┘
  Scanning 23 files tracked by git with 1945 Code rules:
  Language      Rules   Files          Origin      Rules
 ─────────────────────────────        ───────────────────
  <multilang>      99      23          Community     101
  rust             50      10          Pro_rules      57
  xml               9       7
Semgrep errors:
Semgrep skipped 0 rules
Scanned 23 files
Found 0 matches
Scanned workspace
java.lang.RuntimeException: 'initialized' response not received from the server in 100 seconds
	at com.intellij.platform.lsp.impl.connector.Lsp4jServerConnector.o(Lsp4jServerConnector.kt:115)
	at com.intellij.platform.lsp.impl.connector.Lsp4jServerConnector.connect$intellij_platform_lsp_impl(Lsp4jServerConnector.kt:89)
	at com.intellij.platform.lsp.impl.LspServerImpl.o(LspServerImpl.kt:341)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport$executeOnPooledThread$1.run(AnyThreadWriteThreadingSupport.kt:134)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
	at com.intellij.util.concurrency.ContextCallable.call(ContextCallable.java:32)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at com.intellij.util.concurrency.ContextRunnable.run(ContextRunnable.java:27)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:735)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:732)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:732)
	at java.base/java.lang.Thread.run(Thread.java:1583)

[99.93][ERROR]: Error: exception Jsonrpc: json conversion failed: invalid structured value
Raised at Jsonrpc__Import.Json.error in file "jsonrpc/src/import.ml", line 31, characters 23-50
Called from Jsonrpc__Import.Option.map in file "jsonrpc/src/import.ml", line 7, characters 21-26
Called from Jsonrpc.Packet.t_of_fields in file "jsonrpc/src/jsonrpc.ml", line 271, characters 21-77
Called from Lsp__Io.Make.read in file "lsp/src/io.ml", line 108, characters 24-57
Called from Lwt.Sequential_composition.bind.create_result_promise_and_callback_if_deferred.callback in file "src/core/lwt.ml", line 1844, characters 16-19
Re-raised at RPC_server.start.rpc_loop.(fun) in file "src/osemgrep/language_server/server/RPC_server.ml", line 195, characters 8-1023
Re-raised at Lwt.Miscellaneous.poll in file "src/core/lwt.ml", line 3123, characters 20-29
Called from Lwt_main.run.run_loop in file "src/unix/lwt_main.ml", line 27, characters 10-20
Called from Lwt_main.run in file "src/unix/lwt_main.ml", line 106, characters 8-13
Re-raised at Lwt_main.run in file "src/unix/lwt_main.ml", line 112, characters 4-13
Called from Lsp_subcommand.run_conf in file "src/osemgrep/cli_lsp/Lsp_subcommand.ml", line 67, characters 2-34
Called from CLI.dispatch_subcommand in file "src/osemgrep/cli/CLI.ml", line 230, characters 12-278
Called from CLI.safe_run in file "src/osemgrep/cli/CLI.ml", line 290, characters 8-12
Exit code: 2
Command line: /home/user/venv/bin/semgrep lsp
StdIO connection closed

Thank you in advance for your help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants