question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug]: Activating extension 'vscjava.vscode-java-test' failed: Cannot read properties of undefined (reading 'name').

See original GitHub issue

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser: Chrome
  • Local OS: Windows
  • Remote OS: Ubuntu
  • Remote Architecture:
  • code-server --version: 4.4.0

Steps to Reproduce

This seems not a bug completely, but a crash, sometimes get this when loading some spring Gradle project, where I already have installed the java extensions pack. Don’t know why I am getting this. Previously I used code-server version 3.4.1 with an older version of the Java Extension pack and now I updated the versions and getting this.

Expected

Due to this crash the Java Test runner (Beaker Icon is not loading and I am not able to test my spring project). Expected behaviour should be load the test runner.

Actual

The Beaker Icon on the left navigation pane is not showing even though the project is completely loaded and shown in Java Projects section.

Logs

No response

Screenshot/Video

image

Does this issue happen in VS Code?

  • I cannot reproduce this in VS Code.

Are you accessing code-server over HTTPS?

  • I am using HTTPS.

Notes

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
Avirup-301294commented, Jul 17, 2022

Thanks @jsjoeio,

I have made a workaround in the issue. Working nicely with Code Server v4.4. I disable the updates for extensions and install older extension for test runner and now its working fice. No bugs and nothing.

Closing this thread! This is solved!

1reaction
krishnabharathi1997commented, May 20, 2022

We have found a repro for this problem

Note:

We are launching a code-server in an AWS virtual machine.

Issue

When we try to open or reload the code server with a java file (.java) opened. The extension crashes and throws - “Activating vscjava.vscode-java-test extension failed” . But if we reload with a non-java file opened (.json/.txt). The extension loads correctly and works without any other problem.

We tried to find the logs during the failure case. It clearly says some execution error during extension activation.

Log path - /home/crio-user/.local/share/code-server/logs/20220518T103013/exthost2/exhost.log

[2022-05-19 17:33:44.611] [exthost] [error] Activating extension vscjava.vscode-java-test failed due to an error:
[2022-05-19 17:33:44.611] [exthost] [error] TypeError: Cannot read properties of undefined (reading 'name')
	at t.fromCallback (/home/crio-user/.local/share/code-server/extensions/vscjava.vscode-java-test-0.35.0/dist/extension.bundle.js:2:597697)
	at Object.7749 (/home/crio-user/.local/share/code-server/extensions/vscjava.vscode-java-test-0.35.0/dist/extension.bundle.js:2:370379)
	at n (/home/crio-user/.local/share/code-server/extensions/vscjava.vscode-java-test-0.35.0/dist/extension.bundle.js:2:815234)
	at Object.5674 (/home/crio-user/.local/share/code-server/extensions/vscjava.vscode-java-test-0.35.0/dist/extension.bundle.js:2:371122)
	at n (/home/crio-user/.local/share/code-server/extensions/vscjava.vscode-java-test-0.35.0/dist/extension.bundle.js:2:815234)
	at Object.1708 (/home/crio-user/.local/share/code-server/extensions/vscjava.vscode-java-test-0.35.0/dist/extension.bundle.js:2:557865)
	at n (/home/crio-user/.local/share/code-server/extensions/vscjava.vscode-java-test-0.35.0/dist/extension.bundle.js:2:815234)
	at Object.8120 (/home/crio-user/.local/share/code-server/extensions/vscjava.vscode-java-test-0.35.0/dist/extension.bundle.js:2:542103)
	at n (/home/crio-user/.local/share/code-server/extensions/vscjava.vscode-java-test-0.35.0/dist/extension.bundle.js:2:815234)
	at Object.8735 (/home/crio-user/.local/share/code-server/extensions/vscjava.vscode-java-test-0.35.0/dist/extension.bundle.js:2:547940)
	at n (/home/crio-user/.local/share/code-server/extensions/vscjava.vscode-java-test-0.35.0/dist/extension.bundle.js:2:815234)
	at Object.8633 (/home/crio-user/.local/share/code-server/extensions/vscjava.vscode-java-test-0.35.0/dist/extension.bundle.js:2:534763)
	at n (/home/crio-user/.local/share/code-server/extensions/vscjava.vscode-java-test-0.35.0/dist/extension.bundle.js:2:815234)
	at Object.112 (/home/crio-user/.local/share/code-server/extensions/vscjava.vscode-java-test-0.35.0/dist/extension.bundle.js:2:564672)
	at n (/home/crio-user/.local/share/code-server/extensions/vscjava.vscode-java-test-0.35.0/dist/extension.bundle.js:2:815234)
	at Object.8786 (/home/crio-user/.local/share/code-server/extensions/vscjava.vscode-java-test-0.35.0/dist/extension.bundle.js:2:526725)
	at n (/home/crio-user/.local/share/code-server/extensions/vscjava.vscode-java-test-0.35.0/dist/extension.bundle.js:2:815234)
	at /home/crio-user/.local/share/code-server/extensions/vscjava.vscode-java-test-0.35.0/dist/extension.bundle.js:2:815665
	at Object.<anonymous> (/home/crio-user/.local/share/code-server/extensions/vscjava.vscode-java-test-0.35.0/dist/extension.bundle.js:2:815691)
	at Module._compile (node:internal/modules/cjs/loader:1105:14)
	at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
	at Module.load (node:internal/modules/cjs/loader:981:32)
	at Function.Module._load (node:internal/modules/cjs/loader:822:12)
	at Function.i._load (/opt/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:104:32278)
	at Function.m._load (/opt/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:104:28763)
	at Function.g._load (/opt/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:99:61429)
	at Module.require (node:internal/modules/cjs/loader:1005:19)
	at require (node:internal/modules/cjs/helpers:102:18)
	at Object.<anonymous> (/home/crio-user/.local/share/code-server/extensions/vscjava.vscode-java-test-0.35.0/main.js:8:19)
	at Module._compile (node:internal/modules/cjs/loader:1105:14)
	at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
	at Module.load (node:internal/modules/cjs/loader:981:32)
	at Function.Module._load (node:internal/modules/cjs/loader:822:12)
	at Function.i._load (/opt/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:104:32278)
	at Function.m._load (/opt/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:104:28763)
	at Function.g._load (/opt/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:99:61429)
	at Module.require (node:internal/modules/cjs/loader:1005:19)
	at require (node:internal/modules/cjs/helpers:102:18)
	at Function.r [as _$_nodeRequire] (/opt/lib/vscode/out/vs/loader.js:5:101)
	at E._loadCommonJSModule (/opt/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:104:30440)
	at E._doActivateExtension (/opt/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:90:13361)
	at E._activateExtension (/opt/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:90:12313)
	at Object.actualActivateExtension (/opt/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:90:9469)
	at g._activate (/opt/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:85:8171)
	at g._waitForDepsThenActivate (/opt/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:85:8107)
	at async g._initialize (/opt/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:85:7460)

Have attached a video recording below for reproducing the problem.

Link - https://www.loom.com/share/1c9878462fb6460ba29355abd2c6d750

As we are facing this problem in the production systems, requesting the team to fix the problem asap.

Read more comments on GitHub >

github_iconTop Results From Across the Web

VSCODE: Cannot read property 'local' of undefined
It is most probably because Code doesn't have privilege to write to the extension folder, which is by default ~/.vscode/extension.
Read more >
cannot read properties of undefined (reading 'query') chrome ...
I'm attempting to build a chrome extension that will grab the current url when tabBtn is clicked. I am receiving an error message...
Read more >
Java Testing in Visual Studio Code
It's a lightweight extension to run and debug Java test cases. Overview. The extension supports the following test frameworks: JUnit 4 (v4.8.0+); JUnit...
Read more >
Activation of Extension Pack for Java fails - Theia Community
root ERROR [hosted-plugin: 22372] Activating extension 'Extension Pack for Java' failed: TypeError: Cannot read property 'toLowerCase' of ...
Read more >
Activating extension 'vscjava.vscode-java-test' failed - IssueHint
Activating extension 'vscjava.vscode-java-test' failed: Cannot read properties of undefined (reading 'name')
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found