Skip to content
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

Pie charts on System Info in dashboard not loading properly on refresh #857

Closed
Abasz opened this issue Oct 13, 2017 · 36 comments
Closed

Pie charts on System Info in dashboard not loading properly on refresh #857

Abasz opened this issue Oct 13, 2017 · 36 comments

Comments

@Abasz
Copy link

Abasz commented Oct 13, 2017

Hi,

I noticed that after refresh of the dashboard with the system info refresh button sometimes the pie charts do not reload properly. Also I constantly have a JS error in consol (i do not know whether these are related issues or not).

Note that upon full page refresh pie charts load properly (JS error remains though)

Please find below the print screen:

image

I have latest theme commit (201710122135)
webmin 1.860
ubuntu server 16.04
using apache2 proxypass

Kind regards,

@iliajie
Copy link
Collaborator

iliajie commented Oct 13, 2017

Check latest commit.

Thanks for reporting.

@iliajie iliajie closed this as completed Oct 13, 2017
@Abasz
Copy link
Author

Abasz commented Oct 13, 2017

Actually it turns out the error was not related to the reload of the Pie Charts. The error is gone but pie charts do not load every time.

I was trying to find the pattern with testing but it is not entirely clear whats happening:
most of the time on the first click the pie chart do not load. however, clicking again loads the charts most of the time. If charts are not loaded properly on the second click the whole dashboard is broken (e.g. Authentic Theme 19.00-git-201710122135 and Time on system Friday, fields are not clickable).

Also, I just noticed that the system info loading message is not positioned properly when the browser is resized (this would be an issue on mobile probably)

image

@iliajie
Copy link
Collaborator

iliajie commented Oct 13, 2017

What is your browser? Please try incognito mode. Some extensions can break JS scripts.

@Abasz
Copy link
Author

Abasz commented Oct 14, 2017

I use the latest Chrome. The only extention I have installed is adblocker.

Tryed incognito mode, the problem presisted

@iliajie
Copy link
Collaborator

iliajie commented Oct 14, 2017

What is relative URL (excluding your host) you got at the moment on that page?

Could you provide higher resolution screenshot? I can't read it.

@Abasz
Copy link
Author

Abasz commented Oct 15, 2017

realtive URL is /?xnavigation=1 (I think the sysinfo.cgi part is missing

Picutre (trust this will be better):
image

@iliajie
Copy link
Collaborator

iliajie commented Oct 15, 2017

Can you update to the latest Git version? Then navigate to any other page and the issue should be solved.

@Abasz
Copy link
Author

Abasz commented Oct 15, 2017

Unfortunately the issue presist. But now there is clearly a pattern:

if the URL includes sysinfo.cgi than after the next refresh it will dispear.

if the URL does not include sysinfo.cgi, then upon refresh it will appear.

also I noticed that sysinfo.cgi is not included in the URL upon the initial load

@iliajie
Copy link
Collaborator

iliajie commented Oct 15, 2017

It doesn't work only on reload?

@Abasz
Copy link
Author

Abasz commented Oct 15, 2017

the problem is not just on reload.

this is how it is:

on the initial load, sysinfo.cgi is not loaded. Below is the picture at initial load (dashboard does not even load partially)

image

Then, if I click on dashboard (top left part), dashboard loads correctly. After this if I click on the system info reload (green button on the right), I get the system info is being collected message, but dashboard does not load properly (pie charts etc) and the URL does not include sysinfo.cgi

@iliajie
Copy link
Collaborator

iliajie commented Oct 15, 2017

Very unfortunately, I can't reproduce this issue.

Can you do the last thing.

Go to /tmp/ and delete all files starting with .tmp_webmin and .tmp_usermin.

Then reload the theme.

@Abasz
Copy link
Author

Abasz commented Oct 15, 2017

This is not a life and death issue :)

But I do have an additional observation: when the dashboard does not load properly I get data-redirect="/webmin/?xnavigation=1". And when the dashboard loads correctly data-redirect is empty.

I am accessing webmin via https://IP_address/webmin

@Abasz
Copy link
Author

Abasz commented Oct 15, 2017

This is very interesting: I just updated webmin and then force updated the theme to latest beta (even though I was on the latest beta) and the issue is gone. What is also interesting is that I had the same issue as #859 but that one is gone as well. Could have been related?

I will check this upon updates and see if this is really gone ;)

@iliajie
Copy link
Collaborator

iliajie commented Oct 15, 2017

I update repo many times a day. I release patched versions once every 2 or 3 days.

When I say force update I really mean it. You don't have to wait until you see notification.

Issue #859 has been fixed like 20 minutes ago. 😉

I just tried accessing Webmin using IP. All seems fine for me.

@iliajie
Copy link
Collaborator

iliajie commented Oct 15, 2017

I think it happens on right clicking on the top-left switch.

I will try to figure this out.

@iliajie
Copy link
Collaborator

iliajie commented Oct 15, 2017

There is a bug. Thank you very much for reporting and being patient.

@iliajie
Copy link
Collaborator

iliajie commented Oct 15, 2017

It will be coming to 19.01 release.

@Abasz
Copy link
Author

Abasz commented Oct 18, 2017

Hi, I am not sure, but i think this issue still exists in 19.01.

I have done some testing and the issue seems to be the same i.e. one load data-redirect is empty (everything loads correctly) refresh system info again data-redirect="/webmin/?xnavigation=1" and page not loading properly

@iliajie
Copy link
Collaborator

iliajie commented Oct 19, 2017

I'm not sure what you mean. I don't know how to reproduce your problem.

For example, I go to Webmin Configuration/Edit Categories hit save and data-redirect="/webmin/index.cgi?refresh=1&xnavigation=1" works as expected.

I just found a bug when refresh=1 in the URL should reload the left menu.

Try force updating the theme and hard reloading browser's cache.

@Abasz
Copy link
Author

Abasz commented Oct 19, 2017

I investigated the error and I think I was able to find an error message:

I think it relates to the easyPieChart update function

Uncaught TypeError: Cannot read property 'update' of undefined
at Number. (bundle.min.js?19010:167)
at Function.each (bundle.min.js?19010:2)
at Object.success (bundle.min.js?19010:167)
at l (bundle.min.js?19010:2)
at Object.fireWith [as resolveWith] (bundle.min.js?19010:2)
at r (bundle.min.js?19010:2)
at XMLHttpRequest. (bundle.min.js?19010:2)

[...].data("easyPieChart").update(i)}"cpu_percent"!=e&&"mem_percent[...] is the part that receives the error

I am sorry that I was not able to send you this earlier

@iliajie
Copy link
Collaborator

iliajie commented Oct 19, 2017

How do I reproduce this error?

@Abasz
Copy link
Author

Abasz commented Oct 19, 2017

When I click on the system info reload icon, on every second reload the PieCharts do not load. If I wait a few minutes (without refreshing) the console error is displayed. But the main issue is that PieCharts do not load (and ). So if you are able to reproduce that issue I think you would have the problem. If not, I have been testing and checking the code that may be of relevance .

Also, I think I might have found the solution (but since I do not understand the whole code this might be bad): Do you know what is the purpose of the code starting read_file and if (!keep)? Since it seems that if I delete it the refresh works.

sub get_tmp_var
{
    my ($key, $keep) = @_;
    my $tmp = 'tmp';
    my $tmp_file = '/' . $tmp . '/.' . ($tmp . '_' . get_product_name()) . '_' . $key . '_' . $remote_user;

   # read_file($tmp_file, \%tmp_var);
   # if (!$keep) {
   #    unlink_file($tmp_file);
   # }

    return $tmp_var{$key};
}

@iliajie
Copy link
Collaborator

iliajie commented Oct 19, 2017

I tried to reproduce your problem but I can't. Do you use proxy?
It just works for me - video-screencast.

What is the output of ll /tmp/.tmp_webmin*? Try to delete all temporary files by running rm -f /tmp/.tmp*, however I don't think it's gonna help.

The piece of my code that you commented out shouldn't be causing an issue as I don't see how it's related here. It only removes temporary file create by set_tmp_var sub.

@Abasz
Copy link
Author

Abasz commented Oct 19, 2017

I am behind a proxy accessing webmin via https://IP_address/webmin/

https://drive.google.com/open?id=0B-yPy8SuM09aNmNLQUlFRUNmZE0

I narrowed the issue down and to this line:

read_file($tmp_file, %tmp_var);

if I comment this out refresh works. :)

also actually not all tmp files are deleted since the .tmp_webmin_goto* is left over (although deleting it manually does not help with the refresh issue, (only commenting the read_file help)

@iliajie
Copy link
Collaborator

iliajie commented Oct 21, 2017

I could finally reproduce your issue on my: https://IP_address/webmin.

I'll work it out.

Thank a lot for your help.

@iliajie
Copy link
Collaborator

iliajie commented Oct 21, 2017

I see the cause of the issue.

I will fix as soon as possible.

@Abasz
Copy link
Author

Abasz commented Oct 21, 2017

So what is it? I am just curious :)

EDIT:
I mean the error what is causing it?

@iliajie
Copy link
Collaborator

iliajie commented Oct 21, 2017

It's practically empty (containing only webprefix) redirect in recollect.cgi scripts. It's not the bug in Webmin thought but the theme that didn't handle such cases correctly.

After recollect the URL changes to referer not containing sysinfo.cgi.

@Abasz
Copy link
Author

Abasz commented Oct 21, 2017

Thanks for the effort :) and not giving up on me

@iliajie
Copy link
Collaborator

iliajie commented Oct 21, 2017

This is unbelievable how simple things can get so complex in various configurations.

Give it a try please.

@Abasz
Copy link
Author

Abasz commented Oct 21, 2017

Hi, at a first glance this seems to be working nicely :)

I report back if I experience any errors. Thanks!

@germanllop
Copy link

Hello, I have the same issue, the Dashboard, stays in loading stage with the top red bar dancing, i've tried:

  • Fresh Install deb and repo
  • Force Update beta and stable theme
  • Clear cache
  • Deactivate chrome extensions

Current System: Debian 9
Webmin Version: 1.900

Everything else is working fine, I found that this url is called several times with response 200 but keeps getting on the network list:

https://ip_address:10000/stats.cgi?xhr-stats=general

@iliajie
Copy link
Collaborator

iliajie commented Dec 15, 2018

Hi,

Could you please provide the screenshot of how it doesn't work for you?

@germanllop
Copy link

germanllop commented Dec 15, 2018

Hi, thanks for the quick reply, ofcourse, here it is:

image

Here is another one with the network graph:

image

@iliajie
Copy link
Collaborator

iliajie commented Dec 15, 2018

Click on your user name (root) in navigation menu and make sure that System Status has enabled options to show in Available Modules subsection.

@iliajie
Copy link
Collaborator

iliajie commented Dec 23, 2018

@germanllop Did it work for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants