metanorma / metanorma-docker

Docker container for running the Metanorma toolchain
https://www.metanorma.com
5 stars 3 forks source link

Docker images not allowing build of PDFs due to missing `npm` #42

Closed ronaldtse closed 4 years ago

ronaldtse commented 5 years ago

We have to fix this soon as PDF generation is now broken in Docker containers.

e.g. https://github.com/CalConnect/csd-transcription-systems/commit/ae74b1172fc991ef59e6cccf289faadf40c9714e/checks

/usr/local/bundle/gems/metanorma-0.3.15/lib/metanorma/output/pdf.rb:14:in ``': No such file or directory - npm (Errno::ENOENT)
1387
    from /usr/local/bundle/gems/metanorma-0.3.15/lib/metanorma/output/pdf.rb:14:in `convert'
1388
    from /usr/local/bundle/gems/isodoc-1.0.3/lib/isodoc/pdf_convert.rb:33:in `convert'
1389
    from /usr/local/bundle/gems/metanorma-csd-1.3.2/lib/metanorma/csd/processor.rb:36:in `output'
1390
CAMOBAP commented 5 years ago

@ronaldtse fixed in https://github.com/metanorma/metanorma-docker/commit/18626eb1f90993d55fb2de47f6acc199d5d546c3

ronaldtse commented 5 years ago

@CAMOBAP795 is the new image built? Can you try in this repo which uses GitHub Actions via Docker? https://github.com/CalConnect/csd-admin-documents

Thanks!

CAMOBAP commented 5 years ago

Not fixed by 18626eb looking for another solution

CAMOBAP commented 5 years ago

https://github.com/metanorma/metanorma-docker/commit/a3c66d493028d93316b0f411cb24e91cb06f152b - fixed

CAMOBAP commented 5 years ago

npm not found fixed, but instability still exists "Navigation failed because browser has disconnected! (RuntimeError)"

ronaldtse commented 5 years ago

https://github.com/GoogleChrome/puppeteer/issues/4679

ronaldtse commented 5 years ago

Seems that it’s a common issue that can be fixed? https://stackoverflow.com/questions/54836746/puppeteer-fails-in-docker-container-browser-has-disconnected

CAMOBAP commented 5 years ago

@ronaldtse I'm not sure that this is right fix because I didn't observe this problem locally (I use docker too) still ivestigating

CAMOBAP commented 5 years ago

The issue have random nature, I have a feeling that https://github.com/GoogleChrome/puppeteer/issues/4911#issuecomment-534781138 will fix this

ronaldtse commented 5 years ago

Ping @CAMOBAP795 we've got a user complaining about this. Any updates?

CAMOBAP commented 5 years ago

CalConnect magically fixed now

At this point, I have only one assumption - broken/buggy chrome binary

This is still my assumption, but I will check it today

CAMOBAP commented 4 years ago

According to last comment, not proven for OSX but maybe that a case for Linux.

I think we should not spent time on it right now So I propose to close this one

@ronaldtse how do you think?