redhat-developer / redhat-developer/vscode-java

TypeError: Cannot read property 'rows' of undefined

Open
#1,843 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

Whenever I open my project, the extension fails with:

ERR Cannot read property 'rows' of undefined: TypeError: Cannot read property 'rows' of undefined
    at u.open (/home/x/.vscode/extensions/redhat.java-0.76.0/dist/extension.js:15:69804)
    at S.startSendingEvents (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:88:32770)
    at u._setupExtHostProcessListeners (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:88:37551)
    at u.attachPtyToTerminal (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:88:34952)
    at S.$onDidStartTask (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:90:46370)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

I inspected the extensions file and it seems that e is undefined:

open(e){
   s.serverTasks.suggestTaskEntrySize(e.rows-1);
   const t=s.serverTasks.getHistory();
   this.printTasks(t)
}

and then after a few seconds:

ERR The request (id: 1, method: 'textDocument/documentSymbol') has been cancelled: Error: The request (id: 1, method: 'textDocument/documentSymbol') has been cancelled
    at /home/x/.vscode/extensions/redhat.java-0.76.0/dist/extension.js:1:76464
    at /home/x/.vscode/extensions/redhat.java-0.76.0/dist/extension.js:1:76758
    at Immediate.<anonymous> (/home/x/.vscode/extensions/redhat.java-0.76.0/dist/extension.js:1:77117)
    at processImmediate (internal/timers.js:456:21)

Here are some info messages it shows before:

{
  message: 'Starting Java server with: /usr/lib/jvm/java-11-openjdk-amd64/bin/java --add-modules=ALL-SYSTEM --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED -Declipse.application=org.eclipse.jdt.ls.core.id1 -Dosgi.bundles.defaultStartLevel=4 -Declipse.product=org.eclipse.jdt.ls.core.product -Dfile.encoding=utf8 -XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx1G -Xms100m -javaagent:/home/x/.vscode/extensions/gabrielbb.vscode-lombok-1.0.1/server/lombok.jar -noverify -jar /home/x/.vscode/extensions/redhat.java-0.76.0/server/plugins/org.eclipse.equinox.launcher_1.6.100.v20201223-0822.jar -configuration /home/x/.config/Code/User/globalStorage/redhat.java/0.76.0/config_ss_linux -data /home/x/.config/Code/User/workspaceStorage/dfcb4a389a57c5e007b1c06673447101/redhat.java/ss_ws',
  level: 'info',
  timestamp: '2021-03-22 10:41:18.617'
}
{
  message: 'Starting Java server with: /usr/lib/jvm/java-11-openjdk-amd64/bin/java --add-modules=ALL-SYSTEM --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED -Declipse.application=org.eclipse.jdt.ls.core.id1 -Dosgi.bundles.defaultStartLevel=4 -Declipse.product=org.eclipse.jdt.ls.core.product -Dfile.encoding=utf8 -XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx1G -Xms100m -javaagent:/home/x/.vscode/extensions/gabrielbb.vscode-lombok-1.0.1/server/lombok.jar -noverify -jar /home/x/.vscode/extensions/redhat.java-0.76.0/server/plugins/org.eclipse.equinox.launcher_1.6.100.v20201223-0822.jar -configuration /home/x/.config/Code/User/globalStorage/redhat.java/0.76.0/config_linux -data /home/x/.config/Code/User/workspaceStorage/dfcb4a389a57c5e007b1c06673447101/redhat.java/jdt_ws',
  level: 'info',
  timestamp: '2021-03-22 10:41:18.689'
}

This previously worked so I'm not sure what changed.

Environment
  • Operating System: Debian GNU/Linux 10 (buster)
  • JDK version: OpenJDK Java 11 AMD64, project JDK: 1.8
  • Visual Studio Code version: 1.54.3
  • Java extension version: 0.76.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported stack trace in the bundled extension.js from redhat.java 0.76.0 and reproduce the failure when opening the project on the listed VS Code and Java versions. Trace the task startup path around open(e) and determine why its argument is undefined; done means opening the project no longer raises the rows TypeError and the subsequent document-symbol request is not cancelled.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, typescript, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.