Calibre-web: Failed to download book through OPDS using Android apps

Created on 2 Mar 2019  路  9Comments  路  Source: janeczku/calibre-web

Hello,

I have successfully setup the server and everything works fine other than the fact that the cps.py will only run as root, but that's another issues.

After a create a new user and ensuring that "Allow Download" is selected for said user, I go into an OPDS compatible android app and try to access and download a book. I am freely able to navigate through the menus and select a book, but when I click download I get a "403 Download Error".

When looking at the console log I see the following:
::ffff:192.168.1.22 - - [2019-03-02 14:58:55] "GET /opds/download/548/epub/ HTTP/1.1" 401 264 0.003101
::ffff:192.168.1.22 - - [2019-03-02 14:58:55] "GET /opds/download/548/epub/ HTTP/1.1" 403 1019 0.108471

I have tried all of these apps:

  • AlReader
  • Moon+ Reader
  • FBReader
  • Aldiko (Crashes when opening the catalog)
  • PocketBook reader (Fails to load any menu that list books in the catalog)

I use AlReader with the original Calibre Server and it works without issues.

I accessed the opds though the desktop browser by navigating to the book I tried to download with this url http://192.168.1.201:8083/opds/download/548/epub/ and I was able to download the book to my desktop, so I don't think there is a permissions issue.

It seems to me that the way the server and the android apps handle downloads are conflicting with one another.

If it helps I am run the server on a VM with Ubuntu 16.04.5 Server and Python 3.5.2. I have also installed the packages in optional-requirements.txt.

bug

All 9 comments

python3 is the problem, I'll fix it

Please check the newest commit

I did a complete re-install and made a new user.

I now no longer need to use root access in order to start the server but now OPDS fails to login. I tried with both the new account and the admin, both failed. All apps that I have tried give the same response.

In the console log it reads:
::ffff:192.168.1.22 - - [2019-03-03 04:53:35] "GET /opds HTTP/1.1" 401 264 0.002679
::ffff:192.168.1.22 - - [2019-03-03 04:53:35] "GET /opds HTTP/1.1" 401 264 0.002923

Could you please post the content of the Calibre-web.log file (only the relevant part, and please tell me what you did while the errors/messages are logged)

I was unable to get any useful log information from calibre-wed.log while attempting to login through an app. I tried switching the log level to DEBUG, WARNING, and ERROR but the only logged info was the starting/stopping of the server, also WARNING and ERROR produced no output.

The only info that may be useful is from the app that I was using (AlReader). After failing to login, I get a pop-up message that say "for registered users only". I also noticed that this is the same message if I were to attempt to access the opds catalog without any login info saved.

As for my step by step process it goes as followed:

  • make sure user account is logged off from desktop (I don't think this is necessary but just in case)
  • create "New Catalog" in app with this info

    • URL: http://192.168.1.201:8083/opds

    • Username: [user]

    • Password: [pass]

  • open new catalog and I get the message "for registered users only"

Interestingly, if I select "Enable anonymous browsing" I am able to access the opds catalog and it allows me to download.

So given this, maybe the login info is not being read correctly(?).

Sorry, you are right.
I didn't merge everything from the development branch to the master branch, the newest commit should work now (really).

Awesome. Everything seems to be working now.
Thanks for your hard work and quick replies. I'll be sure to stick around to let you know if I find any more issues.

perfect

Hi,

Perfect fix!

Was just creating a new bug when I saw this one :).

I just tested on FBReader and now it is working well (before I had a 401).

Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MReprogle1 picture MReprogle1  路  9Comments

ground7 picture ground7  路  4Comments

gerroon picture gerroon  路  9Comments

sirprancelot picture sirprancelot  路  4Comments

InsOpDe picture InsOpDe  路  4Comments