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

Language Support for Java isn't working in GitHub Codespaces #2726

Open
snebjorn opened this issue Oct 7, 2022 · 5 comments
Open

Language Support for Java isn't working in GitHub Codespaces #2726

snebjorn opened this issue Oct 7, 2022 · 5 comments

Comments

@snebjorn
Copy link

snebjorn commented Oct 7, 2022

For some reason Language Support for Java isn't working in my GitHub Codespace. The extension seems to like being run there.
It was working a week or so ago but for some reason it just stopped and I cannot get it to function again.

Cleaning the project doesn't function
image
image

See this discussion for more info https://github.com/orgs/community/discussions/35119

Environment
  • Operating System: "linux", version: "5.4.0-1090-azure", arch: "amd64", family: "unix"
  • JDK version: 11.0.16.1
  • Visual Studio Code version: 1.72.0 (system setup)
  • Java extension version: 1.11.0
Steps To Reproduce
  1. Open https://github.com/snebjorn/openapi-generator/tree/feature/devcontainer in GitHub Codespaces
  2. Observe Language Support for Java isn't working
Current Result

Language features like code navigation doesn't work in GitHub Codespaces.

Expected Result

Language features like code navigation should work.

Additional Informations

https://github.com/orgs/community/discussions/35119
devcontainers/images#155

@jdneo
Copy link
Collaborator

jdneo commented Oct 8, 2022

I saw there is an error in console:

ERR EPERM: operation not permitted, copyfile '/home/vscode/.vscode-remote/extensions/redhat.java-1.11.0-linux-x64/server/config_ss_linux/config.ini' -> '/home/vscode/.vscode-remote/data/User/globalStorage/redhat.java/1.11.0/config_ss_linux/config.ini': Error: EPERM: operation not permitted, copyfile '/home/vscode/.vscode-remote/extensions/redhat.java-1.11.0-linux-x64/server/config_ss_linux/config.ini' -> '/home/vscode/.vscode-remote/data/User/globalStorage/redhat.java/1.11.0/config_ss_linux/config.ini'
    at Object.copyFileSync (node:fs:2804:3)
    at f (/home/vscode/.vscode-remote/extensions/redhat.java-1.11.0-linux-x64/dist/extension.js:2:718080)
    at /home/vscode/.vscode-remote/extensions/redhat.java-1.11.0-linux-x64/dist/extension.js:2:720919
    at Object.t.prepareExecutable (/home/vscode/.vscode-remote/extensions/redhat.java-1.11.0-linux-x64/dist/extension.js:2:720955)
    at /home/vscode/.vscode-remote/extensions/redhat.java-1.11.0-linux-x64/dist/extension.js:2:698955
    at Generator.next (<anonymous>)
    at /home/vscode/.vscode-remote/extensions/redhat.java-1.11.0-linux-x64/dist/extension.js:2:684461
    at new Promise (<anonymous>)
    at r (/home/vscode/.vscode-remote/extensions/redhat.java-1.11.0-linux-x64/dist/extension.js:2:684206)
    at /home/vscode/.vscode-remote/extensions/redhat.java-1.11.0-linux-x64/dist/extension.js:2:695763
    at new Promise (<anonymous>)
    at /home/vscode/.vscode-remote/extensions/redhat.java-1.11.0-linux-x64/dist/extension.js:2:695747
    at Generator.next (<anonymous>)
    at o (/home/vscode/.vscode-remote/extensions/redhat.java-1.11.0-linux-x64/dist/extension.js:2:684263)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Will it help if you change the folder's permission?

@snebjorn
Copy link
Author

snebjorn commented Oct 8, 2022

thank you that put me on the right path - I think 😸

However this does seem like an issue with the extension

[renderer4] [error] [Extension Host] Error: command 'java.execute.workspaceCommand' not found
    at S._tryExecuteCommand (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1715:3532)
    at S.executeCommand (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1715:3414)

Seems like it tries to execute a command on my local VSCode, which doesn't have the extension installed, instead of executing it inside the GitHub Codespaces remote container

@jdneo
Copy link
Collaborator

jdneo commented Oct 9, 2022

I think it's the permission issue that cause the java extension cannot be activated successfully, then the command not found exception is observed.

@snebjorn
Copy link
Author

snebjorn commented Oct 9, 2022

Will it help if you change the folder's permission?

Hmm how do I do that?
I ran sudo chown -R vscode: /home/vscode and sudo chmod u+rwx /home/vscode but to no avail

@snebjorn ➜ ~ $ ls -Al
ls: cannot access '.bashrc': Operation not permitted
ls: cannot access '.zshrc': Operation not permitted
ls: cannot access '.bash_logout': Operation not permitted
ls: cannot access '.profile': Operation not permitted
ls: cannot access '.oh-my-zsh': Operation not permitted
ls: cannot access '.config': Operation not permitted
ls: cannot access '.vscode-remote': Operation not permitted
ls: cannot access '.npm': Operation not permitted
ls: cannot access '.docker': Operation not permitted
total 0
-????????? ? ? ? ?            ? .bash_logout
-????????? ? ? ? ?            ? .bashrc
d????????? ? ? ? ?            ? .config
l????????? ? ? ? ?            ? .docker
d????????? ? ? ? ?            ? .npm
d????????? ? ? ? ?            ? .oh-my-zsh
-????????? ? ? ? ?            ? .profile
d????????? ? ? ? ?            ? .vscode-remote
-????????? ? ? ? ?            ? .zshrc
@snebjorn ➜ ~ $ whoami
vscode
@snebjorn ➜ ~ $ 

@jdneo
Copy link
Collaborator

jdneo commented Oct 11, 2022

I tested to create a codespaces for the spring-petclinic project and it works. Have no idea why your project has the permission issue. Let's wait to see the response from upstream: devcontainers/images#155

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants