multiple login prompts on web server

Bug #1982060 reported by Vlastimil Vondra
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Unassigned

Bug Description

Hi, every time in Chrome browser either on mobile (103.0.5060.71) or desktop (103.0.5060.114), I need to log into server from 2 to 3 times. It is the almost same bug as in the past here - https://bugs.launchpad.net/calibre/+bug/1782068

If I click cancel for every time I'm getting these errors in console:
Failed to load resource: the server responded with a status of 401 (Unauthorized) books-init:1

Failed to load resource: the server responded with a status of 401 (Unauthorized) 56f400470da3307e4f76515942d32252a63c0bad:1

Failed to load resource: the server responded with a status of 401 (Unauthorized) 1-EPUB:1

Also as in the bug report previously reported it is sufficient to input login only once and then click cancel 2 times.

In firefox also either desktop or mobile login promt works ok, it appears only once. When on firefox click cancel only this error message appears:
XHRGET http://192.168.1.138:8080/book-get-annotations/Knihovna_Calibre/13-EPUB_27-EPUB_1-EPUB?1658207126156
[HTTP/1.1 401 Unauthorized 38ms]

I tested this behaviour on my calibre at raspbian os buster (5.12) but also on windows 10 (calibre 6.1)

Revision history for this message
Kovid Goyal (kovid) wrote :

As I said in that bug report, this is a bug in chrome, and I cannot
reproduce it on my chrome 103, so something about chrome on your system
is different, steps to investigate are in that bug report, follow up
there.

Changed in calibre:
status: New → Invalid
Revision history for this message
Vlastimil Vondra (vondravl) wrote (last edit ):

Steps to reproduce: If I access calibre-server for the first time in the chromium based browser, the login promt appears only once (also if I start in incognite window), if I close the browser and open calibre-server again, then it pops 3 times. I tested also in chromium in linux, exactly the same behaviour.

If this is chrome bug then ok, but I wonder how come you can't reproduce. I tested on linux, android, windows. Also same error in edge - so I guess it's because of chromium base. In the previous bug report there you wrote about console logs from browser, which I attached in previous comment, unfortunatelly I don't know what else I can investigate.

Revision history for this message
Kovid Goyal (kovid) wrote :

It is clearly a bug in Chrome. It is fetching three different resources
from the same server and not waiting for the user to respond to the
first password popup and using the password from there. Instead it is
popping up independent password dialogs for each resource.

I could of course workaround it by having the page load a single
password protected resource and wait for that load to finish before
proceeding but that just adds latency for everyone in order to avoid
password popups for one browser and then too only in the case of it
being freshly restarted.

Actually thinking about it maybe password protecting the root HTML will
do the trick with minimal performance impact on others.

Revision history for this message
Kovid Goyal (kovid) wrote : Fixed in master

Fixed in branch master. The fix will be in the next release. calibre is usually released every alternate Friday.

 status fixreleased

Revision history for this message
Kovid Goyal (kovid) wrote :

Note that since I cant reproduce I have no way to be sure the fix works.

Changed in calibre:
status: Invalid → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.