Unable to install Bundler gem "tlsv1 alert protocol version"

Bitrise Build Issue Report template

Description of the issue

I’m following the instructions for Fastlane Export Issue by adding the script step to bitrise.yml with

sudo /usr/bin/gem install bundler

This step fails with

ERROR: Could not find a valid gem ‘bundler’ (>= 0), here is why:
Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: tlsv1 alert protocol version (https://rubygems.org/latest_specs.4.8.gz)

I came across this similar discussion, which was solved by Bitrise? Github status failing with tls version error

Environment:

Where did the issue happen?

“Xcode 9.2.x, on macOS 10.12 (Sierra)”

Which build Step causes the issue and which version of the step?

Custom script step

Reproducibility

  • Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build) : NO
  • Does a rebuild without caches help? (You can remove the Cache:Pull and Cache:Push steps temporarily to not to use the cache, or you can delete all the caches on the Settings tab of the app. :
  • Does the issue happen sporadically, or every time? : Every time
  • Does upgrading the build Step to the latest version help? : NO
  • When did the issue start? : Immediately

Build log

+------------------------------------------------------------------------------+

| (10) Update Ruby bundler                                                     |
+------------------------------------------------------------------------------+
| id: script                                                                   |
| version: 1.1.5                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: bash                                                                |
| time: 2018-09-23T21:29:09-07:00                                              |
+------------------------------------------------------------------------------+
|                                                                              |
ERROR:  Could not find a valid gem 'bundler' (>= 0), here is why:
          Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: tlsv1 alert protocol version (https://rubygems.org/latest_specs.4.8.gz)
|                                                                              |
+---+---------------------------------------------------------------+----------+
| x | Update Ruby bundler (exit code: 2)                            | 3.59 sec |
+---+---------------------------------------------------------------+----------+
| Issue tracker: https://github.com/bitrise-io/steps-script/issues             |
| Source: https://github.com/bitrise-io/steps-script                           |
+---+---------------------------------------------------------------+----------+

Hi @lkauler,

Sorry to hear about this issue. Can you please send us a link to your build directly, so we are able to see the whole thing?

Example build is https://app.bitrise.io/build/f4b33185973c53aa

I did find this alternative install script which did work fine.

I made progress afterward. Turns out I didn’t need a newer Bundler (so I removed the script step) but Fastlane 2.105.0 which was in our gemfile was removed by that team from Rubygems (because they released 2.105.1 hotfix).

Cheers

1 Like

Thanks for letting us know!

Glad to hear you’ve resolved this quickly :blush:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.