Realtime visualisation uncaught typeerror when data stops?

Afternoon,

I have just noticed that on my dashboards, I have a slightly annoying issue with realtime visualisations when my devices have stopped sending data. The realtime graphs all throw ‘Uncaught typeerror: Cannot read property ‘0’ of undefined’ in succession. When the devices are sending data - everything works okay. But I have some cases where they won’t be on all the time, and this breaks the usability of the dashboard.

Is this known behaviour, or have I done something wrong?

Hi Nick, welcome.

Can you post an image please?

Can you click on the button Copy as Markdown next to Server Information on the Admin page and paste into a reply here please (no further formatting required).

Hi Brian,

Thank you :slight_smile: and certainly - here it is:

emoncms realtime error

Server Information

Server Information

Services

  • redis-server :- Active Running

Emoncms

Server

  • OS :- Linux 4.15.0-74-generic
  • Host :- emoncms | emoncms | (172.16.140.115)
  • Date :- 2020-02-24 19:31:35 UTC
  • Uptime :- 19:31:35 up 41 days, 7:16, 1 user, load average: 0.00, 0.00, 0.00

Memory

  • RAM :- Used: 14.16%
    • Total :- 3.85 GB
    • Used :- 558.56 MB
    • Free :- 3.31 GB
  • Swap :- Used: 0.00%
    • Total :- 3.85 GB
    • Used :- 0 B
    • Free :- 3.85 GB
      Write Load Period

Disk

  • / :- Used: 8.98%
    • Total :- 78.24 GB
    • Used :- 7.03 GB
    • Free :- 67.2 GB
    • Write Load :- n/a

HTTP

  • Server :- Apache/2.4.29 (Ubuntu) HTTP/1.1 CGI/1.1 80

MySQL

  • Version :- 5.7.28-0ubuntu0.18.04.4
  • Host :- localhost:6379 (127.0.0.1)
  • Date :- 2020-02-24 19:31:34 (UTC 00:00‌​)
  • Stats :- Uptime: 3568564 Threads: 1 Questions: 881846 Slow queries: 0 Opens: 246 Flush tables: 1 Open tables: 239 Queries per second avg: 0.247

Redis

  • Version :-
    • Redis Server :- 4.0.9
    • PHP Redis :- 5.1.1
  • Host :- localhost:6379
  • Size :- 142 keys (845.47K)
  • Uptime :- 41 days

PHP

  • Version :- 7.2.24-0ubuntu0.18.04.1 (Zend Version 3.2.0)
  • Modules :- apache2handler | calendar v7.2.24-0ubuntu0.18.04.1 | Core v7.2.24-0ubuntu0.18.04.1 | ctype v7.2.24-0ubuntu0.18.04.1 | curl v7.2.24-0ubuntu0.18.04.1 | date v7.2.24-0ubuntu0.18.04.1 | dom v20031129 | exif v7.2.24-0ubuntu0.18.04.1 | fileinfo v1.0.5 | filter v7.2.24-0ubuntu0.18.04.1 | ftp v7.2.24-0ubuntu0.18.04.1 | gettext v7.2.24-0ubuntu0.18.04.1 | hash v1.0 | iconv v7.2.24-0ubuntu0.18.04.1 | json v1.6.0 | libxml v7.2.24-0ubuntu0.18.04.1 | mbstring v7.2.24-0ubuntu0.18.04.1 | mysqli v7.2.24-0ubuntu0.18.04.1 | mysqlnd vmysqlnd 5.0.12-dev - 20150407 - $Id: 3591daad22de08524295e1bd073aceeff11e6579 $ | openssl v7.2.24-0ubuntu0.18.04.1 | pcre v7.2.24-0ubuntu0.18.04.1 | PDO v7.2.24-0ubuntu0.18.04.1 | pdo_mysql v7.2.24-0ubuntu0.18.04.1 | Phar v2.0.2 | posix v7.2.24-0ubuntu0.18.04.1 | readline v7.2.24-0ubuntu0.18.04.1 | redis v5.1.1 | Reflection v7.2.24-0ubuntu0.18.04.1 | session v7.2.24-0ubuntu0.18.04.1 | shmop v7.2.24-0ubuntu0.18.04.1 | SimpleXML v7.2.24-0ubuntu0.18.04.1 | sockets v7.2.24-0ubuntu0.18.04.1 | sodium v7.2.24-0ubuntu0.18.04.1 | SPL v7.2.24-0ubuntu0.18.04.1 | standard v7.2.24-0ubuntu0.18.04.1 | sysvmsg v7.2.24-0ubuntu0.18.04.1 | sysvsem v7.2.24-0ubuntu0.18.04.1 | sysvshm v7.2.24-0ubuntu0.18.04.1 | tokenizer v7.2.24-0ubuntu0.18.04.1 | wddx v7.2.24-0ubuntu0.18.04.1 | xml v7.2.24-0ubuntu0.18.04.1 | xmlreader v7.2.24-0ubuntu0.18.04.1 | xmlwriter v7.2.24-0ubuntu0.18.04.1 | xsl v7.2.24-0ubuntu0.18.04.1 | Zend OPcache v7.2.24-0ubuntu0.18.04.1 | zlib v7.2.24-0ubuntu0.18.04.1
Client Information

Client Information

HTTP

  • Browser :- Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36
  • Language :- en-GB,en-US;q=0.9,en;q=0.8

Window

  • Size :- 1903 x 916

Screen

  • Resolution :- 1920 x 1080

@emrys - could you have a look?

Hello @nickthesloth I’ve created an issue to track this bug here: vis/realtime Uncaught typeerror: Cannot read property ‘0’ of undefined’ in succession · Issue #1520 · emoncms/emoncms · GitHub I wonder if it would be worth trying a multigraph with ‘floating time’ option enabled in the mean time to achieve what you are after?

Hi @nickthesloth,
We’ve corrected the issue and merged it into the the EmonCMS “master” branch we use for testing.

The master branch will be merged into the “stable” branch at the next release. Once this happens your EmonCMS install can be updated via EmonCMS->Admin->Update.

Thanks for your help in finding this bug.

Emrys

1 Like

Hi all,

That was quick :slight_smile: I will keep a look out for the new release!

Re. the multigraph and floating time - I do use that too, though what drew me to the ‘realtime’ graphing was the short time period of its nature.

While I’m here - could I ask, is there a simple way to set the multigraphs to display perhaps the last x hours in time on loading the dashboard? The smallest period of time I seem to be able to easily pick is the D/W/M etc controls. Not the end of the world if not!

Thanks,

Nick

Hello Nick, yes, if you select the range you wish to see e.g last few hours and select that period up to the present moment, then enable floating time, it should work and keep updating for the period of time selected.

I am using Emoncms - user login and I get this error.

I do not see any way to do a EmonCMS->Admin->Update from that website. Is there a hidden menu somewhere?

error

Powered by [OpenEnergyMonitor.org] | [10.1.13]