Closed jalanb closed 4 years ago
This is weird. Login with GitHub failed, but the error's response body was nil
.
https://github.com/travis-ci/travis.rb/blob/v1.6.11/lib/travis/tools/github.rb#L230
Does the error persist?
Just ran into this issue, has anyone found a fix for this?
For me, this was a firewall issue. Once I went to another network without a firewall, I was able to login to Travis with no issues.
Is this still an issue for anyone else? I am experiencing it now - no firewall issues.
Same issue here. Facing it now :( . @BanzaiMan , Can you please help
Same issue here. Trying to login using github token.
I've the same issue. It doesn't matter if I use a github-token or username and password.
username/password
System
Ruby: Ruby 2.0.0-p648
Operating System: Mac OS X 10.11.6
RubyGems: RubyGems 2.0.14.1
CLI
Version: 1.8.8
Plugins: none
Auto-Completion: no
Last Version Check: 2018-02-28 15:22:12 +0100
Session
API Endpoint: https://api.travis-ci.com/
Logged In: no
Verify SSL: yes
Enterprise: no
Endpoints
pro: https://api.travis-ci.com/ (current)
Last Exception
An error occurred running `travis login --pro`:
TypeError: no implicit conversion of nil into String
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/common.rb:155:in `initialize'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/common.rb:155:in `new'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/common.rb:155:in `parse'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/tools/github.rb:262:in `gh_error'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/tools/github.rb:211:in `rescue in basic_auth'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/tools/github.rb:208:in `basic_auth'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/tools/github.rb:215:in `login'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/tools/github.rb:80:in `possible_tokens'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/tools/github.rb:49:in `each_token'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/tools/github.rb:36:in `with_token'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/cli/login.rb:31:in `login'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/cli/login.rb:40:in `run'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/cli/command.rb:198:in `execute'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/cli.rb:64:in `run'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/bin/travis:18:in `<top (required)>'
from /usr/local/Cellar/travis/1.8.8_2/libexec/bin/travis:23:in `load'
from /usr/local/Cellar/travis/1.8.8_2/libexec/bin/travis:23:in `<main>'
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 support@travis-ci.com.
github-token
System
Ruby: Ruby 2.0.0-p648
Operating System: Mac OS X 10.11.6
RubyGems: RubyGems 2.0.14.1
CLI
Version: 1.8.8
Plugins: none
Auto-Completion: no
Last Version Check: 2018-02-28 15:26:00 +0100
Session
API Endpoint: https://api.travis-ci.com/
Logged In: no
Verify SSL: yes
Enterprise: no
Endpoints
pro: https://api.travis-ci.com/ (current)
Last Exception
An error occurred running `travis login --pro`:
TypeError: no implicit conversion of nil into String
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/common.rb:155:in `initialize'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/common.rb:155:in `new'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/common.rb:155:in `parse'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/tools/github.rb:262:in `gh_error'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/tools/github.rb:254:in `rescue in acceptable?'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/tools/github.rb:243:in `acceptable?'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/tools/github.rb:49:in `block in each_token'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/tools/github.rb:60:in `[]'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/tools/github.rb:60:in `possible_tokens'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/tools/github.rb:49:in `each_token'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/tools/github.rb:36:in `with_token'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/cli/login.rb:31:in `login'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/cli/login.rb:40:in `run'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/cli/command.rb:198:in `execute'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/cli.rb:64:in `run'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/bin/travis:18:in `<top (required)>'
from /usr/local/Cellar/travis/1.8.8_2/libexec/bin/travis:23:in `load'
from /usr/local/Cellar/travis/1.8.8_2/libexec/bin/travis:23:in `<main>'
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 support@travis-ci.com.
I had the same issue, but I solved it by upgrading to Ruby (from 2.0 to 2.3).
Not sure if it matters, but I was also using travis
installed via Homebrew. I uninstalled that version and reinstalled as recommended with gem install travis -v 1.8.8 --no-rdoc --no-ri
.
Original error:
System
Ruby: Ruby 2.0.0-p648
Operating System: Mac OS X 10.11.6
RubyGems: RubyGems 2.0.14.1
CLI
Version: 1.8.8
Plugins: none
Auto-Completion: yes
Last Version Check: 2018-03-01 16:03:19 -0600
Session
API Endpoint: https://api.travis-ci.com/
Logged In: no
Verify SSL: yes
Enterprise: no
Endpoints
pro: https://api.travis-ci.com/ (current)
Last Exception
An error occurred running `travis login --pro`:
TypeError: no implicit conversion of nil into String
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/common.rb:155:in `initialize'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/common.rb:155:in `new'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/common.rb:155:in `parse'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/tools/github.rb:262:in `gh_error'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/tools/github.rb:254:in `rescue in acceptable?'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/tools/github.rb:243:in `acceptable?'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/tools/github.rb:49:in `block in each_token'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/tools/github.rb:60:in `[]'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/tools/github.rb:60:in `possible_tokens'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/tools/github.rb:49:in `each_token'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/tools/github.rb:36:in `with_token'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/cli/login.rb:31:in `login'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/cli/login.rb:40:in `run'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/cli/command.rb:198:in `execute'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/lib/travis/cli.rb:64:in `run'
from /usr/local/Cellar/travis/1.8.8_2/libexec/gems/travis-1.8.8/bin/travis:18:in `<top (required)>'
from /usr/local/Cellar/travis/1.8.8_2/libexec/bin/travis:23:in `load'
from /usr/local/Cellar/travis/1.8.8_2/libexec/bin/travis:23:in `<main>'
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 support@travis-ci.com.
Some issue here:
System
Ruby: Ruby 2.0.0-p648
Operating System: Mac OS X 10.12.6
RubyGems: RubyGems 2.7.6
CLI
Version: 1.8.8
Plugins: none
Auto-Completion: no
Last Version Check: 2018-03-05 23:49:56 +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 login`:
TypeError: no implicit conversion of nil into String
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/common.rb:155:in `initialize'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/common.rb:155:in `new'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/common.rb:155:in `parse'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/tools/github.rb:262:in `gh_error'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/tools/github.rb:211:in `rescue in basic_auth'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/tools/github.rb:208:in `basic_auth'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/tools/github.rb:215:in `login'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/tools/github.rb:80:in `possible_tokens'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/tools/github.rb:49:in `each_token'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/tools/github.rb:36:in `with_token'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/cli/login.rb:31:in `login'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/cli/login.rb:40:in `run'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/cli/command.rb:198:in `execute'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/cli.rb:64:in `run'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/bin/travis:18:in `<top (required)>'
from /usr/local/bin/travis:23:in `load'
from /usr/local/bin/travis:23:in `<main>'
For issues with the command line tool, please visit https://github.com/travis-ci/travis.rb/issues.
Got same error, is there any solution for this issue ?
I had the same exact issues as what have been reported since Feb 23 2018, including the same exact stacktrace.
Thanks to what @hancush called out:
gem install travis -v 1.8.8 --no-rdoc --no-ri
...did the trick for me. I'm now able to sign in!
@blackcappedchickadee doesn't work on me :(
System
Ruby: Ruby 2.0.0-p648
Operating System: Mac OS X 10.12.6
RubyGems: RubyGems 2.0.14.1
CLI
Version: 1.8.8
Plugins: none
Auto-Completion: yes
Last Version Check: 2018-03-09 18:06:45 +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 login`:
TypeError: no implicit conversion of nil into String
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/common.rb:155:in `initialize'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/common.rb:155:in `new'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/common.rb:155:in `parse'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/tools/github.rb:262:in `gh_error'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/tools/github.rb:254:in `rescue in acceptable?'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/tools/github.rb:243:in `acceptable?'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/tools/github.rb:49:in `block in each_token'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/tools/github.rb:60:in `[]'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/tools/github.rb:60:in `possible_tokens'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/tools/github.rb:49:in `each_token'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/tools/github.rb:36:in `with_token'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/cli/login.rb:31:in `login'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/cli/login.rb:40:in `run'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/cli/command.rb:198:in `execute'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/cli.rb:64:in `run'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/bin/travis:18:in `<top (required)>'
from /usr/local/bin/travis:23:in `load'
from /usr/local/bin/travis:23:in `<main>'
I tried pretty much everything, with no luck. In the end I gave up and installed it using homebrew (brew install travis
).
I managed to workaround this by switching ruby versions. I was using ruby 2.0.0 and switched to ruby 2.3.3 with rbenv.
$ travis login --github-token ############
no implicit conversion of nil into String
for a full error report, run travis report
$ which travis
/usr/local/bin/travis
$ rbenv versions
* system (set by /Users/benmeier/.rbenv/version)
2.3.0
2.3.3
$ rbenv shell 2.3.3
$ gem install travis --no-rdoc --no-ri
Fetching: multipart-post-2.0.0.gem (100%)
Successfully installed multipart-post-2.0.0
Fetching: faraday-0.14.0.gem (100%)
Successfully installed faraday-0.14.0
Fetching: faraday_middleware-0.12.2.gem (100%)
Successfully installed faraday_middleware-0.12.2
Fetching: highline-1.7.10.gem (100%)
Successfully installed highline-1.7.10
Fetching: backports-3.11.1.gem (100%)
Successfully installed backports-3.11.1
Fetching: addressable-2.4.0.gem (100%)
Successfully installed addressable-2.4.0
Fetching: net-http-persistent-2.9.4.gem (100%)
Successfully installed net-http-persistent-2.9.4
Fetching: net-http-pipeline-1.0.1.gem (100%)
Successfully installed net-http-pipeline-1.0.1
Fetching: gh-0.15.1.gem (100%)
Successfully installed gh-0.15.1
Fetching: launchy-2.4.3.gem (100%)
Successfully installed launchy-2.4.3
Fetching: ethon-0.11.0.gem (100%)
Successfully installed ethon-0.11.0
Fetching: typhoeus-0.8.0.gem (100%)
Successfully installed typhoeus-0.8.0
Fetching: websocket-1.2.5.gem (100%)
Successfully installed websocket-1.2.5
Fetching: pusher-client-0.6.2.gem (100%)
Successfully installed pusher-client-0.6.2
Fetching: travis-1.8.8.gem (100%)
Successfully installed travis-1.8.8
15 gems installed
$ rbenv rehash
$ which travis
/Users/benmeier/.rbenv/shims/travis
$ travis login --github-token #################
Successfully logged in as AstromechZA!
Serves me right for running such an old ruby.
@AstromechZA
I have just installed ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin16] on my MacBook via brew
same error as before.
But... travis try to use old ruby again...
An error occurred running `travis login`:
TypeError: no implicit conversion of nil into String
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/common.rb:155:in `initialize'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/common.rb:155:in `new'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/common.rb:155:in `parse'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/tools/github.rb:262:in `gh_error'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/tools/github.rb:254:in `rescue in acceptable?'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/tools/github.rb:243:in `acceptable?'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/tools/github.rb:49:in `block in each_token'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/tools/github.rb:60:in `[]'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/tools/github.rb:60:in `possible_tokens'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/tools/github.rb:49:in `each_token'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/tools/github.rb:36:in `with_token'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/cli/login.rb:31:in `login'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/cli/login.rb:40:in `run'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/cli/command.rb:198:in `execute'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/lib/travis/cli.rb:64:in `run'
from /Library/Ruby/Gems/2.0.0/gems/travis-1.8.8/bin/travis:18:in `<top (required)>'
from /usr/local/bin/travis:23:in `load'
from /usr/local/bin/travis:23:in `<main>'
$ ruby -v
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin16]
@WuglyakBolgoink Travis is still linked to the old 2.0.0 gems I assume. You'll need to reinstall the travis gem so that it links to your current ruby version.
@AstromechZA thank you! fully re'install travis was very helpful! now I see no errors during login.
Same here, and the cause is I'm using https_proxy
env var.
Removing it resolves this.
same here:
ruby -v
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
travis -v
1.8.8
I just spent forever and figured it out. There are a few gotchas that can prevent the whole thing from working. If you've installed it incorrectly once, you might run into this issue over and over again.
what I did (thanks to all the comments above) was: Make sure that your computer does not have any trace of travis on it
gem uninstall travis
on each of the rbenv versions you've tried to install it on, you can use gem list
to see if it is installed)Properly install travis to the correct version of ruby I haven't tried this on the system version since I'm using rbenv, but:
ruby -v
gem install travis -v 1.8.8 --no-rdoc --no-ri
to install travis to your local ruby versiontravis
and look at the last line. It should have a path showing the ruby version you are using.This worked for me, and I think that if everyone makes sure that their computer is not in a strange state, it should work for everyone else. Hope this helps!
Thanks @fongelias That worked for me! I did not have to follow the full guide though, just upgrading ruby via rvm
and reinstalling travis did it.
For people who want to update ruby using rvm or brew, refer this link.
I guess this ticket could be closed. No?
I installed the latest version of ruby with Homebrew brew install ruby
and ran sudo gem install travis -v 1.8.8 --no-rdoc --no-ri
and that worked for me. I didn't touch my system ruby install at /usr/bin/ruby
.
Still seeing the error after following @fongelias 's instructions...
This should be fixed by https://github.com/travis-ci/travis.rb/commit/59ef9811166a54c8ac30b3e6c86b12f648b6753b.
Just d/l and installed travis cli onto Ubuntu 12.0, with ruby 2.1
First command I tried it asked me to log in, but then: