VScode and OH2.4 M6

Hello All,

I have just upgraded to OH2 M6, since then the VScode is unable to work with OH. It just shows internal error message at start at that is it!!.

Windows 10 System
OH2.4.0 M6
VSCode 1.2.4
Extension 0.4.0

Interestingly, I was going to comment on how much faster VSC and the OH extension were in M6

1 Like

Do uhave the same version and same extension versions?

I tried everything, reinstall VCS, change ports configurations…
Nothing works

I am running same OH version but 1.28.2 of VSC

Just updated VSC to 1.29.1 and it works as well.

Are you running an openhabian installation?

No, windows installation :frowning:

what is the exact error?
is it coming from VSC or OH2?

I have VSC 1.29.1 with openHAB VS Code Extension v0.4.0 and it works very good with OH2.4.0.M6

Sorry for the late reply, i was out of town for the weekend :slight_smile:

Actually the error is happening on VSC itself, (1.29. 1), once i start it it it shows the below image:

It doesn’t show any other details.

I tried several versions, but nothing works. I rolled-back to 2.3 stable version, and it worked perfectly.
But never with 2.4 M6

The only configs i have is:

everything is default.

I have the same error on M6 and I’m using openHab on RPi (openHabian with the included samba share if that matters). However this error shows up after starting VSC, but I can use it without problems…

can you post some additional log entries from VSC? (maybe under View->Debug or View->Problems)

I don’t know what could be the root cause.
anyway, it wouldn’t hurt to specify all parameters in your json:

    "openhab.username": "",
    "openhab.password": "",
    "openhab.port": 8080,
    "openhab.lspPort": 5007,
    "openhab.host": "localhost",
    "openhab.useRestApi": true,
    "openhab.lspEnabled": true,
    "openhab.restCompletions": true,
    "openhab.paperInBrowser": true

That is the weird part :). it is totally empty, no problems, no debug nothing!!! just the notification that there is internal error and that is all.

I did add all the config as per you recommendation, but same error appears :frowning:

it seems that there are issues with VSC and Java LSP addons. The VSC code extension hasn’t been updated in a while, so maybe there is something wrong when it tries to connect to 2.4.0.M6 LSP… not sure

I don’t have this problem on my Win machine connecting to a remote Linux box. I will try to reproduce this with a local OH2.4.M6 installation on Win.

I found something similar (not the same) here: https://github.com/georgewfraser/java-language-server/issues/45

btw: do you have the %JAVA_HOME% env variable correctly set?

It looks like maybe related, i have just upgraded java as well to 8.0.191 version with the same time frame of updating to M6.

But java home is set correctly.

1 Like

I cannot reproduce this :frowning:
I just installed OH2.4.0.M6 on my Win machine and I can work fine with VSC+M6…
check on how to debug this kind of error code in VSC

It looks like the extension itself is not starting properly as there are no logs watsoever, and there are not communications captured on wireshark as well.

Maybe @kubawolanin can shed some lights on this if he has time.

I removed VS code totally, deleted all related files and extensions folder.

Started a fresh installation.

The error didn’t appear at all except after i choosed the folder where the conf files are for OH2!!

What can cause this problem!

interesting… maybe some of your config files have problems (but this shouldn’t cause the VSC extension to explode…)

I would try to remove all the config files out of the conf/ subfolders, move one by one back to see which one causes the explosion :slight_smile:

You can keep your OH2 service down during this test.

Keep a backup of your configs by the way!

Ok, it is really weird and i don’t know what to do now…
i wiped all the conf files i have… started the system with no configs.
Started VS code, choosed the folder… Everything is ok.

Went to rules folder (in VS code), created a new file named it “test.rules” and BAAAM… internal error again!!