Cacti / cacti

Cacti ™
http://www.cacti.net
GNU General Public License v2.0
1.63k stars 404 forks source link

Retrieving Device Information appears to fail on Safari #2312

Closed ibatten closed 5 years ago

ibatten commented 5 years ago

Adding or editing a device in Safari (12.0.3 on MacOS 10.14.3 Beta, but this has been true for some months), Cacti 1.1.37, spins on "Contacting Device".

Error displayed in console seems to be "Error: Syntax error, unrecognized expression: #snmp_auth_protocol option[value="[None]"", but that may be unrelated.

Works correctly on Chrome 72.0.3626.53.

cigamit commented 5 years ago

That's been resolved already. Likely you can grab the layout.js from the 1.1.38 release. Don't pull it from 1.2 or develop though.

ibatten commented 5 years ago

Thanks for the reply.

Looks like the version of layout.js on 1.1.38 is the same as 1.1.37:

igb@offsite9:~$ wget -q https://raw.githubusercontent.com/Cacti/cacti/release/1.1.38/include/layout.js igb@offsite9:~$ cmp layout.js /usr/share/cacti/cacti-1.1.37/include/layout.js igb@offsite9:~$

But I upgraded my whole installation to 1.1.38 and that fixed it. Thanks again.

ian

On 16 Jan 2019, at 01:11, Jimmy Conner notifications@github.com wrote:

That's been resolved already. Likely you can grab the layout.js from the 1.1.38 release. Don't pull it from 1.2 or develop though.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Cacti/cacti/issues/2312#issuecomment-454612883, or mute the thread https://github.com/notifications/unsubscribe-auth/AHkQgdxuUHrX73tvOD5Z1aIkXhMhoiX0ks5vDnxBgaJpZM4aBcas.

ibatten commented 5 years ago

Correction, it doesn’t fix it.

Sorry, I had Chrome on that screen and didn’t notice it wasn’t Safari.

1.1.38 has the same problem.

Safari:

Chrome:

On 16 Jan 2019, at 14:55, Ian Batten igb@batten.eu.org wrote:

Thanks for the reply.

Looks like the version of layout.js on 1.1.38 is the same as 1.1.37:

igb@offsite9:~$ wget -q https://raw.githubusercontent.com/Cacti/cacti/release/1.1.38/include/layout.js https://raw.githubusercontent.com/Cacti/cacti/release/1.1.38/include/layout.js igb@offsite9:~$ cmp layout.js /usr/share/cacti/cacti-1.1.37/include/layout.js igb@offsite9:~$

But I upgraded my whole installation to 1.1.38 and that fixed it. Thanks again.

ian

On 16 Jan 2019, at 01:11, Jimmy Conner <notifications@github.com mailto:notifications@github.com> wrote:

That's been resolved already. Likely you can grab the layout.js from the 1.1.38 release. Don't pull it from 1.2 or develop though.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Cacti/cacti/issues/2312#issuecomment-454612883, or mute the thread https://github.com/notifications/unsubscribe-auth/AHkQgdxuUHrX73tvOD5Z1aIkXhMhoiX0ks5vDnxBgaJpZM4aBcas.

cigamit commented 5 years ago

This has to be a bug in safari. I have reviewed all instances of that string, and they are syntactically correct. We've seen this issue in the past where the various browsers have problems with some special characters like the '[]' characters inside of a string. That is my guess in this case. The JavaScript interpreter is jacked.

Can you search out on the Safari 'public' site for bugs along this line?

Also, please provide the line number in layout.js that is erroring.

netniV commented 5 years ago

On Safari Version 12.0.2 (13606.3.4.1.4), this functionality is working perfectly fine. This is more likely a device issue than a browser issue.

ibatten commented 5 years ago

I see the same symptoms on safari on iOS, interestingly.

ian -- https://igb.batten.eu.org/

On 18 Jan 2019, at 07:07, Mark Brugnoli-Vinten notifications@github.com wrote:

On Safari Version 12.0.2 (13606.3.4.1.4), this functionality is working perfectly fine. This is more likely a device issue than a browser issue.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

netniV commented 5 years ago

I have tested this on iOS under Chrome and Safari - both worked fine. So, this is either a device or server issue. I assume that your server isn't mangling the mime-type of the javascript files?

What OS/Web server versions are you running?

ibatten commented 5 years ago

On 18 Jan 2019, at 09:17, Mark Brugnoli-Vinten notifications@github.com wrote:

I have tested this on iOS under Chrome and Safari - both worked fine. So, this is either a device or server issue. I assume that your server isn't mangling the mime-type of the javascript files?

I don’t think so: so far as I can see this is the only difference between Safari and Chrome, and the only thing that is obviously broken.

The problem arises on all devices that cacti is monitoring, which cover a wide range of systems.

What OS/Web server versions are you running?

Debian 9.6, all packages up to date, plus a self-compiled nginx 1.15.6. But Safari has had this problem for me for a very long time, on older releases of cacti, nginx and the underlying OS.

ian

netniV commented 5 years ago

Hmm looking over your initial post again, I noticed that you are getting an error with snmp auth fields. What settings are your devices using? Aside from community and passwords.

ibatten commented 5 years ago

Sorry for the delay in replying: I am travelling.

The machines all use SNMPv3 in AuthPriv mode, mostly with SHA/AES although a couple are using SHA/DES because I am too lazy to upgrade their agents to support AES. It’s all over IPv6.

ian

https://igb.batten.eu.org

On 18 Jan 2019, at 20:02, Mark Brugnoli-Vinten notifications@github.com wrote:

Hmm looking over your initial post again, I noticed that you are getting an error with snmp auth fields. What settings are your devices using? Aside from community and passwords.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

cigamit commented 5 years ago

This should be resolved in the develop branch now.

ibatten commented 5 years ago

For what it's worth, I've found the trigger and why it was hard to reproduce. With php-snmp disabled, saving a new or edited device spins in the Safari GUI when the mechanism is tcp: or tcp6: with SNMPv3, but works correctly with udp: or udp6: on SNMPv2. Which is weird beyond words.