Would you call this a bug?

Started by dwasifar, January 02, 2021, 03:33:09 AM

Previous topic - Next topic
Setting up a new firewall using a saved configuration from the old one, I ran into a problem with GeoIP.  In spite of having a working MaxMind license (verified by manual download using the link), it kept popping up "In order to use GeoIP, you need to configure a source in the GeoIP settings tab."  I searched the forum for that error and saw conflicting advice, which I tried to follow.  I deleted and recreated my aliases and nothing changed; I created new MaxMind licenses with every available option and still got nowhere.  Every time I visited the Aliases page or the GeoIP tab, anything I'd do would give me the popup again.

Finally I changed my search terms in the forum and found one other person with this problem and someone advising him to just wait a while and the issue would clear itself.  So I did, and that seems to be the answer.

I'd consider this error message to be a bug.  It's misleading and erroneous; you get it even though the source is configured in the settings tab, so the message doesn't give the user a proper idea of what the actual problem is.  If it's not an actual configuration problem then it shouldn't be putting up an error message at all.

Opinions?  Should I report this as a bug in the development forum?

I would call it a 'feature' rather than a bug. Once you have created the maxmind link then it's over to the internal scheduler to call the routine to update the aliases, as this is only called every few hours that is where the delay can occur, In one of those messages in the forum I showed a method of forcing an update from the shell; perhaps we should have a 'stickies' section for tips and tricks.
OPNsense 25.7a - Qotom Q355G4 - ISP - Squirrel 1Gbps.

Team Rebellion Member

That's good information to know how the scheduler works, but then shouldn't the popup message say something like "Update has been scheduled" instead of complaining that the user has not filled out a field that is filled out?  The message makes it look like something is wrong when everything is normal.  I wasted an hour trying to fix a problem that didn't actually exist, because the popup said something was wrong.

:) I think this was pointed out way back when Maxmind first implemented the need for a token to be specified when requesting the data, for those of us around at the time it caused some confusion then too; guess that bit got forgotten along the way. You can always post it as a bug on Github, whether amongst all the other noise it will get fixed quickly is another question!



OPNsense 25.7a - Qotom Q355G4 - ISP - Squirrel 1Gbps.

Team Rebellion Member

Maybe it would help for Deciso to just add it to the MaxMind GeoIP setup doc.  Is there a way to suggest a change like that?

You can edit the document here https://github.com/opnsense/docs/blob/master/source/manual/how-tos/maxmind_geo_ip.rst and create a pull-request with the proposed changes, I believe Martin posted the initial document.

As for the message, it should vanish after apply settings for the first time if I'm not mistaken, unfortunately we can't see the difference between improperly configured and not run yet because it results in the same situation (the file not being there).

Best regards,

Ad

January 02, 2021, 09:50:59 PM #6 Last Edit: January 02, 2021, 09:53:14 PM by dwasifar
Quote from: AdSchellevis on January 02, 2021, 07:03:10 PM
As for the message, it should vanish after apply settings for the first time if I'm not mistaken, unfortunately we can't see the difference between improperly configured and not run yet because it results in the same situation (the file not being there).

That was not my experience.  Over the course of trying to figure out what the darn thing wanted me to do, Apply was clicked approximately eleventy gajillion times, and each time I got that same freakin' popup.

As I see it, there are three possible error states:

1) Source field is unpopulated.
2) Source field is populated incorrectly, resulting in no file.
3) Source field is populated correctly, but process has not run yet, resulting in no file.

Surely it's possible to check if the field is populated before putting up an error.  I would expect the current message "In order to use GeoIP, you need to configure a source in the GeoIP settings tab" to apply only to state 1.  If it's not possible to distinguish between states 2 and 3, then perhaps the error message for those should be something that covers both situations, for example: "No GeoIP file has been received.  Check to be sure the source you configured is correct, or wait [x time] to allow the next scheduled file download to occur."

yes, you can check the contents of the field, unfortunately it doesn't tell you anything about the validity of the data (in which case the error message probably is still fine, surely we could replace "a source" for "a valid source", but that wouldn't tell you more than it already did).

If you think there's a bug, describe how one can reproduce it step by step in a ticket (using our templates) https://github.com/opnsense/core/issues so people have the opportunity to verify your findings and come up with a fix if needed.

The apply button itself is synchronous if I'm not mistaken, when the spinner stops it should end up with a correct state when the provided url was valid.

Quote from: AdSchellevis on January 02, 2021, 10:12:35 PM
yes, you can check the contents of the field, unfortunately it doesn't tell you anything about the validity of the data (in which case the error message probably is still fine, surely we could replace "a source" for "a valid source", but that wouldn't tell you more than it already did).

I don't think I'm making myself clear.  What I'm trying to say is that the current message is appropriate for an empty field, but is not relevant for a situation where the field is populated and the file does not exist.  In that situation, if it's not possible to validate the contents of the field, or check whether a download has been attempted using that link, then a different error message would be more valuable.

I suggested such a message in my previous post: "No GeoIP file has been received.  Check to be sure the source you configured is correct, or wait [x time] to allow the next scheduled file download to occur."  Surely that is a more useful description of the issue than a message telling the user an already-populated field needs to be populated.

Quote from: AdSchellevis on January 02, 2021, 10:12:35 PMThe apply button itself is synchronous if I'm not mistaken, when the spinner stops it should end up with a correct state when the provided url was valid.

If I understand you correctly, you're saying I should never have seen that popup again after clicking apply.  Again, I'm reporting that was not my experience.  Apply was clicked multiple times over the course of troubleshooting, and it did not resolve the issue.