-
Notifications
You must be signed in to change notification settings - Fork 513
When a file is opened through WebDav the extension crashes #31
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
Thanks for the report, JOF3! Can you also give me the scheme for the file path that was used? It should be just above the stack trace you copied in the log file. I'll need to add another case in the path validator to allow it. |
Sure. The file path is like the following: |
Thank you! I'll get this fixed. |
There are some considerable issues with opening files from a SharePoint based WebDAV folder when the SharePoint Site is on https not http Key crux is this against SharePoint Online or on premises? As that makes the difference between being able to do this easily or not due to the different auth in place. |
Cool! Thank you! |
Also are you on Mac/Windows? If windows do you have the site marked as a mapped drive? If not you'll need to get that down before you can work with it. Will try and dig out an article explaining it in more detail but will be late on this evening as I'm off to the London PowerShell User Group tonight |
I am on Windows (Windows 10 with November Update) I have just tested with a mapped drive. This way it works and the path in the EditorServices.log is like this: "uri": "file:///z%3A/New-VM.ps1" So the mapped drive is the solution/workaround for this.(?) But I think the extension should not just fail if the file is opened without the mapped drive. Maybe it makes sense that a message is displayed that the extension does not work with the current path |
Don't know if this may help. A new release if code is out with this fix |
Path validation in PowerShell Editor Services still needs to be fixed so that the language service doesn't crash when a WebDAV path is opened. I agree @J0F3, the extension shouldn't fail when such a path is opened. I'll try to get a fix out for that next week. |
Hey @J0F3, do you still see this issue when trying to load WebDav files? I apologize it's taken me this long to get back to it. |
Hey @daviwil, No problem. I have just tested it and it unfortunately still happens. [ERROR] - Method "CurrentDomain_UnhandledException" at line 125 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Host\Program.cs System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.UriFormatException: Invalid URI: The hostname could not be parsed. (PowerShell Editor Services Host v0.4.2.264 and Version 0.10.10 of VS Code) |
Thanks for confirming, I'll have a look and see if I can do something about this for the 0.5.0 release. |
It looks like the problem here is the odd The only reason I need to parse the paths is so that I can resolve referenced files (through dot-sourcing, etc). My plan is to put that responsibility on the editor, but that will take a bit more work. I'll make this happen for 0.6. |
We recently published an update to our extension which has addressed a number of underlying uri issues, would you mind giving it a try and letting us know if you are still hitting this issue? |
This issue is being closed as inactive, if this issue is still occurring it will be re-opened |
When a PowerShell File is opened through a WebDav Path (e.g SharePoint Library access through Windows Explorer) the extension crashes with the following error in the EditorServices.log:
FATAL UNHANDLED EXCEPTION:
The text was updated successfully, but these errors were encountered: