openhab-vscode icon indicating copy to clipboard operation
openhab-vscode copied to clipboard

LSP/Incorrect path (UNC)

Open tmrobert8 opened this issue 6 years ago • 6 comments

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

tmrobert8 avatar Oct 24 '18 15:10 tmrobert8

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.

MHerbst avatar Dec 02 '18 17:12 MHerbst

I have the same problem and I cannot resolve it by using drive letters:

Example from "Problems"-pane: image

When trying to open the file via double-clicking the problem statement: image

The file which should have been opened (after opening it from the folder tree): image

cherub-i avatar Dec 27 '19 20:12 cherub-i

I have the same error Running OpenHAB 2.5 Release. Is there any workaround available?

Beluk avatar Dec 31 '19 09:12 Beluk

I think https://github.com/openhab/openhab-vscode/issues/184 is somehow related.

lsiepel avatar Jan 01 '20 18:01 lsiepel

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? openhab

Pabl0z avatar Feb 11 '20 12:02 Pabl0z

No sorry. I am happy for any input here.

Confectrician avatar Mar 17 '20 19:03 Confectrician