eclipse-archived / smarthome

Eclipse SmartHome™ project
https://www.eclipse.org/smarthome/
Eclipse Public License 2.0
864 stars 782 forks source link

REST requests timing out #1104

Closed petrklus closed 6 years ago

petrklus commented 8 years ago

I've set up a very simple test setup running on Raspberry PI v2

Everything seemed to be running fine initially, however, I am starting AJAX requests time out when using the Basic UI: image

The hanging URL: http://192.168.2.87:8080/basicui/app?w=0000&sitemap=demo&__async=true

There do not seem to be any errors that would coincide time-wise with the request but here is my log:

https://gist.github.com/petrklus/86a4c2e1215b37855d11

Only ERROR thing I can see happens right after startup:

 21:44:01.496 [ERROR] [org.eclipse.smarthome.core.transform] - [org.eclipse.smarthome.action.transformation.action(79)] Circular reference detected, getService returning null

After that, I get a few WARNs:

21:46:16.415 [WARN ] [ternal.render.AbstractWidgetRenderer] - Cannot escape path '2016-02-28T21:45:34.384+0000' in URL. Returning unmodified path.

But those seem unrelated to the issue to me (and were reported before under https://github.com/eclipse/smarthome/issues/640).

kaikreuzer commented 8 years ago

Is this only with the Basic UI or also with the Classic UI?

petrklus commented 8 years ago

Also, one more note - while waiting for the request to finish in the BasicUI window, I cannot seem to be able to use any other views (HABmin, Paper UI, etc.).

As soon as I close the tab with the Basic UI, the rest starts working again.

petrklus commented 8 years ago

let me check @kaikreuzer !

kaikreuzer commented 8 years ago

I cannot seem to be able to use any other views

Hm, this sounds a bit like https://community.openhab.org/t/paper-ui-basci-ui-cross-lock-each-other/8023

petrklus commented 8 years ago

The Classic UI did load but some of the pages did not click-through properly.

And you are right - the remedy seems to be to not have multiple tabs open. As soon as I close the Paper UI, the Basic UI started working again.

Running on Mac, latest version of Chrome. Had 3 tabs open when the problem happened (classic UI, paper and basic). To maintain reliable operation, only a single tab needs to be open.

xsnrg commented 8 years ago

I can repeat the issue. I have a sitemap that has a date in it: Text item=LastUpdate

Every time I click to go into that the frame that contains the date, the UI hangs, and this error is printed into the log:

20:56:18.330 [WARN ] [ternal.render.AbstractWidgetRenderer] - Cannot escape path '2016-04-07T20:55:19.471-0500' in URL. Returning unmodified path.

The URL in the browser changes, but what is displayed on the page does not change at all. At this point if I hit F5, the page refreshes the the proper frame and all the data, including the date is displayed as expected. This happens whether I have another tab open or not. This is with Firefox.

If I use Chrome, the URL in the browser does not change, so hitting F5 leaves you on the same page.

Both browsers show the graphical thin animated bar at the top after clicking on the frame link in the sitemap.

Here is one of the date items that is causing the warning:

DateTime LastUpdate "Last update [%1$td.%1$tm.%1$tY %1$tH:%1$tM]" {weather="locationId=home, type=condition, property=lastUpdate"}

and another:

DateTime Enphase_last_report_at "Solar Last Report at [%1$tD %tr]" (ALL,Solar) { enphaseenergy="732830#last_report_at"}

It does seem to be any format of DateTime that is causing it in my case. I do experience #640 as well, of course, but it doesn't feel related to me as this only occurs on date fields. I have formatting other than date that is lost without this issue happening.

triller-telekom commented 7 years ago

@petrklus @xsnrg This bug is quite old and there have been a lot of changes to the REST API meanwhile. I cannot reproduce the bug, I can have paperui and basicui open in 2 tabs in the same browser and nothings hangs. Can you still reproduce the bug? If not, please feel free to close this issue. Thanks.

triller-telekom commented 6 years ago

@sjka @kaikreuzer Please close this bug since it is outdated and not reproducible with the current state of the code.