-
Notifications
You must be signed in to change notification settings - Fork 510
PowerShell extension crashes when dealing with UNC paths #1830
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
Comments
Please attach logs - see the troubleshooting docs. Without version info (extension, vscode, os), logs and/or repro instructions, this issue isn't very actionable. |
Just doing that now, I thought I had attached them |
Issue Description:CodeLens is causing interactive powershell console to crash I'm seeing the same behavior both with code in the repo (github and Enterprise), it seems to have just started a week ago or so, after adding the latest upgrade. The video shown here is the same thing i'm seeing. System Details:
### Expected Behavior Actual Behavior Logfiles: |
vscode-powershell.log |
I'm seeing the same behaviour as @ili101. Local files are fine, but scripts located at UNC paths exhibit crashing. |
The relevant log entry seems to be this one:
It seems to be occurring in this method: https://github.com/PowerShell/PowerShellEditorServices/blob/8c66fa912ecfac4e93345ca96dc49d1787f81f1d/src/PowerShellEditorServices/Workspace/Workspace.cs#L464-L487 Whatever .NET API we're using to resolve file paths as URIs seems to not like UNC paths, so we'll need to determine what the best way to handle those is. |
I was experiencing the repeated PowerShell extension crash until I disabled Code Lens in settings. My logs also have the
gets changed to this on save:
I am working around it by using Set-Location to the path of the function before dot-sourcing the function which allows me to use |
Do you have this setting configured: |
Yes I do. I will disable it for the near-term. Thanks! |
Can you attach log files for the extension? See troubleshooting docs for instructions on how to do that. |
@BruceAWilliams I think I've fixed the UNC path issues other folks are seeing but your log isn't detailed enought to see what is going on. Can you set your log level to diagnostic temporarily, repro the issue and attach the logs here? Thanks. Put this in you user settings file to enable diagnostic level logging:
|
I saw that my VSC loaded some UNC-path dirs, even though I don't open the files themselves. |
It's trying to resolve references in the script; it starts from what you've got open and works backwards. |
@rkeithhill The diagnostic logs as requested: |
Hi all, can you try one of these builds: PowerShell and PowerShell Preview release candidates.zip This should have the UNC path fix. Note, if you've never used the Preview extension, look at these steps. If you've never installed a VSIX before, here are the steps. |
I installed the the v1.12.1 extension, reloaded vscode and when I executed
|
@adegutis Looks like that's happening within dbatools. You might wanna point that over to them if it happens regularly. |
@BruceAWilliams Can you try a special drop of the extension to see if it fixes the original issue you brought up? The instructions are in third message up from this one. Thanks! |
Closing as this fix has been merged and will be available in the next release |
System Details
System Details Output
Issue Description
I am experiencing a problem with...
Expected Behaviour
-- Description of what should be happening --
Actual Behaviour
-- Description of what actually happens --
Attached Logs
Follow the instructions in the troubleshooting docs
about capturing and sending logs.
The text was updated successfully, but these errors were encountered: