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

vscode not working on mac #797

Open
hohwille opened this issue Nov 23, 2024 · 3 comments
Open

vscode not working on mac #797

hohwille opened this issue Nov 23, 2024 · 3 comments
Labels
bug Something isn't working macOS specific for Apple MacOS vscode Microsoft visual studio code

Comments

@hohwille
Copy link
Member

Expected behavior

As a IDEasy user, I want to install and run vscode via ide command so that I can easily use it.

Actual behavior

$ ide vscode
Expected folder was not found at /Users/hohwille/projects/IDEasy/settings/vscode/workspace/setup
Start: Configuring workspace main for IDE vscode
Successfully ended step 'Configuring workspace main for IDE vscode'.
Successfully completed ide (vscode)
/Users/hohwille/projects/IDEasy/software/vscode/bin/code: line 38: /Users/hohwille/projects/_ide/software/default/vscode/vscode/1.95.3/Visual Studio Code.app/Contents/MacOS/Electron: Permission denied

Steps to reproduce (bug) / Use Case of feature request (enhancement)

  1. ide vscode

Related/Dependent Issues

Comments/Hints:

Also plugin installations failed for this reason.

Affected version:

  • OS:Mac
  • 2024.12.001-beta-SNAPSHOT
@hohwille hohwille added bug Something isn't working vscode Microsoft visual studio code macOS specific for Apple MacOS labels Nov 23, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in IDEasy board Nov 23, 2024
@hohwille
Copy link
Member Author

bash-3.2$ ls -la "/Users/hohwille/projects/_ide/software/default/vscode/vscode/1.95.3/Visual Studio Code.app/Contents/MacOS/Electron"
-rw-r--r--@ 1 hohwille  staff  51344 23 Nov 17:08 /Users/hohwille/projects/_ide/software/default/vscode/vscode/1.95.3/Visual Studio Code.app/Contents/MacOS/Electron

@hohwille
Copy link
Member Author

I manually added executable permissions with chmod a+x.
Then I ran vscode again and it failed due to Gatekeeper.
I manually approved with nasty workflow and admin password.
Then it still failed with a Popup that an unexpected error occured with option to report or cancel.
I reran with ide vscode and now got this:

ide vscode
Expected folder was not found at /Users/hohwille/projects/IDEasy/settings/vscode/workspace/setup
Start: Configuring workspace main for IDE vscode
Successfully ended step 'Configuring workspace main for IDE vscode'.
Step 'ide (vscode)' failed: java.lang.IllegalStateException: Failed to copy /Users/hohwille/projects/_ide/software/default/vscode/vscode/1.95.3/.ide.software.version to /Users/hohwille/projects/_ide/software/default/vscode/vscode/1.95.3/Visual Studio Code.app/Contents/Resources/app/.ide.software.version
 Step 'Install vscode (*)' failed: java.lang.IllegalStateException: Failed to copy /Users/hohwille/projects/_ide/software/default/vscode/vscode/1.95.3/.ide.software.version to /Users/hohwille/projects/_ide/software/default/vscode/vscode/1.95.3/Visual Studio Code.app/Contents/Resources/app/.ide.software.version
2 step(s) failed out of 3 steps.
An unexpected error occurred!
We are sorry for the inconvenience.
Please check the error below, resolve it and try again.
If the error is not on your end (network connectivity, lack of permissions, etc.) please file a bug:
https://github.com/devonfw/IDEasy/issues/new?assignees=&labels=bug&projects=&template=bug.md&title=IllegalStateException%3A+Failed+to+copy+%2FUsers%2Fhohwille%2Fprojects%2F_ide%2Fsoftware%2Fdefault%2Fvscode%2Fvscode%2F1.95.3%2F.ide.software.version+to+%2FUsers%2Fhohwille%2Fprojects%2F_ide%2Fsoftware%2Fdefault%2Fvscode%2Fvscode%2F1.95.3%2FVisual+Studio+Code.app%2FContents%2FResources%2Fapp%2F.ide.software.version
java.lang.IllegalStateException: Failed to copy /Users/hohwille/projects/_ide/software/default/vscode/vscode/1.95.3/.ide.software.version to /Users/hohwille/projects/_ide/software/default/vscode/vscode/1.95.3/Visual Studio Code.app/Contents/Resources/app/.ide.software.version
	at com.devonfw.tools.ide.io.FileAccessImpl.copy(FileAccessImpl.java:352)
	at com.devonfw.tools.ide.tool.LocalToolCommandlet.createToolInstallation(LocalToolCommandlet.java:393)
	at com.devonfw.tools.ide.tool.LocalToolCommandlet.installTool(LocalToolCommandlet.java:220)
	at com.devonfw.tools.ide.tool.LocalToolCommandlet.installTool(LocalToolCommandlet.java:186)
	at com.devonfw.tools.ide.tool.LocalToolCommandlet.installTool(LocalToolCommandlet.java:171)
	at com.devonfw.tools.ide.tool.LocalToolCommandlet.install(LocalToolCommandlet.java:85)
	at com.devonfw.tools.ide.tool.ToolCommandlet.runTool(ToolCommandlet.java:166)
	at com.devonfw.tools.ide.tool.ToolCommandlet.runTool(ToolCommandlet.java:152)
	at com.devonfw.tools.ide.tool.ide.IdeToolCommandlet.runTool(IdeToolCommandlet.java:55)
	at com.devonfw.tools.ide.tool.ToolCommandlet.run(ToolCommandlet.java:130)
	at com.devonfw.tools.ide.tool.ide.IdeToolCommandlet.run(IdeToolCommandlet.java:49)
	at com.devonfw.tools.ide.context.AbstractIdeContext.applyAndRun(AbstractIdeContext.java:860)
	at com.devonfw.tools.ide.context.AbstractIdeContext.run(AbstractIdeContext.java:767)
	at com.devonfw.tools.ide.cli.Ideasy.runOrThrow(Ideasy.java:89)
	at com.devonfw.tools.ide.cli.Ideasy.run(Ideasy.java:52)
	at com.devonfw.tools.ide.cli.Ideasy.main(Ideasy.java:29)
	at [email protected]/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH)
Caused by: java.nio.file.FileSystemException: /Users/hohwille/projects/_ide/software/default/vscode/vscode/1.95.3/Visual Studio Code.app/Contents/Resources/app/.ide.software.version: Operation not permitted
	at [email protected]/sun.nio.fs.UnixFileSystem.copyFile(UnixFileSystem.java:668)
	at [email protected]/sun.nio.fs.BsdFileSystem.copyFile(BsdFileSystem.java:154)
	at [email protected]/sun.nio.fs.UnixFileSystem.copy(UnixFileSystem.java:1060)
	at [email protected]/sun.nio.fs.UnixFileSystemProvider.copy(UnixFileSystemProvider.java:300)
	at [email protected]/java.nio.file.Files.copy(Files.java:1304)
	at com.devonfw.tools.ide.io.FileAccessImpl.copyRecursive(FileAccessImpl.java:372)
	at com.devonfw.tools.ide.io.FileAccessImpl.copy(FileAccessImpl.java:350)
	... 16 more

@hohwille
Copy link
Member Author

The file /Users/hohwille/projects/_ide/software/default/vscode/vscode/1.95.3/.ide.software.version exists and contains the proper version.
But again we have a Gatekeeper issue (see #451):

cp /Users/hohwille/projects/_ide/software/default/vscode/vscode/1.95.3/.ide.software.version "/Users/hohwille/projects/_ide/sofdefault/vscode/vscode/1.95.3/Visual Studio Code.app/Contents/Resources/app/.ide.software.version"
cp: /Users/hohwille/projects/_ide/software/default/vscode/vscode/1.95.3/Visual Studio Code.app/Contents/Resources/app/.ide.software.version: Operation not permitted

So Gatekeeper does not allow us to copy a file into an application folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working macOS specific for Apple MacOS vscode Microsoft visual studio code
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant