java-debug plugin download not validated — truncated jar silently disables debugging

Aberta
#324 1 comentário 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
45/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
java, rust
Domínio
devtools

Direção de pesquisa

The download and install logic for the java-debug plugin jar lives in the Rust extension code of this repository, so start by locating where the debugger jar is fetched and where its presence is checked. Add a size or checksum comparison against the release asset and re-download on mismatch, and confirm the error path surfaces a bundle-load failure. Done means a truncated jar is detected and replaced on the next start, which can be checked by truncating the file manually and restarting.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Summary

The com.microsoft.java.debug.plugin jar is downloaded without any integrity check. A truncated file is accepted as a valid install and silently breaks all debugging.

What happened

  • Extension version: 6.8.30 (WSL remote, Zed 1.26.2)
  • The downloaded debugger/com.microsoft.java.debug.plugin-0.53.2.jar was 668,580 bytes instead of the real 3,107,682 bytes (download interrupted back in April; no validation, so the fragment was kept)
  • On every jdtls start, bundle loading fails (visible in jdtls ~/.cache/jdtls-*/.metadata/.log):
    Cannot extract bundle symbolicName or version .../com.microsoft.java.debug.plugin-0.53.2.jar
    
  • Consequently all debug delegate commands are unregistered: any debug session reports
    No delegateCommandHandler for vscode.java.resolveMainClass
  • This state persisted for months because nothing surfaces the load failure

Fix suggestion: validate the download (size against the release / checksum) and re-download on mismatch, or at least surface bundle-load failures to the user.

Workaround that fixed it locally: re-download the jar from https://github.com/zed-industries/java-debug/releases/download/0.53.2/com.microsoft.java.debug.plugin-0.53.2.jar and fully restart Zed.

Linguagem predominante
Rust
Estrelas
225
Forks
47
Merge médio
3h
PRs com merge (30d)
5

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de zed-extensions/java

Todas as issues de zed-extensions/java

Issues semelhantes

Mais issues de Rust

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.