Difegue / LANraragi

Web application for archival and reading of manga/doujinshi. Lightweight and Docker-ready for NAS/servers.
https://lrr.tvc-16.science
MIT License
2.25k stars 160 forks source link

Error while fetching tags with either plugin using Docker #656

Closed drummingdemon closed 2 years ago

drummingdemon commented 2 years ago

LRR Version and OS LRR: 0.8.5 OS: Synology DSM 7.1-42661 Update 2 Docker: 20.10.3-1306

(I did try it under macOS 12.4 as well with Docker 20.10.17, build 100c701 - same results)

Bug Details LANraragi seems to be unable to fetch external metadata, either from nHentai or EH - regardless of batch processing or editing a single Archive Metadata. Importing Tags using the nHentai plugin yields the following error message:

Error while fetching tags : Error: malformed JSON string, neither tag, array, object, number, string or atom, at character > offset 0 (before "(end of string)") at /usr/local/share/perl5/site_perl/Mojo/JSON.pm line 31.

Sending ping commands from the CLI of the container work towards IPv4 addresses and hostnames as well - first I though hostname resolution is somehow not working, but that doesn't seem to be the case.

Application log

[2022-07-03 12:13:14] [nHentai] [debug] Skipping search and using gallery 388859 from oneshot args [2022-07-03 12:13:14] [nHentai] [debug] Detected nHentai gallery id is 388859 [2022-07-03 12:13:14] [nHentai] [debug] Tentative JSON: {}

Screenshots
Screenshot 2022-07-03 at 14 09 14

Did anyone else experience something similar? Other Docker containers work fine in both environments, so I'm at a bit of a loss here where to continue.

doublewelp commented 2 years ago

Did you configure the nHentai CF Bypass values in your Plugin Configuration? Do you get Cloudflare loading pages when visiting either website?

Pheromir commented 2 years ago

My guess is that it is a problem with ne new alpine baseimage, had the same problem until i built an own image with the old baseimage

drummingdemon commented 2 years ago

Thanks all, it seems that somehow my plugins are outdated and the nHentai CF Bypass plugin is missing from my instance even though i've pulled the :latest image today and created the container from scratch.

Also the nHentai Metadata plugin was one version behind the current at 1.7.1 - so adding them by hand via upload finally fixed it and tags are coming in, when editing an archive manually.

However, for batch operations with a timeout of 5 seconds, I get the following error:

Error while processing ID 81a922237d4cca2e4911ad38a97464f3b0e5b0b4 (Invalid argument at /home/koyomi/lanraragi/script/../lib/LANraragi/Plugin/Metadata/nHentai.pm line 102. )

Any ideas with that? Much appreciated!

doublewelp commented 2 years ago

It still sounds like Cloudflare. Do you get an error on the first attempt, or does it work on occasion? Line 102 is within the get_gallery_dom_by_title sub. I'd try changing the plugin to get it to log the variables inside. You can use "$logger->debug();" to output the variables inside it to try and figure out exactly what's being processed.

Difegue commented 2 years ago

Invalid Argument errors can also come from the Alpine bug @Pheromir mentioned, so I'd recommend trying to build an image with https://github.com/Difegue/LANraragi/blob/dev/tools/build/docker/Dockerfile-legacy to see if that improves things for you!

z0rc commented 2 years ago

I can confirm same kind of errors when using chaika and fakku metadata plugins, same-ish environment of synology with docker. So it isn't a Cloudflare.

Error: Invalid argument at /home/koyomi/lanraragi/script/../lib/LANraragi/Plugin/Metadata/Fakku.pm line 134.
Error: Invalid argument at /home/koyomi/lanraragi/script/../lib/LANraragi/Plugin/Metadata/Chaika.pm line 143.