Bug report #20928

Connecting to WMS service requiring an authentification shows a popup for user/password that frozes the applications few seconds after it appears

Added by Marc LE BIHAN about 1 year ago. Updated 12 months ago.

Status:Closed
Priority:High
Assignee:Nyall Dawson
Category:Web Services clients/WMS
Affected QGIS version:3.4.2 Regression?:Yes
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:duplicate
Crashes QGIS or corrupts data:No Copied to github as #:28747

Description

Since QGis 3.4.2 (or maybe even 3.4.1) when I attempt to connect to a WMS service that requires an authentification with user / password, a popup appears at the time I add a layer from this WMS service to display it.

A caret blink on this popup. But as soon as I try to enter data on it the caret frozes as well as the popup and the whole application.

gel_connexion_wms_gis.png - Frozen QGIS ("ne répond pas" on the caption of the authentication popup) (118 KB) Marc LE BIHAN, 2019-01-07 10:13 AM

config_qgis.png (176 KB) Marc LE BIHAN, 2019-01-08 10:57 AM

qgis_2_18.png (132 KB) Marc LE BIHAN, 2019-01-09 11:56 AM

History

#1 Updated by Giovanni Manghi about 1 year ago

  • Status changed from Open to Feedback

I just tried with a service that is password protected with Apache basic http authentication, and works as expected.

#2 Updated by Marc LE BIHAN about 1 year ago

  • Status changed from Feedback to Open

We are encountering the same problem on every computer where QGis 4.3.x is currently installed,
and I also have the same problem at home.

It's truely a bug.

#3 Updated by Marc LE BIHAN about 1 year ago

BTW, I am ready to search the cause of the trouble. The involved source maybe be around :
https://github.com/qgis/QGIS/tree/master/src/gui/auth

However;
no docs upon methods, quite no comments inside them,
No exception handling,
No logs

It won't be easy.

#4 Updated by Giovanni Manghi about 1 year ago

  • Status changed from Open to Feedback

Marc LE BIHAN wrote:

We are encountering the same problem on every computer where QGis 4.3.x is currently installed,
and I also have the same problem at home.

what is your backend? how you are securing it? do you have a URL you can share?

#5 Updated by Marc LE BIHAN about 1 year ago

  • Status changed from Feedback to Open

The backend is Inspire or Geoportail coming from IGN :
http://wxs.ign.fr/user_key/inspire/v/wms
or
http://wxs.ign.fr/user_key/geoportail/v/wms

On the picture provided with this issue, we see that the first access (GetCapabilities) is a success : the list of the layer is shown.
However, when we attempt to add any of their layers for a map representation, QGis hangs.

Stop setting it as a feedback only :
It truely a bug, as it affect all installations in different geographic places, with a server that is not unknown (Geoportail / Inspire from IGN).
it's not because your Galaxy smartphone battery is not exploding that they are not exploding if someone told you they are exploding. It would have been better if I could have proven myself with some logs showing the problem, but they are none in QGIS. At least, believe people when they say a bug is a bug, please. I know you have plenty of them already, and I really want to help you. But stop minimizing everything. QGIS is really unstable and its quality is lowering versions after versions.

I will help you tracking this bug because we are in emergency here => QGis not working with one of its core functions with no messages. If you can name me the source that displays the form where the user/password is shown and I will analyze that source code to see if anything can explain why its hangs. Because the caret is frozen on it, like the whole application.

#6 Updated by Giovanni Manghi about 1 year ago

Marc LE BIHAN wrote:

At least, believe people when they say a bug is a bug, please. I know you have plenty of them already, and I really want to help you. But stop minimizing everything.

you really didn't understand at all my answers (so stop implying things are not true): i have not minimized the problem, on the very contrary. I'm the first person interested to understand if this is a real regression, and if is the case give the maximum priority in this tracker. But for this happen you have to give us (eventually with a private message) a way to replicate the issue. What I have told you at the beginning is that with a basic https authentication using apache (and mapserver and qgis server) this problem does not seems to show. I think that the URLs you provided need this "user_key" and/or a credential, can you provide them for testing purposes?

#7 Updated by Giovanni Manghi about 1 year ago

  • Status changed from Open to Feedback

And by they way, tagging the ticket as "feedback" means ONLY that we are asking questions and further details, it does not means the ticket is closed.

#8 Updated by Marc LE BIHAN about 1 year ago

I can't yet give account key and credentials : they are own by my company.
It is possible to create a free acount on Geoportail, but it makes you going far.

Whatever, I can help to investigate the issue here, provided I know with what source I shall start my tracking.
I am looking for the one that displays that form on the screen, and hangs soon after it gets the focus (or even before).

What is the cpp source file in charge of displaying that form ?

#9 Updated by Giovanni Manghi about 1 year ago

Marc LE BIHAN wrote:

I can't yet give account key and credentials : they are own by my company.

if you can't give the qgis developers a way to replicate the issue, and you are the only one being hit by it than you are possibly by yourself. If you want more details about the qgis code for the wms client the right place where to ask is the developers mailing list.

#10 Updated by Alessandro Pasotti about 1 year ago

@Marc, please cool down, we are (mostly) volunteers donating our free time for the sake of the project, if you are in a hurry and you have a budget you should better contact one of the many companies offering commercial support for QGIS.

That said, I'm personally much more keen to work on bugs where there is a clear and step-by-step procedure that I can follow to reproduce the issue.

There have been some recent changes in the authentication code, it would be useful information if you could test the previous versions in the 3.x serie and tell us if the bug was already present.

Btw, did you try to use the (recommended) authentication configuration for the endpoint instead of waiting for the popup?

#11 Updated by Marc LE BIHAN about 1 year ago

I have tried to set a standard configuration (picture), or one in the tab "De base", but the popup is always coming at the time I add a layer.
And I think the recent changes in the authentication code might be involved, as few QGis version ago, this feature was working.

#12 Updated by Marc LE BIHAN about 1 year ago

I see in source code a lot of mutex... Oh no... Quite no one in the world knows how to work with them well. The freeze has many chances to come from them.

#13 Updated by Giovanni Manghi about 1 year ago

Marc LE BIHAN wrote:

I have tried to set a standard configuration (picture), or one in the tab "De base", but the popup is always coming at the time I add a layer.
And I think the recent changes in the authentication code might be involved, as few QGis version ago, this feature was working.

does it works as expected on 2.18?

#14 Updated by Giovanni Manghi about 1 year ago

Marc LE BIHAN wrote:

I see in source code a lot of mutex... Oh no... Quite no one in the world knows how to work with them well. The freeze has many chances to come from them.

please raise your concerns in the developers mailing list.

#15 Updated by Marc LE BIHAN about 1 year ago

I don't know, but in version 3.2.x I am quite sure that feature was working well.

#16 Updated by Giovanni Manghi about 1 year ago

Marc LE BIHAN wrote:

I don't know, but in version 3.2.x I am quite sure that feature was working well.

you should also try 2.18, that is still the LTR/stable release.

#17 Updated by Marc LE BIHAN about 1 year ago

On 3.2.1 I've checked : it hangs also.

On 2.1.18 : the popup comes even if a user/password has already been set during WMS configuration.
But after that it seems to work well, except that the password is asked again each time I move the view.

#18 Updated by Giovanni Manghi about 1 year ago

Marc LE BIHAN wrote:

On 3.2.1 I've checked : it hangs also.

ok, but it barely matters as 3.2 was not a stable release. If the bug persist on 3.4/master that matters.

On 2.1.18 : the popup comes even if a user/password has already been set during WMS configuration.
But after that it seems to work well, except that the password is asked again each time I move the view.

2.18.27? was the password saved when creating the connection?

#19 Updated by Marc LE BIHAN about 1 year ago

Yes, but when the popup come the first time the two fields are empty (username and password), and when it came again, only the username is filled.

#20 Updated by Nyall Dawson 12 months ago

  • Assignee set to Nyall Dawson
  • Status changed from Feedback to In Progress

#21 Updated by Nyall Dawson 12 months ago

  • Status changed from In Progress to Closed
  • Resolution set to duplicate

Duplicate of #20826

#22 Updated by Marc LE BIHAN 12 months ago

Ok.
Good to see that it is not working as expected,
that it is not a problem due to a backend,
that it is well known since one month,
and that its cause is a failed refactoring.

I see no tests, nowhere. How do you check your program are working ?

#23 Updated by Nyall Dawson 12 months ago

Marc -- you seem to have a fundamental misunderstanding as to how open source development works. The responsibility for fixing a bug which affects you resides with YOURSELF. The responsibility for adding unit tests covering functionality you want to see tested lies with YOURSELF.

There is no "magic elves" here. Volunteer your time, or PAY SOMEONE to fix your bugs. Or at the very least, improve your attitude and communication skills so that others will actually feel like donating their time to help you.

Read https://nyalldawson.net/2016/08/how-to-effectively-get-things-changed-in-qgis/ if you need more details about how this project actually works, and how you can EFFECTIVELY influence development.

#24 Updated by Marc LE BIHAN 12 months ago

"Correct bugs yourself" (I asked at least two times the source file involved in authentification, in order to help, without response),
"Add unit tests yourself" : are you reading yourself ?
Since a lot of version, QGis is degrading at an incredible speed. Have you seen the number of issues opened each day ?

And you want others to add comment for you, debug for you, add tests for you, while you would continue to add code and code without adding test, commenting, ensuring correction ?
I disagree. It's not a matter of paying or not. It a matter of usable software in whom people trust. If you are in an open source project you are tied to do a work of quality. Here, today, it's far from being the case.
Being volunteer is not an excusing to allow the software degrading while only doing new features that developpers of course enjoy, and leave the bugs unfixed by a : "Correct them yourselves !"

#25 Updated by Jürgen Fischer 12 months ago

Marc LE BIHAN wrote:

Being volunteer is not an excusing to allow the software degrading while only doing new features that developpers of course enjoy, and leave the bugs unfixed by a : "Correct them yourselves !"

Of course it is - or better put it's an explanation - there's not even a need for an excuse. Get a clue. You can use the software as is and you are even free to change it to do what you want. You are not forced to use it (at least not by us). If you don't like it, find a better tool (good luck with that).

Rubbing people the wrong way won't get you anywhere.

Also available in: Atom PDF