Build fails with: "convert: delegate failed `"cwebp" -quiet", ImageMagick issue?

Running into an error when building my site, works fine locally — similar error was found here:

But that solution isn’t possible/working for me, if anyone would help me figure this out I’d really appreciate it.

1:38:14 AM: Build ready to start
1:38:18 AM: build-image version: 9cade8af58c2cf3a17a1e9433d2e979149488837
1:38:18 AM: build-image tag: v3.3.5
1:38:18 AM: buildbot version: 6067c60f3bc043bb6b9ee9b57c85b10029c65bfd
1:38:18 AM: Fetching cached dependencies
1:38:19 AM: Starting to download cache of 622.5MB
1:38:21 AM: Finished downloading cache in 2.719539505s
1:38:21 AM: Starting to extract cache
1:38:31 AM: Finished extracting cache in 9.738197065s
1:38:31 AM: Finished fetching cache in 12.984016951s
1:38:31 AM: Starting to prepare the repo for build
1:38:32 AM: Preparing Git Reference refs/heads/master
1:38:38 AM: Found Netlify configuration file netlify.toml in site root
1:38:38 AM: Found Netlify configuration file(s). Overriding site configuration
1:38:38 AM: Starting build script
1:38:38 AM: Installing dependencies
1:38:39 AM: Started restoring cached node version
1:38:41 AM: Finished restoring cached node version
1:38:42 AM: v10.18.1 is already installed.
1:38:44 AM: Now using node v10.18.1 (npm v6.13.4)
1:38:44 AM: Attempting ruby version 2.6.2, read from environment
1:38:46 AM: Using ruby version 2.6.2
1:38:46 AM: Using bundler version 1.17.2 from Gemfile.lock
1:38:46 AM: Using PHP version 5.6
1:38:46 AM: Started restoring cached ruby gems
1:38:46 AM: Finished restoring cached ruby gems
1:38:46 AM: Installing gem bundle
1:38:47 AM: The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
1:38:49 AM: Fetching gem metadata from https://rubygems.org/
1:38:49 AM: .
1:38:50 AM: .
1:38:50 AM: .
1:38:50 AM: .
1:38:50 AM: .
1:38:50 AM: .
1:38:50 AM: .
1:38:50 AM: .
1:38:50 AM: .
1:38:50 AM: .
1:38:50 AM: .
1:38:51 AM: Using public_suffix 3.0.3
1:38:51 AM: Using addressable 2.5.2
1:38:51 AM: Using execjs 2.7.0
1:38:51 AM: Using autoprefixer-rails 9.7.3
1:38:51 AM: Using bundler 1.17.2
1:38:51 AM: Using colorator 1.1.0
1:38:51 AM: Using concurrent-ruby 1.1.4
1:38:51 AM: Using eventmachine 1.2.7
1:38:51 AM: Using http_parser.rb 0.6.0
1:38:51 AM: Using em-websocket 0.5.1
1:38:51 AM: Using fastimage 2.1.7
1:38:51 AM: Using ffi 1.9.25
1:38:51 AM: Using forwardable-extended 2.6.0
1:38:51 AM: Using i18n 0.9.5
1:38:51 AM: Using rb-fsevent 0.10.3
1:38:51 AM: Using rb-inotify 0.10.0
1:38:51 AM: Using sass-listen 4.0.0
1:38:51 AM: Using sass 3.7.2
1:38:51 AM: Using jekyll-sass-converter 1.5.2
1:38:51 AM: Using ruby_dep 1.5.0
1:38:51 AM: Using listen 3.1.5
1:38:51 AM: Using jekyll-watch 2.1.2
1:38:51 AM: Using kramdown 1.17.0
1:38:51 AM: Using liquid 4.0.1
1:38:51 AM: Using mercenary 0.3.6
1:38:51 AM: Using pathutil 0.16.2
1:38:51 AM: Using rouge 3.3.0
1:38:51 AM: Using safe_yaml 1.0.4
1:38:51 AM: Using jekyll 3.8.5
1:38:51 AM: Using jekyll-image-size 1.2.1
1:38:51 AM: Using jekyll-paginate-v2 2.0.0
1:38:51 AM: Using jekyll-seo-tag 2.6.1
1:38:51 AM: Fetching mime-types-data 3.2019.1009
1:38:51 AM: Installing mime-types-data 3.2019.1009
1:38:51 AM: Fetching mime-types 3.3.1
1:38:51 AM: Installing mime-types 3.3.1
1:38:51 AM: Fetching mini_magick 4.10.1
1:38:51 AM: Installing mini_magick 4.10.1
1:38:51 AM: Fetching objective_elements 1.1.2
1:38:51 AM: Installing objective_elements 1.1.2
1:38:51 AM: Fetching jekyll_picture_tag 1.6.0
1:38:51 AM: Installing jekyll_picture_tag 1.6.0
1:38:52 AM: Using octopress-autoprefixer 2.0.1
1:38:52 AM: Bundle complete! 7 Gemfile dependencies, 38 gems now installed.
1:38:52 AM: Bundled gems are installed into `/opt/build/cache/bundle`
1:38:52 AM: Gem bundle installed
1:38:52 AM: Started restoring cached node modules
1:38:52 AM: Finished restoring cached node modules
1:38:52 AM: Started restoring cached go cache
1:38:52 AM: Finished restoring cached go cache
1:38:52 AM: unset GOOS;
1:38:52 AM: unset GOARCH;
1:38:52 AM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
1:38:52 AM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
1:38:52 AM: go version >&2;
1:38:52 AM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';
1:38:52 AM: go version go1.12 linux/amd64
1:38:52 AM: Installing missing commands
1:38:52 AM: Verify run directory
1:38:52 AM: Executing user command: jekyll build
1:38:54 AM: Configuration file: /opt/build/repo/_config.yml
1:38:54 AM:             Source: /opt/build/repo
1:38:54 AM:        Destination: /opt/build/repo/_site
1:38:54 AM:  Incremental build: disabled. Enable with --incremental
1:38:54 AM:       Generating...
1:38:54 AM:          AutoPages: tags pages are disabled/not configured in site.config.
1:38:54 AM:          AutoPages: Generating categories pages
1:38:54 AM:          AutoPages: collections pages are disabled/not configured in site.config.
1:38:54 AM:         Pagination: Complete, processed 14 pagination page(s)
1:38:54 AM: Generating new image file: assets/uploads/35_McKee_22Veiws_10-200-0c1ef9.webp
1:38:58 AM:   Liquid Exception: `convert /tmp/mini_magick20200121-1276-1ezw0gs.jpg[0] /tmp/mini_magick20200121-1276-8a1d02.webp` failed with error: convert: delegate failed `"cwebp" -quiet -q %Q "%i" -o "%o"' @ error/delegate.c/InvokeDelegate/1310. in /_layouts/project.html
1:38:58 AM: jekyll 3.8.5 | Error:  `convert /tmp/mini_magick20200121-1276-1ezw0gs.jpg[0] /tmp/mini_magick20200121-1276-8a1d02.webp` failed with error:
1:38:58 AM: convert: delegate failed `"cwebp" -quiet -q %Q "%i" -o "%o"' @ error/delegate.c/InvokeDelegate/1310.
1:38:58 AM: Skipping functions preparation step: no functions directory set
1:38:58 AM: Caching artifacts
1:38:58 AM: Started saving ruby gems
1:38:58 AM: Finished saving ruby gems
1:38:58 AM: Started saving node modules
1:38:58 AM: Finished saving node modules
1:38:58 AM: Started saving pip cache
1:38:58 AM: Finished saving pip cache
1:38:58 AM: Started saving emacs cask dependencies
1:38:58 AM: Finished saving emacs cask dependencies
1:38:58 AM: Started saving maven dependencies
1:38:58 AM: Finished saving maven dependencies
1:38:58 AM: Started saving boot dependencies
1:38:58 AM: Finished saving boot dependencies
1:38:58 AM: Started saving go dependencies
1:38:58 AM: failed during stage 'building site': Build script returned non-zero exit code: 1
1:38:58 AM: Finished saving go dependencies
1:38:58 AM: Error running command: Build script returned non-zero exit code: 1
1:38:58 AM: Failing build: Failed to build site
1:38:58 AM: Finished processing build request in 40.085748108s

This could be related to bundler, see:

and

Try removing the ending lines BUNDLED WITH (version number) from your Gemfile.lock before commiting your code again to Netlify.

1 Like

Hi YJPL,

Thanks for your reply — I’ve tried removing the ‘BUNDLED WITH’ and the solutions in those topics but that doesn’t seem to work, I am using “jekyll_picture_tag” to make responsive images on the site, as mentioned in the initial topic this works fine on my local machine but fails in Netlify:

11:39:17 AM:         Pagination: Complete, processed 14 pagination page(s)
11:39:17 AM: Generating new image file: assets/uploads/35_McKee_22Veiws_10-200-0c1ef9.webp
11:39:18 AM:   Liquid Exception: `convert /tmp/mini_magick20200121-1273-lu1ukp.jpg[0] /tmp/mini_magick20200121-1273-1m1hqr4.webp` failed with error: convert: delegate failed `"cwebp" -quiet -q %Q "%i" -o "%o"' @ error/delegate.c/InvokeDelegate/1310. in /_layouts/project.html
11:39:18 AM: jekyll 3.8.5 | Error:  `convert /tmp/mini_magick20200121-1273-lu1ukp.jpg[0] /tmp/mini_magick20200121-1273-1m1hqr4.webp` failed with error:
11:39:18 AM: convert: delegate failed `"cwebp" -quiet -q %Q "%i" -o "%o"' @ error/delegate.c/InvokeDelegate/1310.
11:39:18 AM: Skipping functions preparation step: no functions directory set

The origin of those errors can be hard to pinpoint. It looks like some dependencies versions are not agreeing to work with each others.

Your site works locally so that’s good. You could try updating Bundler and Jekyll. I use the same plugin as you do, with Jekyll 4.0.0. My site’s earlier builds show errors similar to yours. Once it was solved by updating a specific npm package, but another step that helped was providing Netlify with a .ruby-version file. Now everything builds fine on the Netlify server but it won’t if Bundler version is specified in Gemfile.lock.

1 Like

thanks for helping out @YJPL!

@dust-io - if this doesn’t help, let us know, and we’ll take another look.

@YJPL @perry

Updating Bundler didn’t work, I’m just going to attempt the upgrade from Jekyll 3 to 4 and see if that resolves it. The ruby-version file didn’t seem to fix the problem either.

Will update here as soon as I have news, thank-you for your help @YJPL

@perry unfortunately upgrading to jekyll 4 didn’t help either —

8:18:50 PM: Generating new image file: assets/uploads/70_Yolo_8-200-a014e8.webp
8:18:51 PM:   Liquid Exception: `convert /tmp/mini_magick20200121-1923-1lgwz85.jpg[0] /tmp/mini_magick20200121-1923-13bwn7d.webp` failed with error: convert: delegate failed `"cwebp" -quiet -q %Q "%i" -o "%o"' @ error/delegate.c/InvokeDelegate/1310. in /_layouts/project.html
8:18:51 PM:                     ------------------------------------------------
8:18:51 PM:       Jekyll 4.0.0   Please append `--trace` to the `build` command 
8:18:51 PM:                      for any additional information or backtrace. 
8:18:51 PM:                     ------------------------------------------------
8:18:51 PM: Skipping functions preparation step: no functions directory set

if anyone else has any ideas that’d be great, I can’t seem to figure it out.

Edit: Looks like it has something to do with this too: https://github.com/netlify/build-image/issues/157

@dust-io Look, I did another test today and indeed my site gets the same error fails to build after changing Netlify’s Build & deploy settings to Ubuntu Xenial 16.04 (default):

failed with error: convert: delegate failed `"cwebp" -quiet -q %Q "%i" -o "%o"' @ error/delegate.c/InvokeDelegate/1310

The entire site builds fine with Ubuntu Trusty 14.04 (Legacy build image for older sites) selected in Build image selection.

@dust-io @perry Not able to explain why this is, but I hope this is useful.

Hi @YJPL thankyou for pointing this out — the build runs fine on this image, well… apart from the fact it times out now but that’s a different issue. Thanks both for your help.

2 Likes