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

Applying a snippet in JetBrains throws an applyToFile nullPointerException #2931

Open
3 tasks done
jhrozek opened this issue Nov 14, 2024 · 2 comments
Open
3 tasks done
Assignees
Labels
ide:jetbrains Relates specifically to JetBrains extension kind:bug Indicates an unexpected problem or unintended behavior "needs-triage"

Comments

@jhrozek
Copy link

jhrozek commented Nov 14, 2024

Before submitting your bug report

Relevant environment info

- OS: macOS
- Continue version: 0.0.81
- IDE version: GoLand 2024.2.3/PyCharm 2024.2.4
- Model: any
- config.json:
  
{
  "models": [
    {
      "title": "vanilla: GPT-4o",
      "provider": "openai",
      "model": "gpt-4o",
      "apiKey": "redacted",
    },
    {
      "title": "vanilla: Llama 3.1 8B",
      "provider": "ollama",
      "model": "llama3.1:8b",
      // directly using llama
      "apiBase": "http://127.0.0.1:11434/"
    }
  "tabAutocompleteOptions": {
    "disable": true
  },
  "customCommands": [
    {
      "name": "test",
      "prompt": "{{{ input }}}\n\nWrite a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.",
      "description": "Write unit tests for highlighted code"
    }
  ],
  "contextProviders": [
    {
      "name": "code",
      "params": {}
    },
    {
      "name": "docs",
      "params": {}
    },
    {
      "name": "diff",
      "params": {}
    },
    {
      "name": "terminal",
      "params": {}
    },
    {
      "name": "problems",
      "params": {}
    },
    {
      "name": "folder",
      "params": {}
    },
    {
      "name": "codebase",
      "params": {}
    }
  ],
  "slashCommands": [
    {
      "name": "edit",
      "description": "Edit selected code"
    },
    {
      "name": "comment",
      "description": "Write comments for the selected code"
    },
    {
      "name": "share",
      "description": "Export the current chat session to markdown"
    },
    {
      "name": "cmd",
      "description": "Generate a shell command"
    },
    {
      "name": "commit",
      "description": "Generate a git commit message"
    }
  ],
  "embeddingsProvider": {
    "provider": "ollama",
    "model": "nomic-embed-text"
  }
}

Description

When I ask an LLM to generate me a code snippet in a JetBrains IDE and click the "Apply" (play) button to get the snippet into the IDE editor, I get a popup saying:

Error handling message of type applyToFile: java.lang.NullPointerException: null cannot be cast to non-null type kotlin.String

To reproduce

  1. Go to the chat window
  2. ask the LLM to generate a code
  3. click the play button to apply the code

Log output

There doesn't seem to be anything relevant in continue logs.

The JetBrain logs seem to suggest I'm missing some git integration piece perhaps?

2024-11-14 14:20:44,929 [63239933]   INFO - #c.i.w.i.i.j.s.JpsGlobalModelSynchronizerImpl - Saving global entities com.intellij.platform.workspace.jps.entities.SdkEntity to files
2024-11-14 14:20:44,935 [63239939]   INFO - #c.i.w.i.i.j.s.JpsGlobalModelSynchronizerImpl - Saving global entities com.intellij.platform.workspace.jps.entities.LibraryEntity to files
2024-11-14 14:20:44,976 [63239980]   INFO - STDOUT - Error handling message: {"messageType":"indexProgress","data":{"progress":0,"desc":"Starting indexing","status":"loading"},"messageId":"db8dcd86-a63d-4880-b3c2-826b2157e5a4"}
2024-11-14 14:20:44,976 [63239980]   INFO - STDOUT - com.intellij.serviceContainer.AlreadyDisposedException: Container is already disposed
2024-11-14 14:20:44,978 [63239982]   INFO - STDOUT - Error handling message: {"messageType":"indexProgress","data":{"progress":0,"desc":"Starting indexing","status":"loading"},"messageId":"74ac04df-8582-4df7-b826-5a38330cc895"}
2024-11-14 14:20:44,979 [63239983]   INFO - STDOUT - com.intellij.serviceContainer.AlreadyDisposedException: Container is already disposed
2024-11-14 14:20:45,005 [63240009]   INFO - STDOUT - Git not found: java.lang.NullPointerException: readLine(...) must not be null
2024-11-14 14:20:45,005 [63240009]   INFO - STDOUT - Git not found: java.lang.NullPointerException: readLine(...) must not be null
2024-11-14 14:20:45,005 [63240009]   INFO - STDOUT - Git not found: java.lang.NullPointerException: readLine(...) must not be null
2024-11-14 14:20:45,006 [63240010]   INFO - STDOUT - Error handling message: {"messageType":"indexProgress","data":{"progress":0,"desc":"Starting indexing...","status":"loading"},"messageId":"24412fbd-5c3d-4bb7-8a31-85b6e5a12d30"}
2024-11-14 14:20:45,006 [63240010]   INFO - STDOUT - Error handling message: {"messageType":"indexProgress","data":{"progress":0,"desc":"Starting indexing...","status":"loading"},"messageId":"93048b0f-6196-4792-b030-23019c6f92db"}
2024-11-14 14:20:45,006 [63240010]   INFO - STDOUT - com.intellij.serviceContainer.AlreadyDisposedException: Container is already disposed
2024-11-14 14:20:45,006 [63240010]   INFO - STDOUT - com.intellij.serviceContainer.AlreadyDisposedException: Container is already disposed
2024-11-14 14:20:45,006 [63240010]   INFO - STDOUT - Error handling message: {"messageType":"indexProgress","data":{"progress":0,"desc":"Discovering files in .idea...","status":"indexing"},"messageId":"1b5b886c-02af-4abb-a730-9c0d1cecd8fa"}
2024-11-14 14:20:45,006 [63240010]   INFO - STDOUT - com.intellij.serviceContainer.AlreadyDisposedException: Container is already disposed
2024-11-14 14:20:45,006 [63240010]   INFO - STDOUT - Error handling message: {"messageType":"indexProgress","data":{"progress":0,"desc":"Discovering files in .idea...","status":"indexing"},"messageId":"bd5570a9-92ee-4539-a179-a941ba50424f"}
2024-11-14 14:20:45,006 [63240010]   INFO - STDOUT - com.intellij.serviceContainer.AlreadyDisposedException: Container is already disposed
2024-11-14 14:20:45,040 [63240044]   INFO - STDOUT - Git not found: java.lang.NullPointerException: readLine(...) must not be null
2024-11-14 14:20:45,041 [63240045]   INFO - STDOUT - Git not found: java.lang.NullPointerException: readLine(...) must not be null
2024-11-14 14:20:45,041 [63240045]   INFO - STDOUT - Error handling message: {"messageType":"indexProgress","data":{"progress":0,"desc":"Planning changes for chunks index...","status":"indexing"},"messageId":"e598456c-b835-48f9-86b0-455b5708c33a"}
2024-11-14 14:20:45,041 [63240045]   INFO - STDOUT - com.intellij.serviceContainer.AlreadyDisposedException: Container is already disposed
2024-11-14 14:20:45,041 [63240045]   INFO - STDOUT - Git not found: java.lang.NullPointerException: readLine(...) must not be null
2024-11-14 14:20:45,042 [63240046]   INFO - STDOUT - Error handling message: {"messageType":"indexProgress","data":{"progress":0,"desc":"Planning changes for vectordb::OllamaEmbeddingsProvider::nomic-embed-text index...","status":"indexing"},"messageId":"e4b87ba0-e7f2-4078-8888-c99768ae3974"}
2024-11-14 14:20:45,042 [63240046]   INFO - STDOUT - com.intellij.serviceContainer.AlreadyDisposedException: Container is already disposed
2024-11-14 14:20:45,042 [63240046]   INFO - STDOUT - Error handling message: {"messageType":"indexProgress","data":{"progress":0,"desc":"Planning changes for chunks index...","status":"indexing"},"messageId":"f879941d-ce81-442f-9245-6d27ea27c7c7"}
2024-11-14 14:20:45,042 [63240046]   INFO - STDOUT - com.intellij.serviceContainer.AlreadyDisposedException: Container is already disposed
2024-11-14 14:20:45,043 [63240047]   INFO - STDOUT - Error handling message: {"messageType":"indexProgress","data":{"progress":0,"desc":"Planning changes for vectordb::OllamaEmbeddingsProvider::nomic-embed-text index...","status":"indexing"},"messageId":"0edf36b0-263e-4fc1-9b00-65d6ba2be654"}
2024-11-14 14:20:45,043 [63240047]   INFO - STDOUT - com.intellij.serviceContainer.AlreadyDisposedException: Container is already disposed
2024-11-14 14:20:45,046 [63240050]   INFO - STDOUT - Error handling message: {"messageType":"indexProgress","data":{"progress":0,"desc":"Computing embeddings for 4 files","status":"indexing"},"messageId":"8934c805-47db-4710-bdda-ef1008d0a3d9"}
2024-11-14 14:20:45,046 [63240050]   INFO - STDOUT - com.intellij.serviceContainer.AlreadyDisposedException: Container is already disposed
2024-11-14 14:20:45,047 [63240051]   INFO - STDOUT - Error handling message: {"messageType":"indexProgress","data":{"progress":0,"desc":"Computing embeddings for 4 files","status":"indexing"},"messageId":"2829ecfa-928a-4c35-a5c9-b79a4043f41a"}
2024-11-14 14:20:45,048 [63240052]   INFO - STDOUT - com.intellij.serviceContainer.AlreadyDisposedException: Container is already disposed
2024-11-14 14:20:46,323 [63241327]   INFO - STDOUT - Error handling message: {"messageType":"indexProgress","data":{"progress":1,"desc":"Indexing complete","status":"done","shouldClearIndexes":false,"debugInfo":""},"messageId":"c141fd10-503c-4007-abdf-019ec5a681ff"}
2024-11-14 14:20:46,324 [63241328]   INFO - STDOUT - com.intellij.serviceContainer.AlreadyDisposedException: Container is already disposed
2024-11-14 14:20:46,324 [63241328]   INFO - STDOUT - Error handling message: {"messageType":"refreshSubmenuItems","messageId":"6e74936c-73c8-46bc-8342-8f12647905bb"}
2024-11-14 14:20:46,324 [63241328]   INFO - STDOUT - com.intellij.serviceContainer.AlreadyDisposedException: Container is already disposed
2024-11-14 14:20:46,427 [63241431]   INFO - STDOUT - Error handling message: {"messageType":"indexProgress","data":{"progress":1,"desc":"Indexing complete","status":"done","shouldClearIndexes":false,"debugInfo":""},"messageId":"44a6a39b-1ca1-417a-ab49-f8d27ef4a4f4"}
2024-11-14 14:20:46,427 [63241431]   INFO - STDOUT - com.intellij.serviceContainer.AlreadyDisposedException: Container is already disposed
2024-11-14 14:20:46,427 [63241431]   INFO - STDOUT - Error handling message: {"messageType":"refreshSubmenuItems","messageId":"b9c529eb-b5d4-40f0-a79b-0d94b43a4391"}
2024-11-14 14:20:46,427 [63241431]   INFO - STDOUT - com.intellij.serviceContainer.AlreadyDisposedException: Container is already disposed
@sestinj sestinj self-assigned this Nov 14, 2024
@dosubot dosubot bot added ide:jetbrains Relates specifically to JetBrains extension kind:bug Indicates an unexpected problem or unintended behavior labels Nov 14, 2024
@Patrick-Erichsen
Copy link
Contributor

I believe this was fixed here: #2909

Will be getting a new release out ASAP.

@Patrick-Erichsen
Copy link
Contributor

Patrick-Erichsen commented Nov 15, 2024

Hi all, we're recommending folks downgrade to 0.0.75 at the moment. Please see this main issue for details: #2956

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ide:jetbrains Relates specifically to JetBrains extension kind:bug Indicates an unexpected problem or unintended behavior "needs-triage"
Projects
None yet
Development

No branches or pull requests

3 participants