Build times out with no apparent reason

Out of the blue, builds stopped working for my project: https://travis-ci.com/revolter/fastlane-plugin-icon_versioning

What could be the issue?

I know even less about your code than you do. Add/enable some verbose/diagnostic output to get an idea of what the program is doing.

It works locally, so it’s a bug of Travis CI.

I tried cloning your repo, checking out v1.3.1, running bundle install and bundle exec rake on a fresh Docker image. It similarly hangs.

If it works for your local machine, it is often a sign that your environment has something that CI does not.


Now, more to your issue.

In this hung state, aborting with ^C does not inform much more.

However, if I run bundle exec rspec instead and abort, I get:

travis@5e56b13a3919:~/revolter/fastlane-plugin-icon_versioning$ bundle exec rspec

Fastlane::Actions::IconVersioningAction
  #run
^C
RSpec is shutting down and will print the summary report... Interrupt again to force quit.
    prints a deprecation message (FAILED - 1)

Failures:

  1) Fastlane::Actions::IconVersioningAction#run prints a deprecation message
     Failure/Error:
       MiniMagick::Tool::Convert.new do |convert|
         convert << '-background' << 'none'
         convert << '-size' << "#{image_width - (text_left_margin + text_right_margin)}x#{band_height - (text_top_margin + text_bottom_margin)}"
         convert << '-fill' << @text_color
         convert << '-gravity' << 'center'
         # using label instead of caption prevents wrapping long lines
         convert << "label:#{@text}"
         convert << text_icon_path
       end

     MiniMagick::Error:
       `convert -background none -size 264.0x114.0 -fill white -gravity center label:test /home/travis/revolter/fastlane-plugin-icon_versioning/spec/fixtures/Valid-Versioned.appiconset/fastlane_text.png` failed with error:
       convert: unable to read font `(null)' @ error/annotate.c/RenderFreetype/1127.
       convert: not authorized `/tmp/magick-2301ZxYzvpxypTPI' @ error/constitute.c/ReadImage/412.
       convert: unable to read font `(null)' @ error/annotate.c/RenderFreetype/1127.
       convert: not authorized `/tmp/magick-23015ttmLMyBslvs' @ error/constitute.c/ReadImage/412.
       convert: unable to read font `(null)' @ error/annotate.c/RenderFreetype/1127.
       convert: not authorized `/tmp/magick-2301jdzknSJokQac' @ error/constitute.c/ReadImage/412.
⋮
       convert: not authorized `/tmp/magick-2301zuw6EmnCKdvZ' @ error/constitute.c/ReadImage/412.
       convert: unable to read font `(null)' @ error/annotate.c/RenderFreetype/1127.
       convert: not authorized `/tmp/magick-2301vY5ONF6tj7S4' @ error/constitute.c/ReadImage/412.
       convert: unable to read font `(null)' @ error/annotate.c/RenderFreetype/1127.
       convert: not authorized `/tmp/magick-2301hxPQ0an7b5ga' @ error/constitute.c/ReadImage/412.
       convert: unable to read font `(null)' @ error/annotate.c/RenderFreetype/1127.
       convert: not authorized `/tmp/magick-2301ty8U9BSfq5Ef' @ error/constitute.c/ReadImage/412.
       convert: unable to read font `(null)' @ error/annotate.c/RenderFreetype/1127.
       convert: not authorized `/tmp/magick-2301vDpU_p3DG92k' @ error/constitute.c/ReadImage/412.
       convert: unable to read font `(null)' @ error/annotate.c/RenderFreetype/1127.
       convert: not authorized `/tmp/magick-2301PxynK2Ukxhrq' @ error/constitute.c/ReadImage/412.
     # /home/travis/.rvm/gems/ruby-2.5.3/gems/mini_magick-4.9.5/lib/mini_magick/shell.rb:17:in `run'
     # /home/travis/.rvm/gems/ruby-2.5.3/gems/mini_magick-4.9.5/lib/mini_magick/tool.rb:90:in `call'
     # /home/travis/.rvm/gems/ruby-2.5.3/gems/mini_magick-4.9.5/lib/mini_magick/tool.rb:38:in `new'
     # ./lib/fastlane/plugin/icon_versioning/helper/version_icon_helper.rb:135:in `version_icon'
     # ./lib/fastlane/plugin/icon_versioning/helper/version_icon_helper.rb:72:in `block in run'
     # ./lib/fastlane/plugin/icon_versioning/helper/version_icon_helper.rb:53:in `each'
     # ./lib/fastlane/plugin/icon_versioning/helper/version_icon_helper.rb:53:in `run'
     # ./lib/fastlane/plugin/icon_versioning/actions/version_icon_action.rb:10:in `run'
     # ./lib/fastlane/plugin/icon_versioning/actions/icon_versioning_action.rb:10:in `run'
     # ./spec/icon_versioning_action_spec.rb:25:in `block (3 levels) in <top (required)>'

Finished in 8.93 seconds (files took 2.2 seconds to load)
1 example, 1 failure

Failed examples:

rspec ./spec/icon_versioning_action_spec.rb:15 # Fastlane::Actions::IconVersioningAction#run prints a deprecation message

Coverage report generated for RSpec to /home/travis/revolter/fastlane-plugin-icon_versioning/coverage. 188 / 315 LOC (59.68%) covered.
[Coveralls] Submitting with config:
{
  "environment": {
    "pwd": "/home/travis/revolter/fastlane-plugin-icon_versioning",
    "rails_root": null,
    "simplecov_root": "/home/travis/revolter/fastlane-plugin-icon_versioning",
    "gem_version": "0.7.2",
    "travis_job_id": null,
    "travis_pull_request": null
  },
  "git": {
    "head": {
      "id": "8fbe0650ca39d7d78fd790fc18c6bc69f07e5f19",
      "author_name": "Iulian Onofrei",
      "author_email": "iulian.onofrei@yahoo.com",
      "committer_name": "Iulian Onofrei",
      "committer_email": "iulian.onofrei@yahoo.com",
      "message": "Bumped version to 1.3.1"
    },
    "branch": "(no branch)",
    "remotes": [
      {
        "name": "origin",
        "url": "https://github.com/revolter/fastlane-plugin-icon_versioning.git"
      }
    ]
  },
  "service_job_id": null,
  "service_name": "travis-ci"
}
[Coveralls] Submitting to https://coveralls.io/api/v1
Coveralls encountered an exception:
RestClient::UnprocessableEntity
422 Unprocessable Entity
/home/travis/.rvm/gems/ruby-2.5.3/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:in `return!'
/home/travis/.rvm/gems/ruby-2.5.3/gems/rest-client-1.6.7/lib/restclient/request.rb:230:in `process_result'
/home/travis/.rvm/gems/ruby-2.5.3/gems/rest-client-1.6.7/lib/restclient/request.rb:178:in `block in transmit'
/home/travis/.rvm/rubies/ruby-2.5.3/lib/ruby/2.5.0/net/http.rb:910:in `start'
/home/travis/.rvm/gems/ruby-2.5.3/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit'
/home/travis/.rvm/gems/ruby-2.5.3/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
/home/travis/.rvm/gems/ruby-2.5.3/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
/home/travis/.rvm/gems/ruby-2.5.3/gems/coveralls-0.7.2/lib/coveralls/api.rb:24:in `post_json'
/home/travis/.rvm/gems/ruby-2.5.3/gems/coveralls-0.7.2/lib/coveralls/simplecov.rb:72:in `format'
/home/travis/.rvm/gems/ruby-2.5.3/gems/simplecov-0.16.1/lib/simplecov/formatter/multi_formatter.rb:10:in `block in format'
/home/travis/.rvm/gems/ruby-2.5.3/gems/simplecov-0.16.1/lib/simplecov/formatter/multi_formatter.rb:8:in `map'
/home/travis/.rvm/gems/ruby-2.5.3/gems/simplecov-0.16.1/lib/simplecov/formatter/multi_formatter.rb:8:in `format'
/home/travis/.rvm/gems/ruby-2.5.3/gems/simplecov-0.16.1/lib/simplecov/result.rb:48:in `format!'
/home/travis/.rvm/gems/ruby-2.5.3/gems/simplecov-0.16.1/lib/simplecov/configuration.rb:182:in `block in at_exit'
/home/travis/.rvm/gems/ruby-2.5.3/gems/simplecov-0.16.1/lib/simplecov.rb:200:in `run_exit_tasks!'
/home/travis/.rvm/gems/ruby-2.5.3/gems/simplecov-0.16.1/lib/simplecov/defaults.rb:27:in `block in <top (required)>'
{"message":"Couldn't find a repository matching this job.","error":true}

covert complains about the failure for a lot longer if I wait longer before aborting, so I’ll assume that your issue is this: that convert does not recover from this error gracefully and try in vain ad infinitum.

I hope this helps.

1 Like

Wow, thank you very much for taking your time for this! I’ll look into it.

I think that it was related to Travis updated something, or maybe mini_magick. I don’t know. But adding this:

before_install:
   - sudo apt-get update
   - sudo apt-get install -y ghostscript

fixed it.