Error displaying widgets (last 3-4 days?)

Hi

I am having a large number of widgets on my emoncms.org dashboards not display. No changes to the dashboard have been made. tested in Chrome and MS Edge… same issue. Data is coming through fine to Inputs and Feeds.

https://emoncms.org/dashboard/view/arall

F12 in Chrome gives me hundreds of these errors:

Uncaught TypeError: Cannot read property ‘value’ of undefined
at HTMLDivElement. (dial_render.js:544)
at Function.each (jquery-1.11.3.min.js:2)
at m.fn.init.each (jquery-1.11.3.min.js:2)
at dial_draw (dial_render.js:533)
at dial_fastupdate (dial_render.js:580)
at fast_update (render.js?ver=1:122)
at render.js?ver=1:71

Thanks
Mark

Hello Mark, thanks for the heads up I can see the issue and am looking into it

Trystan

Thanks very much!! Appreciate the fast reply!

Hello @Mark_Maritz this issue is now fixed, the cause was due to an incorrect min value feed setting, the software now catches the case where the feed does not exist but you may find your dashboard runs a bit quicker if you go through your dashboard and check that the dial settings are correct. There should be one referencing a feed that does not exist in the min value feed setting.

Thanks so much!!

hi @TrystanLea Thanks for this - just thought I’d let you know that it doesn’t appear to be fixed.

I’m not sure what you mean by “there should be one referencing a feed that does not exist in the min value feed setting”… does this mean we have to create a blank feed for min value? I upgraded from the January 5th version of emoncms and we’re now getting stuck in an infinite loop when we try to display a dashboard with read apikey… see this link - f12 in chrome shows “Review config for feedid of dial” with a constantly climbing value next to it and no dials are shown - works ok if I’m logged in but not using apikey.

Hello @Buck_R, looking through the code for the dial again I think I’ve found a better way of implementing the case when the min or max value feed is invalid, I’ve uploaded the improved code to the dashboard module. There is also a small bug fix relating to a similar dashboard issue in the main emoncms repository, bringing the latest version now to v9.8.16 see here.

Thanks brother that fixed it… M

Hello @TrystanLea, i am getting this error again since update to 9.8.28.

Happens on dial and feedvalue widgets.Also they work when i am logged in, not when logged out.
The min/max feeds selected all exist, though i’m not using min/max.

emoncms and dashboard modules are up to date

No one else having this problem lately?

This is frustrating really.

It seems i have this only on my 2 oldest users. The more recent users do not have this.

When i create a new dashboard with only one “feedtime” widget, nothing is displayed. Only when i log in i get something.
On the more recent users i can add whatever i like, everything works.

The error in console is “Review config for feed id of feedvalue (or dial or feedtime or whatever…)”

Hello @bart.ellast, Is there any chance that the feeds are private for the old user and public for the new user? Hence the feedvalue not showing anything when the feed is private and your logged out?

No, that is not the case. Would be too easy :slight_smile: I checked that.
My widgets started doing this with no changes made to the feeds.
The graphs using the same feeds on the same dashboards are fine by the way.

My emoncms is up to date with master.

Are you using the feedid or tag:name feed selection mode in the dashboard configuration window?

All my dashboards still use feedid. Old and new.
Should I try switching them to tag:name?

feedid is fine and is required for public feeds/dashboards. Is the issue specifically with the feedtime widget or does it affect all widgets that you create?

No, I noticed the problem when all the dials on the dashboard disappeared. Feedvalue also. I think the problem is with all widget types.
I only use feed time to test new added widgets.

Had some time to look into this again…
I see the following error in apache’s error.log when refreshing a dashboard page with malfunctioning widgets:

[Thu Jul 26 20:13:12.152120 2018] [:error] [pid 22048] [client 192.168.5.1:56054] PHP Fatal error:  Uncaught exception 'Exception' with message 'DateTimeZone::__construct(): Unknown or bad timezone ()' in /var/www/html/emoncms/Modules/process/process_processlist.php:952\nStack trace:\n#0 /var/www/html/emoncms/Modules/process/process_processlist.php(952): DateTimeZone->__construct('')\n#1 /var/www/html/emoncms/Modules/process/process_processlist.php(474): Process_ProcessList->getstartday(1532628792)\n#2 [internal function]: Process_ProcessList->whinc_to_kwhd('43', 1532628792, 8986740, Array, Object(Process))\n#3 /var/www/html/emoncms/Modules/process/process_model.php(62): call_user_func_array(Array, Array)\n#4 /var/www/html/emoncms/Modules/process/process_model.php(108): Process->__call('whinc_to_kwhd', Array)\n#5 /var/www/html/emoncms/Modules/process/process_model.php(108): Process->whinc_to_kwhd('43', 1532628792, 8986740, Array)\n#6 /var/www/html/emoncms/Modules/feed/engine/VirtualFeed.php(87): Process->input(1532628792, NULL, '53:22,8:43', Array)\n#7 /var/www/html/emoncms/Modules/feed/feed_model.php(480): VirtualF in /var/www/html/emoncms/Modules/process/process_processlist.php on line 952, referer: http://etherm.ddns.net:32500/mario

The unknown or bad timezone suggests the timezone isn’t set correctly, but i just triple checked and it is set correctly!

That might suggest what it and what you consider “correct” may differ.

What is it set to?

Have you tried re-selecting a timezone from the dropdown (regardless of what’s set now)?

If that doesn’t work maybe even select another timezone temporarily and then reselect the desired timezone to “refresh” the setting just to be absolutely sure it is selected correctly.

Be sure to clear the browser cache or use CTRL-F5 when testing afterwards.

It’s now set to Europe/Brussels from the drop-down.
I already tried setting it back to UTC default. But no change.

I tried clearing cache, ctrl-f5, and new browser.