Homebrew-core: travis fails to run after installed

Created on 18 Mar 2020  路  14Comments  路  Source: Homebrew/homebrew-core

  • [x] ran brew update and can still reproduce the problem?
  • [x] ran brew doctor, fixed all issues and can still reproduce the problem?
  • [x] ran brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link?
$ brew gist-logs travis
Error: No logs.
  • [x] if brew gist-logs didn't work: ran brew config and brew doctor and included their output with your issue?
$ brew config
HOMEBREW_VERSION: 2.2.10
ORIGIN: https://github.com/Homebrew/brew
HEAD: 48a1637b24a0c329905a981f4cff547c7fa47943
Last commit: 9 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: d7e7114767e205075e9d0faaac21868bce5e3b1f
Core tap last commit: 16 hours ago
HOMEBREW_PREFIX: /usr/local
CPU: dodeca-core 64-bit kabylake
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
Clang: 11.0 build 1100
Git: 2.25.1 => /usr/local/bin/git
Curl: 7.64.1 => /usr/bin/curl
Java: 13.0.2
macOS: 10.15.3-x86_64
CLT: 11.3.1.0.1.1576735732
Xcode: 11.3.1

$ brew doctor
Your system is ready to brew.

What you were trying to do (and why)

I'm trying to run the travis command and it fails due to an issue inside one of it's dependencies (the gh gem).

The reason I don't file a bug report over at travis is because #51735 changed a lot of dependencies back in time, and I don't feel comfortable tasking the travis devs to fix an issue if newer versions are available.

What happened (include command output)


Command output

$ travis encrypt 0123456789012345678901234567890123456789
/usr/local/Cellar/travis/1.8.11/libexec/gems/faraday-0.9.2/lib/faraday/request/retry.rb:30: warning: constant ::Fixnum is deprecated
undefined method `try' for #
for a full error report, run travis report

$ travis report
System
Ruby: Ruby 2.6.3-p62
Operating System: Mac OS X 10.15.3
RubyGems: RubyGems 3.0.3

CLI
Version: 1.8.11
Plugins: none
Auto-Completion: yes
Last Version Check: 2020-03-18 14:22:04 +0100

Session
API Endpoint: https://api.travis-ci.org/
Logged In: no
Verify SSL: yes
Enterprise: no

Endpoints
org: https://api.travis-ci.org/ (current)

Last Exception
An error occurred running travis encrypt:
NoMethodError: undefined method try' for #<Faraday::Env:0x00007f93020dc950> from /usr/local/Cellar/travis/1.8.11/libexec/gems/gh-0.13.3/lib/gh/remote.rb:71:ingenerate_response'
from /usr/local/Cellar/travis/1.8.11/libexec/gems/gh-0.13.3/lib/gh/wrapper.rb:87:in generate_response' from /usr/local/Cellar/travis/1.8.11/libexec/gems/gh-0.13.3/lib/gh/wrapper.rb:87:ingenerate_response'
from /usr/local/Cellar/travis/1.8.11/libexec/gems/gh-0.13.3/lib/gh/normalizer.rb:8:in generate_response' from /usr/local/Cellar/travis/1.8.11/libexec/gems/gh-0.13.3/lib/gh/wrapper.rb:87:ingenerate_response'
from /usr/local/Cellar/travis/1.8.11/libexec/gems/gh-0.13.3/lib/gh/wrapper.rb:87:in generate_response' from /usr/local/Cellar/travis/1.8.11/libexec/gems/gh-0.13.3/lib/gh/wrapper.rb:87:ingenerate_response'
from /usr/local/Cellar/travis/1.8.11/libexec/gems/gh-0.13.3/lib/gh/wrapper.rb:87:in generate_response' from /usr/local/Cellar/travis/1.8.11/libexec/gems/gh-0.13.3/lib/gh/wrapper.rb:87:ingenerate_response'
from /usr/local/Cellar/travis/1.8.11/libexec/gems/gh-0.13.3/lib/gh/wrapper.rb:87:in generate_response' from /usr/local/Cellar/travis/1.8.11/libexec/gems/gh-0.13.3/lib/gh/parallel.rb:27:ingenerate_response'
from /usr/local/Cellar/travis/1.8.11/libexec/gems/gh-0.13.3/lib/gh/wrapper.rb:87:in generate_response' from /usr/local/Cellar/travis/1.8.11/libexec/gems/gh-0.13.3/lib/gh/remote.rb:88:inrequest'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/forwardable.rb:230:in request' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/forwardable.rb:230:inrequest'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/forwardable.rb:230:in request' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/forwardable.rb:230:inrequest'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/forwardable.rb:230:in request' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/forwardable.rb:230:inrequest'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/forwardable.rb:230:in request' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/forwardable.rb:230:inrequest'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/forwardable.rb:230:in request' from /usr/local/Cellar/travis/1.8.11/libexec/gems/gh-0.13.3/lib/gh/remote.rb:106:inhead'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/forwardable.rb:230:in head' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/forwardable.rb:230:inhead'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/forwardable.rb:230:in head' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/forwardable.rb:230:inhead'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/forwardable.rb:230:in head' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/forwardable.rb:230:inhead'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/forwardable.rb:230:in head' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/forwardable.rb:230:inhead'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/forwardable.rb:230:in head' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/forwardable.rb:230:inhead'
from /usr/local/Cellar/travis/1.8.11/libexec/gems/travis-1.8.11/lib/travis/cli/repo_command.rb:120:in detect_api_endpoint' from /usr/local/Cellar/travis/1.8.11/libexec/gems/travis-1.8.11/lib/travis/cli/repo_command.rb:22:insetup'
from /usr/local/Cellar/travis/1.8.11/libexec/gems/travis-1.8.11/lib/travis/cli/command.rb:197:in execute' from /usr/local/Cellar/travis/1.8.11/libexec/gems/travis-1.8.11/lib/travis/cli.rb:64:inrun'
from /usr/local/Cellar/travis/1.8.11/libexec/gems/travis-1.8.11/bin/travis:18:in <top (required)>' from /usr/local/Cellar/travis/1.8.11/libexec/bin/travis:23:inload'
from /usr/local/Cellar/travis/1.8.11/libexec/bin/travis:23:in `

'

For issues with the command line tool, please visit https://github.com/travis-ci/travis.rb/issues.
For Travis CI in general, go to https://github.com/travis-ci/travis-ci/issues or email [email protected].


outdated

All 14 comments

I'm also affected by this and did a little digging (before I saw this issue) to see what was going on, so I'll just add a bit more information.

Here's a reference to when this issue initially occurred in 2015 and where the Travis folks updated the gh gem to resolve the issue: travis-ci/travis.rb#265 (#51735 downgraded this gem below the fixed version in the 1.18.11 formula update)

It looks like #51735 downgraded several gem dependencies even though they all appear to be supported dependency versions in the travis.gemspec for version 1.18.11 unless I'm misunderstanding the pessimistic operator (I've been known to make mistakes often so I apologize if I am misunderstanding). I'm not sure if the downgrade was included in the PR due to issues people were having or for some other reason.

I hope this is an easy fix of just bumping the gem versions and I appreciate all of the hard work from the Homebrew maintainers!

@chenrui333

ack, let me take a look.

This is my local test, seems fine. (But I can upgrade the faraday as it shows as deprecation warning.)

$ travis env list
/usr/local/Cellar/travis/1.8.11/libexec/gems/faraday-0.9.2/lib/faraday/request/retry.rb:30: warning: constant ::Fixnum is deprecated
# environment variables for xx


$ travis encrypt xx
Please add the following to your .travis.yml file:

  secure: "cOa7hTohBF5+PN/jlrU74uJJ5AV4IRrFY8pn3sMDZSd+pd7apRX8WqbQ/Oz0jLuNWE/c0ln8Fm7UVsw9hQgKOlcDBSplrzu0SSGYMTgtEDtVnViiahWVd1IVaVSQNVkHjB4OymlQRsvaUSc5QZ8J7hpsRoRyEcM9/axHaTtZ/tbq8Iaa9AO8i+kblPH7h1boRNUBCUYd+xOpAqyxsvEIv2Y/a0Dd44no80hRDj7Dprb4yt06fq0btrN7BH89mLzfjbmayrjn6QH6PVYIVRTvsFTvH16diGD3RZSTDd0gAXAnuABshbl2PD9DoikwKKDBKE8RzPMQ/8rDRUui0Is0AfV8XJhlS0ebt8mM2pHM2O5pfN5KmAu/lsP76k5MI6f6C/SR0q7pFysCPT38N9fUidPkaXDeCqv75ukn3843oR4h+bm53t2+bSlbbQbEokl/n+P5aTAxbhKtYKum/n35t0+LpmP9WTX9v1kmxbzgMz7IJElfgID3jvlau8U8AVaFHxjB06oKHi+m8FtW0yMnplmFp7puGPcmDKIWGFMSvScVQ5QjjQ6xIm1j//513IS8DqypJF9pHlTy8+psh8+9ZijbTAB30fgtNet0jO5UIYkIJN4N4oQiEvyFXnTLol7tZA9MNwdd0u/SCKklUp5GMOQkxnMCckCEDlEUq5AnR8M="

Pro Tip: You can add it automatically by running with --add.

My brew config

$ brew config
HOMEBREW_VERSION: 2.2.10-94-g12d3a2a
ORIGIN: https://github.com/Homebrew/brew
HEAD: 12d3a2a2d269e0a26565eb3e63552803f826f366
Last commit: 10 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 17f4c7aa48fd7a62d037c2abddb24dc39680d63f
Core tap last commit: 6 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_DEV_CMD_RUN: 1
HOMEBREW_GITHUB_API_TOKEN: set
CPU: octa-core 64-bit skylake
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
Clang: 11.0 build 1100
Git: 2.24.1 => /usr/local/bin/git
Curl: 7.64.1 => /usr/bin/curl
Java: 14, 10, 1.8.0_242, 1.8.0_211, 1.8.0_152
macOS: 10.15.3-x86_64
CLT: 11.0.33.12
Xcode: 11.3.1
XQuartz: 2.7.11 => /opt/X11

my travis report:

$ travis report
System
Ruby:                     Ruby 2.6.3-p62
Operating System:         Mac OS X 10.15.3
RubyGems:                 RubyGems 3.0.3

CLI
Version:                  1.8.11
Plugins:                  none
Auto-Completion:          no
Last Version Check:       2020-03-22 15:17:52 -0400

Session
API Endpoint:             https://api.travis-ci.org/
Logged In:                as "chenrui333"
Verify SSL:               yes
Enterprise:               no

Endpoints
com:                      https://api.travis-ci.com/ (access token)
org:                      https://api.travis-ci.org/ (access token, current)

For issues with the command line tool, please visit https://github.com/travis-ci/travis.rb/issues.
For Travis CI in general, go to https://github.com/travis-ci/travis-ci/issues or email [email protected].

BTW, the dependencies downgrade followed rubygem spec in the repo. I am going to upgrade back again.

I created a revert PR for bumping the dependencies back, hopefully it works for you.

At least the warning goes away for travis env list now for me.

@chenrui333

I think the error might not have occurred for you above as it might not have had to talk to the GitHub API in your case. The encrypt command (relevant code is here) only uses the GitHub API in the fallback case of no endpoint defined it seems. I got the error myself from trying travis login --auto which uses the GitHub API in the login process.

Thanks for making the new PR! If I get a chance, I'll test it out with the login command again.

Let me try logout and login to see what is going on.

@fkmclane @cburgmer I just published a new release, can any of you give another try to see if it works for your favor? Thanks!

Looks good on my side. We might want to wait for @fkmclane to confirm, but otherwise I'm happy to close this. Thanks for the swift responses everybody!

I just pulled the latest revision and it works for me. Thanks everyone!

Thanks for the feedback!! Gonna close this issue now.

Feel free to open a new one if you run into another issue. Cheers!

FYI, travis just made a new release v1.8.12
https://github.com/Homebrew/homebrew-core/pull/52054

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghostbar picture ghostbar  路  4Comments

ghost picture ghost  路  3Comments

bantl23 picture bantl23  路  3Comments

sstadick picture sstadick  路  4Comments

kiendang picture kiendang  路  3Comments