Mobileread
"Username/password required, retrying..." Loop
#1  stio 10-25-2019, 07: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.
Reply 

#2  kovidgoyal 10-25-2019, 12:00 PM
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.
Reply 

#3  stio 10-25-2019, 12:20 PM
Thanks.

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.
Reply 

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