-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
Error while connecting to openHAB REST API #57
Comments
Hey @paulianttila thanks for reporting! Try restarting your openhab instance and see if http://192.168.10.7:8080/rest/things loads in your browser. Maybe it's some issue in your Anyways, I'm keeping this issue open. I'll think of better error handling in that scenario. Cheers |
Hey... same problem for me! I noticed that in my settings.json the openhab.host setting gets always overwritten with "localhost". |
@kubawolanin, both items and things files can be fetched fine via browser and JSON is valid (tested with another tool). Also Paper UI works fine. OpenHAB log doesn't show anything suspicious. |
@paulianttila @fseffert could you be so kind and test if problem still occurs on your machines with the attached extension? openhab-0.3.0.vsix.zip Follow this post to see how to install the extension manually from VSIX. Cheers! |
@kubawolanin, just tested new version. Unfortunately, with the same result. Does extension do any kind of logging? If I press "OPENHAB ITEMS" or "OPENHAB THINGS" panels refresh icon, it downloads both items and things files nicely (seen from wireshark) but it gives the same error message. Items panel is refreshed and things panel stays empty. |
VS developer tools shows two errors
|
Hmm so the error message comes from this file which is a part of vscode's framework for tree views. @fseffert can you share more info on your environment? Is it a Mac as well? I've encountered some issues with the latest SNAPSHOT build so the problem could be partially related with it too. After downgrading my openHAB to distro # 1082 everything went back to normal (no weird log messages, problems with REST API endpoints loading etc). I will, however, work on the solution on my side and hopefully we'll find what's the real issue. In the meantime, here's the package with some more fixes on my side: |
Hello,
|
Hi, I have
and I don't know which build number that represents.
|
@dartrax looks like you're using the release build (2.1) and not the SNAPSHOT.
If that's the case, please try to add the following line to your settings:
Also, there might be a need to reload VSCode window each time you change your settings. Cheers |
Yes, I'm using the release build (2.1) |
@kubawolanin, I forgotten to inform you yesterday that I tested your latest extension without success. |
@paulianttila @fseffert @dartrax here's the updated extension, available also in #58. |
I tried the updated extension. No Error message anymore, but Sitemap preview, Things and Items Panel stay empty.
|
Updated the latest extension and behaviour is exactly same as @dartrax have. |
while trying to fix eclipse-archived/smarthome#4601 I just ran into the same issue after a couple of restarts. Maybe something got updated silently under the hood? In any case, all the openHAB windows are empty and it also doesn't even try to connect to the LSP backend anymore. Let me know if (and how) I can help with the analysis. |
This bugs me because I couldn't reproduce this bug even once. I've pushed some changes to #58 - I would really appreciate if you could test the extension again: Exact steps to reproduce would be also really helpful. |
For what it's worth: I'm running a similar environment as @paulianttila except for I'm on a Raspberry and distro #1094. I have not seen this error. I tried 0.3.0 #58 just out of curiosity. It does not change anything on my side. So I'm still getting those path / code checking / hover problems (NPEs in the logs etc.) but it does not make anything worse either. |
@kubawolanin, just tried the latest version (also reinstalled VSCode). Items works fine, but things panel stays empty. Console:
|
@paulianttila thank you! |
Ah, turns out that the Things comparator was taking only |
@kubawolanin, that's great. Do you have new version available? |
Sure thing! I'll prepare a new release in the next few days. In the meantime, here's the packaged VSIX: Thanks for your help! |
I can also verify that thing problem is now fixed. Thank you @kubawolanin. |
I tried the updated extension. The Error message ist back, Sitemap preview, Things and Items Panel stay empty.
"Please return an array of children." seems to be gone. |
Hello, |
@LiPoPower take a look at #67 - it might be related. |
Ups, sorry for that: did the customizations in vs user preferences. #Moved it to workspace preferences now it works like charm... |
This problem just crept up for me. I am running 0.3.5 of the plugin. It was working fine until some time recently. I'm not sure what thing/item I might have added that caused the problem. Is there an easy way to debug to help get to the bottom of it? |
I have exactly the same issue (openHAB 2.2, plugin 0.3.5, rest api works fine) - doesn't work with user and/or workspace preferences... Any update on this? |
I just erased my .items file (which was only copied from the example, no correct values in it) and restarted openhab - now it works... Looks like the plugin has some issues with error handling... |
VS code extension given an error "Error while connecting to openHAB REST API". File editing works fine (via samba share).
Versions:
settings.json
Wireshark:
192.168.10.22 = Visual Studio
192.168.10.7 = openHAB
The text was updated successfully, but these errors were encountered: