haroldtreen / epub-press

📚 Web service for creating ebooks from collections of websites.
https://epub.press
GNU General Public License v3.0
327 stars 59 forks source link

Error when running in Raspberry Pi #105

Open AlbertollSandeogracias opened 1 year ago

AlbertollSandeogracias commented 1 year ago

Current Behavior

When I make a call to the books endpoint I got an Id as a response but the log print this message:

POST /api/v1/books 202 85.668 ms - 18

error: Error Thrown @ BookServices.convertSectionContent: Error: write EPIPE

 error=undefined

error: Error Thrown @ BookServices.convertSectionsContent: Error: write EPIPE

 error=undefined

Besides that, when I make a call to the download endpoint with the response Id and I get a file called ebook.epub. The problem is that if I open the file with a text editor the content is this JSON:

{"errors":[{"status":"404","detail":"No book with that id was found."}]}

Expected Behavior

Download an ebook with the content of the webpage.

Steps to reproduce

Make the example call of the read me:

url http://localhost:3000/api/v1/books \
 -H "Content-Type: application/json" \
 -X POST \
 -d '{
    "title": "A title",
    "description": "A description",
    "author": "An author",
    "genre": "ebooks",
    "coverPath": "",
    "urls": [
        "https://epub.press"
    ]
}'
curl -o book.epub http://localhost:3000/api/v1/books/:id/download

System Information

I deployed the container in a Raspberry Pi 4 running headless raspbian. First of all I tried to deploy the container without modifying the DockerFile but I have an issue when the system tried to install calibre. I modified the docker file changing the converter value to kindlegen and the deploy was sucessfull, but I had the error of the issue. Afterthat, I delete the container and deployed a modified version with the changes in the DockerFile and comenting all the references to mobi in the code. I had the same error described. I know this is not the expected system to run, I just want to know if someone has achieve to run the service in an arm system or if is there a known solution to this problem.

Thanks in advance.