Skip to content

Activating extension 'redhat.java' failed. Cannot read property 'join' of null. #1163

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

Closed
wjayesh opened this issue Nov 10, 2019 · 15 comments
Closed
Labels
extension The issue needs to be fixed in the extension

Comments

@wjayesh
Copy link

wjayesh commented Nov 10, 2019

Description

I am trying to run a Java project but the extensions don't get activated. I have JDK installed and java.home set in settings.json.

Steps to Reproduce

  1. Build an image from this Dockerfile
  2. Run a container and open localhost:8080
  3. Open terminal and clone a repository.
  4. Click on any file to get prompted with this notification

Screenshot from 2019-11-10 22-03-23

@sr229
Copy link
Contributor

sr229 commented Nov 11, 2019

We're getting reports it works fine in other systems, might be a Firefox-specific issue since extensions also has a client-side worker working while its backend runs.

@sr229 sr229 added the extension The issue needs to be fixed in the extension label Nov 11, 2019
@newk5
Copy link

newk5 commented Nov 11, 2019

We're getting reports it works fine in other systems, might be a Firefox-specific issue since extensions also has a client-side worker working while its backend runs.

I'm getting the same error here, in firefox and chromium(74). I'm running ubuntu 16.04

@wjayesh
Copy link
Author

wjayesh commented Nov 11, 2019

I am getting the same result on Chrome too. Can you inspect the Dockerfile to see if I'm missing something? Thanks

@newk5
Copy link

newk5 commented Nov 11, 2019

Not sure if this makes a difference but I'm not using docker, I just downloaded the binary and ran it.

@IUSR
Copy link

IUSR commented Nov 11, 2019

Having the same problem using the latest Docker image and Firefox developer edition 71.0b8:

Version: 1.39.2
Commit: 2018024
Date: 2019-11-07T22:06:35.047Z
Browser: Mozilla/5.0 (X11; Linux x86_64; rv:71.0) Gecko/20100101 Firefox/71.0

If a web worker problem is suspected, there's an error on the JS console that seems relevant:

Failed to register/update a ServiceWorker for scope ‘https://xxxxxx/’: Bad Content-Type of ‘text/html’ received for script ‘https://xxxxxx/service-worker.js’. Must be a JavaScript MIME type.

navigating to this "service-worker.js" from within the browser, I could see it's actually an HTML page, so the complaint looks legit.

BTW my set up uses HTTPS terminated by Nginx and forwards everything to the plaintext HTTP port of coder-server, so I don't expect a problem caused by Nginx when forwarding "service-worker.js".

@aak1247
Copy link

aak1247 commented Nov 12, 2019

Same error with chrome(78) and binary running on debian 9(deepin 15)

@wjayesh
Copy link
Author

wjayesh commented Nov 13, 2019

If it helps, the codercom/code-server:2.1657-vsc1.39.2 image does not have this particular problem.
There instead, when you select run/debug from the context menu or select any Java command like "create a project" from the command palette; "Activating _Extensions" appears for a while on the status bar and there's no further activity @sr229

@sr229
Copy link
Contributor

sr229 commented Nov 13, 2019

Probably need to do some investigation

CC @code-asher

@code-asher
Copy link
Member

From what I've seen (#1136 (comment)) the join error is because the extension is missing files. You can try:

npm install
./node_modules/.bin/gulp download_server

But we need to look into our marketplace and figure out why this is failing to fully build. At least, I think that's the source of the problem.

@code-asher
Copy link
Member

Linked the wrong comment. Here's the right one: #1136 (comment)

@code-asher
Copy link
Member

code-asher commented Nov 14, 2019

Huh, but if earlier images don't have the problem then the issue could be in the install phase in code-server rather than our marketplace.

@sstone1
Copy link

sstone1 commented Nov 15, 2019

@code-asher I'm seeing a similar problem with ms-vscode.go - the version installed by code-server --install-extension ms-vscode.go does not have a node_modules folder, so fails to activate as one of its dependencies is missing.

Edit: looks like #1171 is open for this particular extension.

@DreamUFO
Copy link

DreamUFO commented Nov 19, 2019

same issue
centos 6.5
code-server Version: 1.39.2
Commit: 2018024
Date: 2019-11-07T22:06:35.047Z
Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36

not docker version install manually code-server2.1688-vsc1.39.2-linux-x86_64.tar.gz

I have JDK installed and java.home set in settings.json. system env have JAVA_HOME JDK_HOME too.

code-server2.1688-vsc1.39.2-linux-x86_64.tar.gz

extensions folder no package.json so npm install will do nothing
run npm install gulp
./node_modules/.bin/gulp download_server report No gulpfile found

image

@sstone1
Copy link

sstone1 commented Nov 28, 2019

@code-asher @sr229 is there an update on this and similar issues with files missing in extensions downloaded from the Code Server marketplace?

@nhooyr
Copy link
Contributor

nhooyr commented Jan 30, 2020

See #1299

@nhooyr nhooyr closed this as completed Jan 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension The issue needs to be fixed in the extension
Projects
None yet
Development

No branches or pull requests

9 participants