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

gm identify: Request did not return an image (node alpine docker) #665

Open
olalonde opened this issue Jun 16, 2017 · 2 comments
Open

gm identify: Request did not return an image (node alpine docker) #665

olalonde opened this issue Jun 16, 2017 · 2 comments

Comments

@olalonde
Copy link

After switching to an alpine based image in docker, I'm getting this error:

Error: Command failed: gm identify: Unable to open file (/app/gmiv8vvd) [Invalidargument].
  gm identify: Request did not return an image.

Posting here in case anyone faced that issue before.

@Yalhu
Copy link

Yalhu commented Mar 4, 2019

haha. Here is error:

cropImg err: { Error: Command failed: gm identify: Insufficient image data in file (image-temp.jpg).
gm identify: Request did not return an image.

cropImg err: { Error: Command failed: gm identify: Empty input file (image-temp.jpg).
gm identify: Request did not return an image.

cropImg err: { Error: Command failed: gm identify: Not a JPEG file: starts with 0x00 0x00 (image-temp.jpg).
gm identify: Request did not return an image.

I try to crop lots of imgs, don't know how to track the debugger.

@kirito286
Copy link

Intermittent Error Message:

Error: Command failed: gm identify: Unable to open file (/tmp/gm4yFeyx) [Invalid argument].
gm identify: Request did not return an image.

Code Snippet:

const convertPDFToImages = async (
    pdfFile: Express.Multer.File
) => {
    const options = {
        density: 300,
        width: 1200,
        height: 1800,
        format: 'png',
        savePath: pdfFile.destination,
        saveFilename: pdfFile.filename.replace(/\.[^/.]+$/, ''),
    };    
    const convert = fromPath(pdfFile.path, options);

    try {
        const images = await convert.bulk(-1);
        console.log('images==>', images);
    } catch (error) {
        console.error('Error during conversion:', error);
    }
}

The issue occurs intermittently during the conversion of a PDF file to PNG images using GraphicsMagick (gm) within a Node.js environment. The error message suggests a problem with opening the temporary file (/tmp/gm4yFeyx) and indicates that the identify request did not return an image.

Environment Details:

  • Node Version: node:14.5.0-alpine
  • GraphicsMagick Version: GraphicsMagick 1.3.35 2020-02-23 Q16
  • Ghostscript Version: 9.50

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