HazAT / badge

Add a badge to your app icon
MIT License
966 stars 87 forks source link

Fastlane failure with badge #46

Closed AnthonyMDev closed 7 years ago

AnthonyMDev commented 7 years ago

Getting a failure using a fastlane lane with badge

Run `fastlane env` to append the fastlane environment to your issue
/usr/local/lib/ruby/gems/2.3.0/gems/mini_magick-4.5.1/lib/mini_magick/image.rb:204:in `rescue in validate!': [!] `identify /var/folders/4r/d2tshrd541367x4qhrscv8mm0000gn/T/mini_magick20170413-77505-2q8xwh.png20170413-77505-4qigd0` failed with error: (MiniMagick::Invalid)
identify: no decode delegate for this image format `PNG20170413-77505-4QIGD0' @ error/constitute.c/ReadImage/501.

    from /usr/local/lib/ruby/gems/2.3.0/gems/mini_magick-4.5.1/lib/mini_magick/image.rb:202:in `validate!'
    from /usr/local/lib/ruby/gems/2.3.0/gems/mini_magick-4.5.1/lib/mini_magick/image.rb:113:in `block in create'
    from /usr/local/lib/ruby/gems/2.3.0/gems/mini_magick-4.5.1/lib/mini_magick/image.rb:112:in `tap'
    from /usr/local/lib/ruby/gems/2.3.0/gems/mini_magick-4.5.1/lib/mini_magick/image.rb:112:in `create'
    from /usr/local/lib/ruby/gems/2.3.0/gems/mini_magick-4.5.1/lib/mini_magick/image.rb:34:in `read'
    from /usr/local/lib/ruby/gems/2.3.0/gems/mini_magick-4.5.1/lib/mini_magick/image.rb:90:in `block in open'
    from /usr/local/Cellar/ruby/2.3.0/lib/ruby/2.3.0/open-uri.rb:37:in `open'
    from /usr/local/Cellar/ruby/2.3.0/lib/ruby/2.3.0/open-uri.rb:37:in `open'
    from /usr/local/lib/ruby/gems/2.3.0/gems/mini_magick-4.5.1/lib/mini_magick/image.rb:89:in `open'
    from /usr/local/lib/ruby/gems/2.3.0/gems/badge-0.4.1/lib/badge/runner.rb:86:in `add_shield'
    from /usr/local/lib/ruby/gems/2.3.0/gems/badge-0.4.1/lib/badge/runner.rb:63:in `block in run'
    from /usr/local/lib/ruby/gems/2.3.0/gems/badge-0.4.1/lib/badge/runner.rb:52:in `each'
    from /usr/local/lib/ruby/gems/2.3.0/gems/badge-0.4.1/lib/badge/runner.rb:52:in `run'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/actions/badge.rb:19:in `run'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/runner.rb:252:in `block (2 levels) in execute_action'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/runner.rb:230:in `block in execute_action'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/runner.rb:226:in `chdir'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/runner.rb:226:in `execute_action'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/runner.rb:148:in `trigger_action_by_name'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/fast_file.rb:146:in `method_missing'
    from Fastfile:98:in `add_badge'
    from Fastfile:49:in `build_alpha'
    from Fastfile:249:in `block (2 levels) in parsing_binding'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/lane.rb:33:in `call'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/runner.rb:45:in `chdir'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/runner.rb:45:in `execute'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/lane_manager.rb:52:in `cruise_lane'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/command_line_handler.rb:30:in `handle'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/commands_generator.rb:104:in `block (2 levels) in run'
    from /usr/local/lib/ruby/gems/2.3.0/gems/commander-fastlane-4.4.4/lib/commander/command.rb:178:in `call'
    from /usr/local/lib/ruby/gems/2.3.0/gems/commander-fastlane-4.4.4/lib/commander/command.rb:153:in `run'
    from /usr/local/lib/ruby/gems/2.3.0/gems/commander-fastlane-4.4.4/lib/commander/runner.rb:476:in `run_active_command'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:38:in `run!'
    from /usr/local/lib/ruby/gems/2.3.0/gems/commander-fastlane-4.4.4/lib/commander/delegates.rb:15:in `run!'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/commands_generator.rb:303:in `run'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/commands_generator.rb:42:in `start'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/cli_tools_distributor.rb:65:in `take_off'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/bin/fastlane:20:in `<top (required)>'
    from /usr/local/bin/fastlane:23:in `load'
    from /usr/local/bin/fastlane:23:in `<main>'

I then tried updating and that failed ImageMagick. Any ideas?

iMac:Zorts Anthony$ brew install imagemagick
Warning: You are using OS X 10.12.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages.
Error: imagemagick-6.9.3-7 already installed
To install this version, first `brew unlink imagemagick`
iMac:Zorts Anthony$ brew unlink imagemagick
Unlinking /usr/local/Cellar/imagemagick/6.9.3-7... 71 symlinks removed
iMac:Zorts Anthony$ brew install imagemagick
Warning: You are using OS X 10.12.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages.
==> Installing dependencies for imagemagick: libtiff
==> Installing imagemagick dependency: libtiff
==> Downloading http://download.osgeo.org/libtiff/tiff-4.0.6.tar.gz
######################################################################## 100.0%
==> Downloading https://mirrors.ocf.berkeley.edu/debian/pool/main/t/tiff/tiff_4.0.6-1.debian.tar.xz

curl: (22) The requested URL returned error: 404 Not Found
Trying a mirror...
==> Downloading https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/t/tiff/tiff_4.0.6-1.debian.tar.xz

curl: (22) The requested URL returned error: 404 Not Found
Error: Failed to download resource "libtiff--patch"
Download failed: https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/t/tiff/tiff_4.0.6-1.debian.tar.xz
AnthonyMDev commented 7 years ago

I was able to get the latest version of ImageMagick using the answer here. http://stackoverflow.com/questions/7053996/how-do-i-install-imagemagick-with-homebrew

Now I'm getting this error when running my fastlane

/usr/local/lib/ruby/gems/2.3.0/gems/mini_magick-4.5.1/lib/mini_magick/image.rb:204:in `rescue in validate!': [!] `identify /var/folders/4r/d2tshrd541367x4qhrscv8mm0000gn/T/mini_magick20170413-84785-z9b5o0.png` failed with error: (MiniMagick::Invalid)
identify: improper image header `/var/folders/4r/d2tshrd541367x4qhrscv8mm0000gn/T/mini_magick20170413-84785-z9b5o0.png' @ error/png.c/ReadPNGImage/4362.

    from /usr/local/lib/ruby/gems/2.3.0/gems/mini_magick-4.5.1/lib/mini_magick/image.rb:202:in `validate!'
    from /usr/local/lib/ruby/gems/2.3.0/gems/mini_magick-4.5.1/lib/mini_magick/image.rb:113:in `block in create'
    from /usr/local/lib/ruby/gems/2.3.0/gems/mini_magick-4.5.1/lib/mini_magick/image.rb:112:in `tap'
    from /usr/local/lib/ruby/gems/2.3.0/gems/mini_magick-4.5.1/lib/mini_magick/image.rb:112:in `create'
    from /usr/local/lib/ruby/gems/2.3.0/gems/mini_magick-4.5.1/lib/mini_magick/image.rb:34:in `read'
    from /usr/local/lib/ruby/gems/2.3.0/gems/mini_magick-4.5.1/lib/mini_magick/image.rb:90:in `block in open'
    from /usr/local/Cellar/ruby/2.3.0/lib/ruby/2.3.0/open-uri.rb:37:in `open'
    from /usr/local/Cellar/ruby/2.3.0/lib/ruby/2.3.0/open-uri.rb:37:in `open'
    from /usr/local/lib/ruby/gems/2.3.0/gems/mini_magick-4.5.1/lib/mini_magick/image.rb:89:in `open'
    from /usr/local/lib/ruby/gems/2.3.0/gems/badge-0.8.4/lib/badge/runner.rb:106:in `add_shield'
    from /usr/local/lib/ruby/gems/2.3.0/gems/badge-0.8.4/lib/badge/runner.rb:66:in `block in run'
    from /usr/local/lib/ruby/gems/2.3.0/gems/badge-0.8.4/lib/badge/runner.rb:55:in `each'
    from /usr/local/lib/ruby/gems/2.3.0/gems/badge-0.8.4/lib/badge/runner.rb:55:in `run'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/actions/badge.rb:19:in `run'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/runner.rb:252:in `block (2 levels) in execute_action'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/runner.rb:230:in `block in execute_action'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/runner.rb:226:in `chdir'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/runner.rb:226:in `execute_action'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/runner.rb:148:in `trigger_action_by_name'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/fast_file.rb:146:in `method_missing'
    from Fastfile:98:in `add_badge'
    from Fastfile:49:in `build_alpha'
    from Fastfile:249:in `block (2 levels) in parsing_binding'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/lane.rb:33:in `call'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/runner.rb:45:in `chdir'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/runner.rb:45:in `execute'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/lane_manager.rb:52:in `cruise_lane'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/command_line_handler.rb:30:in `handle'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/commands_generator.rb:104:in `block (2 levels) in run'
    from /usr/local/lib/ruby/gems/2.3.0/gems/commander-fastlane-4.4.4/lib/commander/command.rb:178:in `call'
    from /usr/local/lib/ruby/gems/2.3.0/gems/commander-fastlane-4.4.4/lib/commander/command.rb:153:in `run'
    from /usr/local/lib/ruby/gems/2.3.0/gems/commander-fastlane-4.4.4/lib/commander/runner.rb:476:in `run_active_command'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:38:in `run!'
    from /usr/local/lib/ruby/gems/2.3.0/gems/commander-fastlane-4.4.4/lib/commander/delegates.rb:15:in `run!'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/commands_generator.rb:303:in `run'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/commands_generator.rb:42:in `start'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/fastlane/lib/fastlane/cli_tools_distributor.rb:65:in `take_off'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.26.1/bin/fastlane:20:in `<top (required)>'
    from /usr/local/bin/fastlane:23:in `load'
    from /usr/local/bin/fastlane:23:in `<main>'
Austinate commented 7 years ago

Same output as above for me ^

Austinate commented 7 years ago

@AnthonyMDev i was able to fix issue by manually installing "imagemagick@6" via Homebrew

kjian commented 7 years ago

same here

AnthonyMDev commented 7 years ago

Thanks. I got it working!

kschrage commented 7 years ago

Had the same problem ("no decode delegate for this image format `PNG..."). Tracked it down to a shields.io-response of 205 bytes (instead of roughly 3k) within "load_shield".

Sadly I can't reproduce it anymore right now. Would be interesting to see what those 205 bytes are about.

kschrage commented 7 years ago

It happened again. Response from server: <!doctype html>A server error occurred

I have nothing to offer for this request

… but blood, toil, tears and sweat.

And trying again later.

JanBrinker commented 7 years ago

Had the same issue just now. I somehow suspect I had this issue because of restoring my Mac from Time Machine and this doing bad things to Homebrew and ImageMagick.

Anyway, updating Imagemagick did not simply work for me. However: removing all Imagemagick versions from Homebrew including its components and then reinstalling imagemagick@6 and then installing graphicsmagick as well did the trick!

acecilia commented 7 years ago

@JanBrinker I can not make it work with any solution explained in this issue :( Did any of you get it somehow? Thanks!

acecilia commented 7 years ago

@JanBrinker finally made it work by doing brew install ruby from brew (which updated my ruby version), reinstalling fastlane, reopening CMD session and finally installing brew install imagemagick. The main difference that made it work is updating the ruby version with brew install ruby