"Username/password required, retrying..." Loop
#1  stio 10-25-2019, 06:07 AM
I've had Calibre-Server up and running on a remote Linux server for a few weeks now and no problems.

As of yesterday however, whenever I connect via one particular browser, I can see that I'm logged in from the landing page, as it shows me the 'Continue Reading...' thumbnail:

image »

But, when I click on the 'Choose Library..' option to view my library, I just get an eternal "Username/password required, retrying..." message:

image »

A look at the browser dev tools console shows that the page is constantly reloading but generating an 'Unauthorized' response:

image »

which makes it look like the login session cookie has become corrupted or expired. So I delete the cookie. But now when I visit the landing page, I'm met with the 'You are not authorised...' error, which I can't clear.

image »

I thought quitting and restarting the browser would bring up the login dialogue again, but it doesn't.

So where do I go from here? I thought deleting the cookie would suffice to trigger a prompt to login again and create a new session. But obviously not.

And, just to reiterate; this has been working fine up until yesterday and the problem only exists with this [Chrome based] browser. I can still visit the site in Firefox and all works fine. So pretty sure the problem lies with the login session on this particular browser. But there doesn't seem to be a user-friendly way to clear / logout the session.

#2  kovidgoyal 10-25-2019, 11:00 AM
The calibre server does not use cookies, it uses HTTP auth. So clearing cookies wont do anything. Not sure why your browser is not prompting you with a password prompt, try a clean profile.

#3  stio 10-25-2019, 11:20 AM

Hmmm.... I think I need to do some reading up on HTTP Auth. I thought it would store the connection info in a session cookie.

Anyway, thanks to your pointing out I was on the wrong track, I managed to sort things out:

I opened my browser's Dev tools > Network inspector and chose to open the `init?...` connection in a new tab:

image »

which presented me with the login dialogue again. Allowing me to get back into my library:

image »

I don't have enough knowledge of HTTP Auth to work out why this approach worked when reloading the window / bypassing browser cache / restarting browser didn't. But at least it solved the problem. So I'll leave it here for reference, in case it happens again, or anyone else runs into this.

#4  stio 12-22-2019, 11:38 AM
UPDATE: Unfortunately this problem seems to keep re-occurring. I don't tend to visit my Calibre server that often –only to check things are OK, when i've batch added new books. But I visited it again today and ran into the same "Username/Password required, retrying..." error accompanied by the same endlessly 'unauthorised' script attempting to reload.

As before, I had to manually open that script directly from the browser's Dev Tools console, to force the login dialogue to appear. So it's a workaround, but still annoyingly clunky, if I'm going to have to do that, every time I want to visit my Calibre server.

Is it possible to add some kind of 'Login' button to the GUI that forces the Login dialogue to appear?

#5  kovidgoyal 12-22-2019, 11:45 AM
try navigating to /mobile

Today's Posts | Search this Thread | Login | Register