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

Issue running inside docker. #211

Open
jose920405 opened this issue Sep 6, 2024 · 2 comments
Open

Issue running inside docker. #211

jose920405 opened this issue Sep 6, 2024 · 2 comments

Comments

@jose920405
Copy link

jose920405 commented Sep 6, 2024

The installation was straightforward and worked perfectly in OSX locally.

But when I deployed the server with docker I faced a weird issue with a couple of PDFs. At this point I'm really sure the pdfs had something broken internally, but they worked fine locally.

The error that occurred with those specific pdfs was:

"Error: Command failed: gm identify: \"gs\" \"-q\" \"-dBATCH\" \"-dSAFER\" \"-dMaxBitmap=50000000\" \"-dNOPAUSE\" \"-sDEVICE=ppmraw\" \"-dTextAlphaBits=4\" \"-dGraphicsAlphaBits=4\" \"-r72x72\" \"-sOutputFile=/tmp/gmIM7zmt\" \"--\" \"/tmp/gmxMi4QX\" \"-c\" \"quit\" (child process quit due to signal 4).",
                        "gm identify: Postscript delegate failed (/tmp/gm7QV5mP).",
                        "gm identify: Request did not return an image.",
                        "",
                        "    at ChildProcess.onExit (/usr/src/app/node_modules/gm/lib/command.js:318:17)",
                        "    at ChildProcess.emit (node:events:514:28)",
                        "    at ChildProcess.emit (node:domain:488:12)",
                        "    at maybeClose (node:internal/child_process:1105:16)",
                        "    at ChildProcess._handle.onexit (node:internal/child_process:305:5)"

The question is:

Why did it work locally even with the broken PDF but not in docker? It's like local has the ability to work with broken PDFs, but inside docker it doesn't.

I think this issue could be related to this one -> #205

UPDATE

I used a different module and found out that those PDFS had a transparent background in common. The new library was able to generate the IMG even with the transparent BG. Maybe this helps when trying to replicate the issue.

@mehamednews
Copy link

getting the same error

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

3 participants
@jose920405 @mehamednews and others