NodeJS script problem executing external program


#1

Hi,

We’ve created server side script using NodeJS in DreamFactory 2.2.0 which resizes images. In order to achieve it, we use the node-thumbnail library, which in turn uses Imagemagick.

We’ve installed Imagemagick via apt and we’ve verified that the script works properly when called manually from command line. Nevertheless it seems Node can’t spawn properly the Imagemagick program when running in DreamFactory. It’s like the program wasn’t completely loaded.
This is the error message on the console:

Error: Command failed: convert.im6: no decode delegate for this image format `/home/bitnami/apps/dreamfactory/htdocs/storage/app/thumbs/197-1479816022307-585.jpg' @ error/constitute.c/ReadImage/544.
convert.im6: no images defined `/home/bitnami/apps/dreamfactory/htdocs/storage/app/thumbs/197-1479816022307-585_thumb.jpg' @ error/convert.c/ConvertImageCommand/3044.

    at ChildProcess.<anonymous> (/opt/bitnami/apps/dreamfactory/htdocs/node_modules/node-thumbnail/node_modules/imagemagick/imagemagick.js:88:15)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) timedOut: false, killed: false, code: 1, signal: null }

convert.im6: no decode delegate for this image format `/home/bitnami/apps/dreamfactory/htdocs/storage/app/thumbs/197-1479816022307-585.jpg' @ error/constitute.c/ReadImage/544.
convert.im6: no images defined `/home/bitnami/apps/dreamfactory/htdocs/storage/app/thumbs/197-1479816022307-585_thumb.jpg' @ error/convert.c/ConvertImageCommand/3044.

Is this a known limitation?


#2

Does it do the same thing if you turn off “sandbox” mode (I think that’s what they call it)?


#3

How is the sandbox mode turned off?


#4

Nevermind, I was thinking about V8js.