-
Notifications
You must be signed in to change notification settings - Fork 409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If Travis API is unavailable, gem throws FrozenError rather than a helpful message #753
Comments
Hmm, maybe that HTTP 500 is a false positive actually, because calling absolute API calls via curl (e.g., https://travis.example.com/api/repo/orgname%2Freponame) is working. So perhaps the freeze error is unrelated to the API being up or down |
Does your # start with a normal installation; it works
travis@55375469c8f2:~$ travis endpoint -E --debug --debug-http --set-default -X --api-endpoint https://travis.example.com/api
** Loading "/home/travis/.travis/config.yml"
API endpoint: https://travis.example.com/api (stored as default)
** Storing "/home/travis/.travis/config.yml"
# confirm that cacert.pem exists at the correct location
travis@55375469c8f2:~$ ls $(dirname $(gem which travis))/../assets/cacert.pem
/home/travis/.rvm/gems/ruby-2.6.5/gems/travis-1.9.1/lib/../assets/cacert.pem
# move the file
travis@55375469c8f2:~$ mv $(dirname $(gem which travis))/../assets/cacert.pem .
# confirm the "frozen Hash" error
travis@55375469c8f2:~$ travis endpoint -E --debug --debug-http --set-default -X --api-endpoint https://travis.example.com/api
** Loading "/home/travis/.travis/config.yml"
Traceback (most recent call last):
9: from /home/travis/.rvm/gems/ruby-2.6.5/bin/ruby_executable_hooks:24:in `<main>'
8: from /home/travis/.rvm/gems/ruby-2.6.5/bin/ruby_executable_hooks:24:in `eval'
7: from /home/travis/.rvm/gems/ruby-2.6.5/bin/travis:23:in `<main>'
6: from /home/travis/.rvm/gems/ruby-2.6.5/bin/travis:23:in `load'
5: from /home/travis/.rvm/gems/ruby-2.6.5/gems/travis-1.9.1/bin/travis:18:in `<top (required)>'
4: from /home/travis/.rvm/gems/ruby-2.6.5/gems/travis-1.9.1/lib/travis/cli.rb:64:in `run'
3: from /home/travis/.rvm/gems/ruby-2.6.5/gems/travis-1.9.1/lib/travis/cli/command.rb:199:in `execute'
2: from /home/travis/.rvm/gems/ruby-2.6.5/gems/travis-1.9.1/lib/travis/cli/api_command.rb:53:in `setup'
1: from /home/travis/.rvm/gems/ruby-2.6.5/gems/travis-1.9.1/lib/travis/cli/api_command.rb:114:in `setup_enterprise'
/home/travis/.rvm/gems/ruby-2.6.5/gems/travis-1.9.1/lib/travis/cli/api_command.rb:114:in `delete': can't modify frozen Hash (FrozenError)
# move cacert.pem back
travis@55375469c8f2:~$ mv cacert.pem $(dirname $(gem which travis))/../assets
# it works again
travis@55375469c8f2:~$ travis endpoint -E --debug --debug-http --set-default -X --api-endpoint https://travis.example.com/api
** Loading "/home/travis/.travis/config.yml"
API endpoint: https://travis.example.com/api (stored as default)
** Storing "/home/travis/.travis/config.yml" If this is the case for you, a better error message is more helpful. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
By coincidence our Travis Enterprise endpoint was returning HTTP 500s for a period. However, from the Travis gem used in our automation this manifested as a "can't modify frozen Hash (FrozenError)" error rather than a helpful message showing that the problem was with the API rather than the CLI.
The text was updated successfully, but these errors were encountered: