Multigraphs blank after update

,
I updated to 9.8.27 from 9.8.16 and now all my multigraphs are blank.
When I try to edit any existing multigraphs or create a new one, there are no feeds shown.

Any ideas gratefully received!

Matt

Hi @mdknightk,

I’ve made a fair number of changes int Multigraph, which you will have picked up with that update. I’ve been testing with a Windows 10 machine with Firefox, IE and Edge. Hence am wondering if this is a quirk because of a different browser/ OS.

I’ve taken the liberty of taking a look at your site and in particular honed in upon your “Diverter” dashboard:
http://heathbank.beerprojects.com/emoncms/mdknightk/Diverter

And can see the following:

I’ve also tried my Chromebook for comparison and it shows the same.

By the screenshot, I’m guessing that you are running Chromium on a Linux distro. Is this correct?

Have you tried accessing it with Firefox or another browser and OS? Did this make a difference?

Can you open up the browser console and see if it shows any particular errors/ warnings please? I believe Ctrl+Shift+J will open it.

Is it restricted to only the embedded graphs (e.g. your dashboard) or just when configuring them in multigraph?

Thanks,
Clive.

1 Like

Clive,
yes indeed - the screenshot is Chromium on Ubuntu.
It happens with graphs embedded into dashboards and when I try to configure multigraphs.

I had checked using Chrome on Android (you guessed it - on my 'phone!) and got the same result.
Based on that I discounted browser and/or OS quirks.
I shouldn’t have, because when I open it in Firefox on Ubuntu, all is well!

In Chromium’s browser console I get this error:

multigraph?embed=1&mid=1:68 Uncaught ReferenceError: multigraphInit is not defined
at Object.success (multigraph?embed=1&mid=1:68)
at j (jquery-1.11.3.min.js:2)
at Object.fireWith [as resolveWith] (jquery-1.11.3.min.js:2)
at x (jquery-1.11.3.min.js:5)
at XMLHttpRequest.b (jquery-1.11.3.min.js:5)
success @ multigraph?embed=1&mid=1:68
j @ jquery-1.11.3.min.js:2
fireWith @ jquery-1.11.3.min.js:2
x @ jquery-1.11.3.min.js:5
b @ jquery-1.11.3.min.js:5
XMLHttpRequest.send (async)
send @ jquery-1.11.3.min.js:5
ajax @ jquery-1.11.3.min.js:5
(anonymous) @ multigraph?embed=1&mid=1:63

I also have this warning, which may or may not be relevant. But for completeness:

jquery-1.11.3.min.js:5 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience. For more help, check https://xhr.spec.whatwg.org/.
send @ jquery-1.11.3.min.js:5
ajax @ jquery-1.11.3.min.js:5
update @ render.js:79
render_widgets_start @ render.js:50
(anonymous) @ Diverter:203

Thanks for the help, and good spot!
Matt

Hi Matt,

I’ve tried it on my Android phone, both Chrome and Firefox and it works for both.

One of the items I changed was the function name from “multigraph_init” to “multigraphInit”, which suggests that your problematic browsers are caching effectively old copies of these scripts.

However, to check the basics and ensure we’ve got the updated files (unlikely to be the problem as it’s picked up the function name change), please logon to your emoncms server and run (I assume you have a standard emonpi style install):

pi@emonpi(rw):~$ cd /var/www/emoncms/Modules/vis/visualisations
pi@emonpi(rw):visualisations$ cksum multigraph.php multigraph/multigraph.js
2891880849 3615 multigraph.php
2147837385 15232 multigraph/multigraph.js
pi@emonpi(rw):visualisations$
pi@emonpi(rw):visualisations$ grep -i multigraph.*init multigraph.php multigraph/multigraph.js
multigraph.php:            multigraphInit("#multigraph");
multigraph/multigraph.js:function multigraphInit(element) {
pi@emonpi(rw):visualisations$

And if all is well the checksums and the grep above will tally with yours.

Try opening an incognito tab in Chrome and this should ignore any cache and cookies you have. If this works, then it suggests your cache doesn’t think the server has a newer version, you could just clear your browser cache, but I’d also check the date and time for all the devices to ensure you don’t have something peculiar lurking.

I hope that fixes it for you.

I also get the “Synchronous XMLHttpRequest” and haven’t looked into it any further, but was thinking about asking Trystan and Glyn if it is worth considering updating a few of the underlying modules (jquery, flot …)

2 Likes

Clive,
not a standard pi install, but running on a headless Debian server, so similar enough.
All that checks out.
Sure enough, an incognito tab works, and clearing caches has done the trick.
All fixed; many thanks.

Matt

Just adding that I was having a similar problem on an iPhone, tried a “private” tab and it worked. So I went to settings - safari and “Clear History and Website Data” and now all seems ok.

Background
I replaced an old 8.3.6 emoncms hosted on a vps with a raspberry pi emonpi system and updated my dns records to point to the pi, so I guess the browser considered it to be the same server…

I just did the update 9.8.27 to 9.8.28 and the multigraphs were not showing again. I reset browser cache and now all good.

I don’t know much about this and it may not work on emoncms, but I was involved with another small project which had a similar issue and the web programmer implemented a cache-breaking system so that it tricked the browsers into reloading the full page with the updated support files.

1 Like

I had the same problem with Safari in macOS after updating to v9.8.28 with existing multigraphs showing up as blank. My existing Dashboards were hence only partially displayed.
For information, it was necessary to log out of Emoncms completely on the Safari browser; activate the “Show Develop Menu in the Menu bar” under the Advanced tab of the Safari Preferences menu; hit the “Empty Caches” item under the new Develop menu item; start up Emoncms again in a new tab.

All was back to normal after doing the cache reset. Perhaps a warning that a browser cache update is likely to be required near the Update button on the Administration page of Emoncms v9.8.28 is appropriate.
By the way, the multigraph changes are excellent & very welcome.

1 Like