wpilibsuite / WPILibInstaller-Avalonia

Other
8 stars 20 forks source link

WPILib Installer error when VS Code is already installed #326

Closed superpenguin612 closed 1 year ago

superpenguin612 commented 1 year ago

This error appears whenever trying to update WPILib without reinstalling VS Code (pressing skip at the prompt to install VS Code) This occurred on the WPILib_macOS-Arm64-2023.2.1.dmg installer.

System.ComponentModel.Win32Exception (2): An error occurred trying to start process '/Users/XXX/wpilib/2023/vscode/Visual Studio Code.app/Contents/Resources/app/bin/code' with working directory '/'. No such file or directory
   at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
   at WPILibInstaller.ViewModels.InstallPageViewModel.<>c__DisplayClass45_0.<RunVsCodeExtensionsSetup>b__8() in /Users/runner/work/WPILibInstaller-Avalonia/WPILibInstaller-Avalonia/WPILibInstaller-Avalonia/ViewModels/InstallPageViewModel.cs:line 669
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
   at WPILibInstaller.ViewModels.InstallPageViewModel.RunVsCodeExtensionsSetup() in /Users/runner/work/WPILibInstaller-Avalonia/WPILibInstaller-Avalonia/WPILibInstaller-Avalonia/ViewModels/InstallPageViewModel.cs:line 660
   at WPILibInstaller.ViewModels.InstallPageViewModel.InstallEverything(CancellationToken token) in /Users/runner/work/WPILibInstaller-Avalonia/WPILibInstaller-Avalonia/WPILibInstaller-Avalonia/ViewModels/InstallPageViewModel.cs:line 160
   at WPILibInstaller.ViewModels.InstallPageViewModel.RunInstall() in /Users/runner/work/WPILibInstaller-Avalonia/WPILibInstaller-Avalonia/WPILibInstaller-Avalonia/ViewModels/InstallPageViewModel.cs:line 191
   at WPILibInstaller.ViewModels.InstallPageViewModel.<>c__DisplayClass24_0.<<-ctor>g__installFunc|0>d.MoveNext() in /Users/runner/work/WPILibInstaller-Avalonia/WPILibInstaller-Avalonia/WPILibInstaller-Avalonia/ViewModels/InstallPageViewModel.cs:line 73
ThadHouse commented 1 year ago

Just to double check, the file its trying to run exists, right? You didn't happen to move the VS Code app from the wpilib folder into your applications folder, right? We had someone do that last year, and it causes this error.

superpenguin612 commented 1 year ago

Ouch, sorry. I renamed the Visual Studio Code.app file. Thanks!