mbolli / nfsen-ng

Responsive NetFlow visualizer built on top of nfdump tools.
Apache License 2.0
231 stars 43 forks source link

"Process data" button eternally showing "Loading" after upgrading to nfsen-ng v0.3 #104

Closed urscale closed 5 months ago

urscale commented 6 months ago

First of all, thanks for this lovely piece of software, which has done a good job replacing nfsen for us!

Trying to upgrade to nfsen-ng v0.3, I've got everyhing working nicely, except for the "Process data" button in the "Flows" and "Statistics" tabs, which never stops showing "Loading".

Briefly looked at the JavaScript involved, but couldn't easily figure out what might be going on.

Running on Debian 12 / PHP 8.2 / nginx 1.22.1 with php8.2-fpm

Let me know if there's anything I can do to help debug the issue.

mbolli commented 5 months ago

@urscale

Thanks for the report.

Please open the browser dev tools and set a break point on line 343 (inside setButtonLoading()). Then reload the page. You should now see in the call stack why the button was set to loading.

Unfortunately in my installations I can't reproduce the issue.

href commented 5 months ago

Urs asked me to take a look and I found the following:

setButtonLoading (nfsen-ng.js:343)
(anonymous) (nfsen-ng.js:855)
each (jquery.min.js:2)
each (jquery.min.js:2)
display_message (nfsen-ng.js:854)
(anonymous) (nfsen-ng.js:90)
c (jquery.min.js:2)
fireWith (jquery.min.js:2)
l (jquery.min.js:2)
(anonymous) (jquery.min.js:2)
load (async)
send (jquery.min.js:2)
ajax (jquery.min.js:2)
S.<computed> (jquery.min.js:2)
(anonymous) (nfsen-ng.js:80)
e (jquery.min.js:2)
t (jquery.min.js:2)
setTimeout (async)
(anonymous) (jquery.min.js:2)
c (jquery.min.js:2)
fireWith (jquery.min.js:2)
fire (jquery.min.js:2)
c (jquery.min.js:2)
fireWith (jquery.min.js:2)
ready (jquery.min.js:2)
B (jquery.min.js:2)

The setButtonLoading function is called exactly once and never again. It seems like it is done when the following message is loaded after the refresh:

Arc-2024-03-13-5gQ76ieK

At least that's the message processed in display_message, before setButtonLoading is called.

mbolli commented 5 months ago

thanks @href and @urscale for the additional information!

urscale commented 5 months ago

Yay, thanks for the quick fix!