go-shiori/shiori

empty epub

pocelka opened this issue · 6 comments

Data

  • Shiori version: 1.5.5
  • Database Engine: SQL Lite3
  • Operating system: Docker container (host OS: Fedora 38)
  • CLI/Web interface/Web Extension: Beta Extension 1.1

Describe the bug / actual behavior

When I download article as an ebook, downloaded file is empty.

Expected behavior

eBook is created with size greater then 0 bytes.

To Reproduce

Steps to reproduce the behavior:
0. Save link: https://blogs.oracle.com/cloud-infrastructure/post/adv-terraform-stack-logic-oracle-resource-manager

  1. Go to "top menu" -> batch edit
  2. Click on "saved article"
  3. Click on "top menu" -> download ebooks

Screenshots

image

EDIT:
Seems like it also creates a copy of ebook in the mounted docker volume. Not sure if that is correct since it downloaded also file to my host machine:
image

I did one more try and I removed the epub file from the docker mounted volume. Then during the epub donwload I'm getting:
image

So maybe it is related to the reported issue. Because I have seen the error also the first time, but 2nd time when I tried to download ebook it went fine, it just created empty file.

In docker logs I have this:

time="2023-11-02T19:17:04+01:00" level=info msg="GET /api/bookmarks?keyword=&tags=test" proto=HTTP/1.1 remote="192.168.1.2:34734" reqlen=0 size=38 status=200
time="2023-11-02T19:17:05+01:00" level=info msg="POST /api/bookmarks" proto=HTTP/1.1 remote="192.168.1.2:34734" reqlen=211 size=378 status=200
time="2023-11-02T19:17:12+01:00" level=info msg="GET /api/bookmarks?keyword=&tags=test" proto=HTTP/1.1 remote="192.168.1.2:34734" reqlen=0 size=38 status=200
2023/11/02 19:17:13 error during commit: sql: transaction has already been committed or rolled back
time="2023-11-02T19:17:13+01:00" level=warning msg="POST /api/bookmarks" proto=HTTP/1.1 remote="192.168.1.2:34734" reqlen=211 size=90 status=500
time="2023-11-02T19:17:20+01:00" level=info msg="GET /" proto=HTTP/1.1 remote="192.168.1.2:48562" reqlen=0 size=5659 status=200
time="2023-11-02T19:17:20+01:00" level=info msg="GET /api/bookmarks?keyword=&tags=&exclude=&page=1" proto=HTTP/1.1 remote="192.168.1.2:48562" reqlen=0 size=430 status=200
time="2023-11-02T19:17:20+01:00" level=info msg="GET /api/tags" proto=HTTP/1.1 remote="192.168.1.2:48562" reqlen=0 size=3 status=200
time="2023-11-02T19:17:31+01:00" level=info msg="GET /bookmark/1/content" proto=HTTP/1.1 remote="192.168.1.2:51206" reqlen=0 size=23251 status=200
time="2023-11-02T19:17:34+01:00" level=info msg="GET /api/accounts" proto=HTTP/1.1 remote="192.168.1.2:51206" reqlen=0 size=50 status=200
time="2023-11-02T19:17:55+01:00" level=info msg="DELETE /api/bookmarks" proto=HTTP/1.1 remote="192.168.1.2:50880" reqlen=3 size=1 status=200
time="2023-11-02T19:17:55+01:00" level=info msg="GET /api/bookmarks?keyword=&tags=&exclude=&page=1" proto=HTTP/1.1 remote="192.168.1.2:50880" reqlen=0 size=38 status=200
time="2023-11-02T19:17:56+01:00" level=info msg="GET /" proto=HTTP/1.1 remote="192.168.1.2:50880" reqlen=0 size=5659 status=200
time="2023-11-02T19:17:56+01:00" level=info msg="GET /api/bookmarks?keyword=&tags=&exclude=&page=1" proto=HTTP/1.1 remote="192.168.1.2:50880" reqlen=0 size=38 status=200
time="2023-11-02T19:17:56+01:00" level=info msg="GET /api/tags" proto=HTTP/1.1 remote="192.168.1.2:50880" reqlen=0 size=3 status=200
time="2023-11-02T19:17:59+01:00" level=info msg="GET /api/bookmarks?keyword=&tags=test" proto=HTTP/1.1 remote="192.168.1.2:50884" reqlen=0 size=38 status=200
time="2023-11-02T19:18:00+01:00" level=info msg="POST /api/bookmarks" proto=HTTP/1.1 remote="192.168.1.2:50884" reqlen=211 size=378 status=200
time="2023-11-02T19:18:02+01:00" level=info msg="GET /" proto=HTTP/1.1 remote="192.168.1.2:50880" reqlen=0 size=5659 status=200
time="2023-11-02T19:18:02+01:00" level=info msg="GET /api/bookmarks?keyword=&tags=&exclude=&page=1" proto=HTTP/1.1 remote="192.168.1.2:50880" reqlen=0 size=430 status=200
time="2023-11-02T19:18:02+01:00" level=info msg="GET /api/tags" proto=HTTP/1.1 remote="192.168.1.2:50880" reqlen=0 size=3 status=200
time="2023-11-02T19:18:03+01:00" level=info msg="GET /bookmark/1/content" proto=HTTP/1.1 remote="192.168.1.2:50880" reqlen=0 size=23251 status=200
time="2023-11-02T19:19:17+01:00" level=info msg="PUT /api/bookmarks" proto=HTTP/1.1 remote="192.168.1.2:60706" reqlen=427 size=24402 status=200
time="2023-11-02T19:19:24+01:00" level=info msg="GET /api/bookmarks?keyword=terra&tags=&exclude=&page=1" proto=HTTP/1.1 remote="192.168.1.2:60706" reqlen=0 size=479 status=200
time="2023-11-02T19:19:28+01:00" level=info msg="GET /api/accounts" proto=HTTP/1.1 remote="192.168.1.2:60706" reqlen=0 size=50 status=200
time="2023-11-02T19:19:31+01:00" level=info msg="GET /bookmark/1/content" proto=HTTP/1.1 remote="192.168.1.2:60706" reqlen=0 size=23251 status=200
2023/11/02 19:20:15 Get "https://blogs.oracle.com/content/published/api/v1.1/assets/CONTCEBA0B3AED4240679C38D845E54FB5DF/Medium?cb=_cache_506c&channelToken=f7814d202b7d468686f50574164024ec&format=jpg": stream error: stream ID 3; INTERNAL_ERROR; received from peer
time="2023-11-02T19:20:15+01:00" level=info msg="Serve shiori in :8080 /"
time="2023-11-02T19:20:37+01:00" level=warning msg="PUT /api/ebook" proto=HTTP/1.1 remote="192.168.1.2:42482" reqlen=11 size=25 status=500
time="2023-11-02T19:20:39+01:00" level=info msg="GET /login?dst=http%3A%2F%2F192.168.1.3%3A9009%2F%3Fsearch%3Dterra%23home" proto=HTTP/1.1 remote="192.168.1.2:42482" reqlen=0 size=4299 status=200
time="2023-11-02T19:20:49+01:00" level=warning msg="GET /" proto=HTTP/1.1 remote="192.168.1.2:33532" reqlen=0 size=49 status=301
time="2023-11-02T19:20:49+01:00" level=info msg="GET /login?dst=%2F" proto=HTTP/1.1 remote="192.168.1.2:33532" reqlen=0 size=4299 status=200
time="2023-11-02T19:21:14+01:00" level=info msg="POST /api/login" proto=HTTP/1.1 remote="192.168.1.2:45974" reqlen=83 size=151 status=200
time="2023-11-02T19:21:14+01:00" level=info msg="GET /" proto=HTTP/1.1 remote="192.168.1.2:45974" reqlen=0 size=5659 status=200
time="2023-11-02T19:21:15+01:00" level=info msg="GET /api/bookmarks?keyword=&tags=&exclude=&page=1" proto=HTTP/1.1 remote="192.168.1.2:45974" reqlen=0 size=478 status=200
time="2023-11-02T19:21:15+01:00" level=info msg="GET /api/tags" proto=HTTP/1.1 remote="192.168.1.2:45974" reqlen=0 size=85 status=200
time="2023-11-02T19:21:21+01:00" level=info msg="GET /bookmark/1/content" proto=HTTP/1.1 remote="192.168.1.2:45974" reqlen=0 size=23382 status=200
time="2023-11-02T19:21:31+01:00" level=info msg="PUT /api/ebook" proto=HTTP/1.1 remote="192.168.1.2:45974" reqlen=11 size=24403 status=200
time="2023-11-02T19:21:31+01:00" level=warning msg="GET /bookmark/1/ebook" proto=HTTP/1.1 remote="192.168.1.2:45974" reqlen=0 size=0 status=0
time="2023-11-02T19:22:00+01:00" level=info msg="GET /api/accounts" proto=HTTP/1.1 remote="192.168.1.2:43878" reqlen=0 size=50 status=200
time="2023-11-02T19:23:01+01:00" level=info msg="GET /api/bookmarks?keyword=&tags=&exclude=&page=1" proto=HTTP/1.1 remote="192.168.1.2:38182" reqlen=0 size=478 status=200
time="2023-11-02T19:23:01+01:00" level=info msg="GET /api/tags" proto=HTTP/1.1 remote="192.168.1.2:38182" reqlen=0 size=85 status=200
time="2023-11-02T19:23:32+01:00" level=info msg="GET /bookmark/1/content" proto=HTTP/1.1 remote="192.168.1.2:59754" reqlen=0 size=23382 status=200
time="2023-11-02T19:24:41+01:00" level=info msg="GET /api/bookmarks?keyword=&tags=test" proto=HTTP/1.1 remote="192.168.1.2:41388" reqlen=0 size=38 status=200
time="2023-11-02T19:25:55+01:00" level=info msg="GET /bookmark/1/content" proto=HTTP/1.1 remote="192.168.1.2:55438" reqlen=0 size=23382 status=200
time="2023-11-02T19:26:20+01:00" level=info msg="PUT /api/bookmarks" proto=HTTP/1.1 remote="192.168.1.2:49298" reqlen=423 size=24399 status=200
time="2023-11-02T19:28:16+01:00" level=info msg="PUT /api/ebook" proto=HTTP/1.1 remote="192.168.1.2:60124" reqlen=11 size=24400 status=200
time="2023-11-02T19:28:16+01:00" level=warning msg="GET /bookmark/1/ebook" proto=HTTP/1.1 remote="192.168.1.2:60124" reqlen=0 size=0 status=0
2023/11/02 19:35:21 Get "https://blogs.oracle.com/content/published/api/v1.1/assets/CONTCEBA0B3AED4240679C38D845E54FB5DF/Medium?cb=_cache_506c&channelToken=f7814d202b7d468686f50574164024ec&format=jpg": stream error: stream ID 3; INTERNAL_ERROR; received from peer
time="2023-11-02T19:35:21+01:00" level=info msg="Serve shiori in :8080 /"

Hey @pocelka, does your article have content in the reader view?

I’m not really sure what you mean by reader mode but I’ll say, yes it has. I included also link so you could test if that is article related or something else.

Sorry, I missed that. Just tried the URL in 1.5.5 and latest master. 1.5.5 fails but latest master creates an ebook successfully though with missing images it seems, there are some network errors while trying to fetch things from oracle.com.

What is happening is that in 1.5.5 the server just crashes and don't continue, but in 1.6.0 we will be more fault tolerant.

@fmartingr in your final epub do you have image too?

in long term i like to use image from local image in archive version but i should wait until #481 merge than try to use files inside local file instead of download them twice.

@fmartingr in your final epub do you have image too?

in long term i like to use image from local image in reader mode but i should wait until #481 merge than try to use files inside local file instead of download them twice.

It didn't had images, they failed to download.