Closed sgalke closed 11 months ago
.. . no success as well on RPi3+ w/ bookworm 64:
always get "PDF document broken"
Works fine for me. Maybe you have some kind of network or proxy problem that is preventing the PDFs from downloading properly? Are you able to download https://magpi.raspberrypi.com/issues/135/pdf/download on your Raspberry Pi and view the PDF?
Am 11.12.2023 um 18:20 schrieb Andrew Scheller @.***>:
Works fine for me. Maybe you have some kind of network or proxy problem that is preventing the PDFs from downloading properly? Are you able to download https://magpi.raspberrypi.com/issues/135/pdf/download on your Raspberry Pi and view the PDF?
download yes, viewing no: error.
download yes, viewing no: error.
That suggests that something is going wrong during the download?
If I download that PDF and run md5sum MagPi135.pdf
it tells me:
a460c78e963d4730abeebb6b24be2b61 MagPi135.pdf
If you're seeing any other value, then it means that your PDF is getting corrupted, and that would explain why you're not able to open it.
EDIT: And ls -l MagPi135.pdf
reports that it has a file-size of 41872295 bytes.
Am 12.12.2023 um 11:43 schrieb Andrew Scheller @.***>:
a460c78e963d4730abeebb6b24be2b61 MagPi135.pdf
If you're seeing any other value, then it means that your PDF is getting corrupted, and that would explain why you're not able to open it.
thank you, i get
148ff3fbb6e4728cd1ecb6eddcdc6542 /home/pi/Bookshelf/MagPi135.pdf
hmmm... gmbl..
don't know why. i tried several times on different systems (pi3, pi4, pi5, even mac mini ..)
I also get:
a460c78e963d4730abeebb6b24be2b61 /home/dom/Downloads/MagPi135.pdf
@sgalke show ouput of:
ls -l /home/pi/Bookshelf/MagPi135.pdf
file /home/pi/Bookshelf/MagPi135.pdf
Am 12.12.2023 um 15:50 schrieb popcornmix @.***>:
I also get: a460c78e963d4730abeebb6b24be2b61 /home/dom/Downloads/MagPi135.pdf
@sgalke show ouput of: ls -l /home/pi/Bookshelf/MagPi135.pdf file /home/pi/Bookshelf/MagPi135.pdf
next try, yet another md5sum.
@.***:~/Bookshelf $ md5sum MagPi135.pdf 18fb9c67640c2d6178abe7c83183eccc MagPi135.pdf
@.***:~/Bookshelf $ ls -l /home/pi/Bookshelf/MagPi135.pdf -rw-r--r-- 1 pi pi 35849940 12. Dez 16:01 /home/pi/Bookshelf/MagPi135.pdf
@.***:~/Bookshelf $ file /home/pi/Bookshelf/MagPi135.pdf /home/pi/Bookshelf/MagPi135.pdf: PDF document, version 1.7 (password protected)
the problems are similar with magpi134. some other magpi's i downloaded i can view successfully.
are the magpi's mirrored somewhere? i download from germany. broken mirror? man-in-the-middle??
It shouldn't be password protected, and the length is wrong.
pi@pi5:~ $ ls -l MagPi135.pdf
-rw-rw-r-- 1 pi pi 41872295 Dec 12 15:28 /home/pi/MagPi135.pdf
pi@pi5:~ $ file MagPi135.pdf
/home/pi/MagPi135.pdf: PDF document, version 1.7 (zip deflate encoded)
MagPi133 ok, some older MagPis ok as well. MagPi134 & MagPi135 every time: different md5s, on different systems, different hardware, different versions of raspberry pi os: always errors on open. why? i no longer think its bookworm related, the problem persists, i will close the issue. am i the only w/ this kind of problem? hopefully i will not become paranoid ... :/ thank you for your answers . ..
Bookshelf downloads go through a dedicated proxy (to deal with the fact it doesn't follow redirects and we use short-lived, signed URLs for the actual PDFs), could you please try downloading directly from https://bookshelfproxy.raspberrypi.com/downloads/eyJfcmFpbHMiOnsiZGF0YSI6ODc4NCwicHVyIjoiYmxvYl9pZCJ9fQ==--9603504c3cbe18b007e5aed186153d386dcdb8f2/MagPi135.pdf?subdomain=magpi and see if that gives you a file with an MD5 checksum of a460c78e963d4730abeebb6b24be2b61
?
Am 12.12.2023 um 17:48 schrieb Paul Mucur @.***>:
Bookshelf downloads go through a dedicated proxy (to deal with the fact it doesn't follow redirects and we use short-lived, signed URLs for the actual PDFs), could you please try downloading directly from https://bookshelfproxy.raspberrypi.com/downloads/eyJfcmFpbHMiOnsiZGF0YSI6ODc4NCwicHVyIjoiYmxvYl9pZCJ9fQ==--9603504c3cbe18b007e5aed186153d386dcdb8f2/MagPi135.pdf?subdomain=magpi and see if that gives you a file with an MD5 checksum of a460c78e963d4730abeebb6b24be2b61?
success!!! (from mac os sonoma) thank you! but why ...
That should be the exact same URL used by the Bookshelf application on Raspberry Pi OS (and internally the proxy redirects to the exact same URL used by the MagPi site). What's your network connectivity like (e.g. as reported by https://fast.com or Googling for "internet speed test")?
One constraint we do have is that any clients of long downloads of the magazine PDFs via Bookshelf must read some bytes every 30-55 seconds otherwise the request will time out. Do you have a sense how long the failed downloads are taking?
Am 13.12.2023 um 10:01 schrieb Paul Mucur @.***>:
One constraint we do have is that any clients of long downloads of the magazine PDFs via Bookshelf must read some bytes every 30-55 seconds otherwise the request will time out. Do you have a sense how long the failed downloads are taking?
~ 3 minutes. i blamed my internet provider in the meantime. the connection was faulty. sorry for the noise. you did really help me. ..
download never succeeds on bookworm 64bit, RPi4 & RPi5.