Skip to content

Editor Services not starting due to "non-existent" path #1014

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
adbertram opened this issue Aug 28, 2017 · 9 comments · Fixed by PowerShell/PowerShellEditorServices#580
Closed

Comments

@adbertram
Copy link
Contributor

adbertram commented Aug 28, 2017

System Details

  • Operating system name and version: MacOS Sierra
  • VS Code version: 1.15.1
  • PowerShell extension version: 1.4.1
  • Output from $PSVersionTable:
Name                           Value                                           
----                           -----                                           
PSVersion                      6.0.0-beta                                      
PSEdition                      Core                                            
GitCommitId                    v6.0.0-beta.6                                   
OS                             Darwin 16.7.0 Darwin Kernel Version 16.7.0: T...
Platform                       Unix                                            
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                         
PSRemotingProtocolVersion      2.3                                             
SerializationVersion           1.1.0.1                                         
WSManStackVersion              3.0

Issue Description

I use VS Code on my Mac and access PowerShell scripts on a Parallels Windows VM. Parallels mounts the Windows disk directly as a volume on my Mac. This has been working great until I recently upgraded to Parallels 13. The Windows volume still exists called /Volumes/[C] VMABERTRAM01/ and I can access files fine still in VS Code but Editor Services fails to start.

I took a look inside of the EditorServices.log file and found this which is probably why it's refusing to load.

8/28/17 9:37:01 AM [ERROR] - Method "OnListenTaskCompleted" at line 391 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\ProtocolEndpoint.cs

    ProtocolEndpoint message loop terminated due to unhandled exception:
    
    System.AggregateException: One or more errors occurred. (Cannot find path '/Volumes/[C] VMABERTRAM01/<MyWorkspaceFolder>' because it does not exist.) ---> System.Management.Automation.ItemNotFoundException: Cannot find path '/Volumes/[C] VMABERTRAM01/Users/abertram/Source/Workspaces/IS-DevOps/EO/Dev' because it does not exist.

I know this is not a problem with the volume as I can access it fine outside of VS Code. For some reason, Code does not like the volume path.

I've managed to work around this for now by creating a SMB share on my Windows VM and accessing it that way.

@adbertram
Copy link
Contributor Author

This is a major PITA for me. Anyone have an idea what this might be?

@rkeithhill
Copy link
Contributor

Does this work in your PS Core console?

Get-Item -LiteralPath '/Volumes/[C] VMABERTRAM01/Users/abertram/Source/Workspaces/IS-DevOps/EO/Dev'

@adbertram
Copy link
Contributor Author

adbertram commented Oct 23, 2017 via email

@rkeithhill
Copy link
Contributor

Well, that could be a problem for PSES. The System.Management.Automation.ItemNotFoundException says we are running a PowerShell command and it is failing.

@daviwil
Copy link
Contributor

daviwil commented Oct 23, 2017

Yep, might be worth filing an issue on PowerShell/PowerShell to see if they can figure out why this path isn't accessible to PowerShell.

@adbertram adbertram reopened this Nov 20, 2017
@adbertram
Copy link
Contributor Author

@rkeithhill I'm looking into this again. This now works:

[Adams-MacBook-Pro-2.local] - /Users/adam> Get-Item -LiteralPath '/Volumes/[C] VMABERTRAM01/Users/abertram/Source/Workspaces/IS-DevOps/EO/Dev'                                                                                                        


    Directory: /Volumes/[C] VMABERTRAM01/Users/abertram/Source/Workspaces/IS-DevOps/EO


Mode                LastWriteTime         Length Name                                                                     
----                -------------         ------ ----                                                                     
d-----          11/8/17   4:32 PM                Dev    

However, I'm still getting that non-existent path in the session logs. Is it possible, the plugin just needs to enclose the path in quotes?

Adams-MacBook-Pro-2:~ adam$ ls /Volumes/[C] VMABERTRAM01/Users/abertram/Source/Workspaces/IS-DevOps/EO
ls: /Volumes/[C]: No such file or directory
VMABERTRAM01/Users/abertram/Source/Workspaces/IS-DevOps/EO:
Dev	Dev-DSC	Release
Adams-MacBook-Pro-2:~ adam$ ls "/Volumes/[C] VMABERTRAM01/Users/abertram/Source/Workspaces/IS-DevOps/EO"
Dev	Dev-DSC	Release

@rkeithhill
Copy link
Contributor

Zip and attach the log files and I'll take a look.

@rkeithhill
Copy link
Contributor

@adbertram OK I have a fix for this. It's not the spaces, it is the [] chars that need to be escaped. We already have a method for escaping paths. Just need to call that method before we attempt to set the working dir.

@adbertram
Copy link
Contributor Author

adbertram commented Nov 24, 2017 via email

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