Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thrown in /rfc2epub on line 270 using docker example #8

Open
luckyunlock opened this issue Apr 3, 2023 · 4 comments
Open

thrown in /rfc2epub on line 270 using docker example #8

luckyunlock opened this issue Apr 3, 2023 · 4 comments

Comments

@luckyunlock
Copy link

Hi, running your docker example script I'm receiving the following error message. Can you please give me a hint on what could be the issue?

Warning: DOMDocument::loadHTML(): Empty string supplied as input in /rfc2epub on line 250

Fatal error: Uncaught Error: Call to a member function getElementsByTagName() on null in /rfc2epub:270
Stack trace:
#0 {main}
  thrown in /rfc2epub on line 270

Many thanks,
A.

@aichingm
Copy link
Owner

aichingm commented Apr 4, 2023

Hey,

I'm currently on vacation and only have my phone with me. I will look into this next week.

BR Mario

@aichingm
Copy link
Owner

aichingm commented Apr 14, 2023

Hi,

I just tried to convert rfc 6749 and it worked without any issue. Could you supply me with the command you executed and the number of the rfc you tried to convert?

Did you run the script directly or via docker?

@luckyunlock
Copy link
Author

Hi Mario and thanks for your kind reply.

Down below I pasted the full process I have done using Docker version 20.10.22 on a Windows 10 machine.

Empty string supplied as input in /rfc2epub on line 250 seems to be the main issue, the RFC HTML response might be blocked by some proxy resulting on an empty-string?

Thank you in advance,
Andrea

C:\Progetti\rfc2epub-master>docker --version
Docker version 20.10.22, build 3a2c30b

C:\Progetti\rfc2epub-master>docker build . --tag rfc2epub
[+] Building 7.2s (8/8) FINISHED
 => [internal] load build definition from Dockerfile                                                               0.3s
 => => transferring dockerfile: 211B                                                                               0.1s
 => [internal] load .dockerignore                                                                                  0.2s
 => => transferring context: 2B                                                                                    0.0s
 => [internal] load metadata for docker.io/library/php:7.2-alpine                                                  5.5s
 => [1/3] FROM docker.io/library/php:7.2-alpine@sha256:2eb165856ea5cbb2a7dd916d7e2a74ec9db1c5d1f5bd3871f50b0fe0a3  0.0s
 => [internal] load build context                                                                                  0.8s
 => => transferring context: 302.41kB                                                                              0.7s
 => CACHED [2/3] RUN apk add --no-cache       libzip-dev       zip       tidyhtml-dev     && docker-php-ext-insta  0.0s
 => CACHED [3/3] COPY . .                                                                                          0.0s
 => exporting to image                                                                                             0.1s
 => => exporting layers                                                                                            0.0s
 => => writing image sha256:0559c6275e3374f48f2e84867d25709ff20c13af9ce794de149031172f86fd30                       0.0s
 => => naming to docker.io/library/rfc2epub                                                                        0.0s

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them

C:\Progetti\rfc2epub-master>mkdir output

C:\Progetti\rfc2epub-master>docker run -it -v ./output:/output --rm rfc2epub 6749 /output/6749.epub

Warning: DOMDocument::loadHTML(): Empty string supplied as input in /rfc2epub on line 250

Fatal error: Uncaught Error: Call to a member function getElementsByTagName() on null in /rfc2epub:270
Stack trace:
#0 {main}
  thrown in /rfc2epub on line 270

@aichingm
Copy link
Owner

aichingm commented Apr 14, 2023

The url where the rfc is downloaded from is: https://datatracker.ietf.org/doc/html/rfc6749.html could you try to fetch it via curl or your browser just to make sure that the connection works?

I pushed a new version which prints some error messages in case no data was received. You may want to try the new version and check if it gives you a error message!?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants