openhab-vscode
openhab-vscode copied to clipboard
LSP/Incorrect path (UNC)
I'm not sure if something changed in 2.4 (using snapshot) or in the .40 version (which I upgraded to at the same time as switching to the snapshot)..
I have openHAB 2.4 running on a machine called 'pitanuc' in the directory "C:\openhab2". I have visual code installed on a DIFFERENT machine and am accessing 'conf' directory on 'pitanuc' using an UNC path: '\\pitanuc\openhab2\conf'
Everything seem to be working well (REST, etc) EXCEPT for LSP. I know there are errors in one of my rules file. However, the error is never highlighted (like it use to be). If I look at the 'problems' tab, I can see the error is listed (The method or field xxxx is undefined). However - if I double click on the error, rather than taking me to the line - I get a message "Unable to open 'xxx.rules': file not found (file:///c:/openhab2/conf/rules/xxx.rules)"
So something along the way (LSP I'm assuming) is getting the local path on 'pitanuc' ("c:\openhab2\conf\rules\xxx.rules") and is using that path directly rather than looking for the same file on my editor path ("\\pitanuc\openhav2\conf\rules\xxx.rules").
I know I'm not really suppose to be using VScode on a different box - but it's very convenient to do it that way (I have a development box and a production box) and up until 2.4/.40 combo - it worked great.
Hoping you might have a solution for me...
Thanks, Tim
AFAIK there have been some changes regarding UNC pathes in the mean time. But with 2.4 M6 (and probably also M7) UNC pathes don't work on Windows (see https://github.com/eclipse/smarthome/issues/6611). You can try to assign a drive letter to your UNC path and it will probably work.
I have the same problem and I cannot resolve it by using drive letters:
Example from "Problems"-pane:
When trying to open the file via double-clicking the problem statement:
The file which should have been opened (after opening it from the folder tree):
I have the same error Running OpenHAB 2.5 Release. Is there any workaround available?
I think https://github.com/openhab/openhab-vscode/issues/184 is somehow related.
Same error here, Running OpenHAB 2.5.1-2 Release on Pi, while Visual Studio Code 1.42.0 is running on Mac osx. Is there any solution available?
No sorry. I am happy for any input here.