edrlab / thorium-reader

A cross platform desktop reading app, based on the Readium Desktop toolkit
https://www.edrlab.org/software/thorium-reader/
BSD 3-Clause "New" or "Revised" License
1.85k stars 157 forks source link

OPDS download is broken with Gutenberg feed #1075

Closed danielweck closed 4 years ago

danielweck commented 4 years ago

http://m.gutenberg.org/ebooks.opds/

(see https://readium2.herokuapp.com/opds-v1-v2-convert/http%3A%2F%2Fm.gutenberg.org%2Febooks.opds%2F )

[2]   readium-desktop:main#services/downloader oauth +0ms
[2]   readium-desktop:main#services/downloader NotFoundError { message: 'document not found' } +1ms
danielweck commented 4 years ago

See "href": "https://www.gutenberg.org/ebooks/11.epub.noimages" in https://readium2.herokuapp.com/opds-v1-v2-convert/http%3A%2F%2Fm.gutenberg.org%2Febooks%2F11.opds

The download link itself is valid, and the downloaded EPUB can be added to the library successfully, and read too: https://www.gutenberg.org/ebooks/11.epub.noimages

panaC commented 4 years ago

https://github.com/edrlab/thorium-reader/blob/39c31d6767e88b0d30edfd12311e29090d931f93/src/main/services/downloader.ts#L124

danielweck commented 4 years ago

ah yes, this is probably normal (db document not created yet). other downloads work from feedbooks opds, so must be something else...

panaC commented 4 years ago
readium-desktop:main#services/downloader request error:  Error: certificate has expired
[2]     at TLSSocket.onConnectSecure (_tls_wrap.js:1321:34)
[2]     at TLSSocket.emit (events.js:210:5)
[2]     at TLSSocket._finishInit (_tls_wrap.js:794:8)
[2]     at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:608:12) {
[2]   code: 'CERT_HAS_EXPIRED'
[2] } +348ms
panaC commented 4 years ago

https://stackoverflow.com/questions/20433287/node-js-request-cert-has-expired

danielweck commented 4 years ago

Related issue? https://github.com/edrlab/thorium-reader/issues/1083

danielweck commented 4 years ago

Yep, Gutenberg server suffers from the same certificate expiry problem as EDRLab's LCP server.

Common name: USERTrust RSA Certification Authority
Organization: The USERTRUST Network
Location: Jersey City, New Jersey, US
Valid from May 30, 2000 to May 30, 2020
Serial Number: 13ea28705bf4eced0c36630980614336
Signature Algorithm: sha384WithRSAEncryption
Issuer: AddTrust External CA Root

https://www.sslshopper.com/ssl-checker.html#hostname=https://www.gutenberg.org

danielweck commented 4 years ago

See thread: https://github.com/edrlab/thorium-reader/issues/1083#issuecomment-640784660