fastlane: Spaceship– 'Bad Request' and crash on `match development`

New Issue Checklist

Issue Description

When running match development to generate certificates to share, spaceship crashes while trying to create new ones. Also crashes if there is a generated certificate but you have an empty match repo. To be clear, I am trying to run match standalone to troubleshoot, thus why my fastfile includes no mention of it.

Complete output when running fastlane, including the stack trace and command used

+-----------------------+------------------------------------------+
|                     Summary for match 0.6.2                      |
+-----------------------+------------------------------------------+
| git_url               | XXXXXXXXXXX |
| type                  | development                              |
| git_branch            | master                                   |
| username              | XXXXXXXXXXX                            |
| keychain_name         | login.keychain                           |
| readonly              | false                                    |
| team_id               | XXXXXXXXXX                               |
| verbose               | false                                    |
| force                 | false                                    |
| shallow_clone         | false                                    |
| force_for_new_devices | false                                    |
| skip_docs             | false                                    |
+-----------------------+------------------------------------------+

[15:34:19]: Cloning remote git repo...
[15:34:19]: 🔓  Successfully decrypted certificates repo
[15:34:19]: Verifying that the certificate and profile are still valid on the Dev Portal...
[15:34:21]: To not be asked about this value, you can specify it using 'app_identifier'
The bundle identifier of your app: XXXXXXXXXXX
[15:34:31]: Couldn't find a valid code signing identity in the git repo for development... creating one for you now

+---------------+----------------------------------------------------+
|                       Summary for cert 1.4.1                       |
+---------------+----------------------------------------------------+
| development   | true                                               |
| force         | true                                               |
| username      | XXXXXXXXXXX                             |
| team_id       | XXXXXXXXXXX                                         |
| keychain_path | /Users/carterkonz/Library/Keychains/login.keychain |
+---------------+----------------------------------------------------+

[15:34:31]: Starting login with user 'XXXXXXXXXXX'
[15:34:33]: Successfully logged in
[15:34:33]: 🔒  Successfully encrypted certificates repo

Looking for related GitHub issues on fastlane/fastlane...

➡️  crash on ad_hoc provisioning profile delete
   https://github.com/fastlane/fastlane/issues/3427 [closed] 1 💬
   08 Mar 2016

➡️  crash on ad_hoc provisioning profile delete!
   https://github.com/fastlane/fastlane/issues/3485 [closed] 0 💬
   08 Mar 2016

/Users/carterkonz/.rbenv/versions/2.3.1/lib/ruby/2.3.0/json/common.rb:156:in `parse': [!] 784: unexpected token at 'Bad Request' (Faraday::ParsingError)
    from /Users/carterkonz/.rbenv/versions/2.3.1/lib/ruby/2.3.0/json/common.rb:156:in `parse'
    from /Users/carterkonz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/faraday_middleware-0.10.0/lib/faraday_middleware/response/parse_json.rb:11:in `block in <class:ParseJson>'
    from /Users/carterkonz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/faraday_middleware-0.10.0/lib/faraday_middleware/response_middleware.rb:48:in `parse'
    from /Users/carterkonz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/faraday_middleware-0.10.0/lib/faraday_middleware/response_middleware.rb:39:in `process_response'
    from /Users/carterkonz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/faraday_middleware-0.10.0/lib/faraday_middleware/response_middleware.rb:32:in `block in call'
    from /Users/carterkonz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/response.rb:57:in `on_complete'
    from /Users/carterkonz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/faraday_middleware-0.10.0/lib/faraday_middleware/response_middleware.rb:30:in `call'
    from /Users/carterkonz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/rack_builder.rb:139:in `build_response'
    from /Users/carterkonz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/connection.rb:377:in `run_request'
    from /Users/carterkonz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/connection.rb:177:in `post'
    from /Users/carterkonz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spaceship-0.31.2/lib/spaceship/client.rb:411:in `block in send_request'
    from /Users/carterkonz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spaceship-0.31.2/lib/spaceship/client.rb:328:in `with_retry'
    from /Users/carterkonz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spaceship-0.31.2/lib/spaceship/client.rb:410:in `send_request'
    from /Users/carterkonz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spaceship-0.31.2/lib/spaceship/client.rb:385:in `request'
    from /Users/carterkonz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spaceship-0.31.2/lib/spaceship/portal/portal_client.rb:284:in `create_certificate!'
    from /Users/carterkonz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spaceship-0.31.2/lib/spaceship/portal/certificate.rb:298:in `create!'
    from /Users/carterkonz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/cert-1.4.1/lib/cert/runner.rb:137:in `create_certificate'
    from /Users/carterkonz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/cert-1.4.1/lib/cert/runner.rb:37:in `run'
    from /Users/carterkonz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/cert-1.4.1/lib/cert/runner.rb:6:in `launch'
    from /Users/carterkonz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/match-0.6.2/lib/match/generator.rb:19:in `generate_certificate'
    from /Users/carterkonz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/match-0.6.2/lib/match/runner.rb:49:in `certificate'
    from /Users/carterkonz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/match-0.6.2/lib/match/runner.rb:17:in `run'
    from /Users/carterkonz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/match-0.6.2/lib/match/commands_generator.rb:55:in `block (3 levels) in run'
    from /Users/carterkonz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/commander-4.4.0/lib/commander/command.rb:178:in `call'
    from /Users/carterkonz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/commander-4.4.0/lib/commander/command.rb:153:in `run'
    from /Users/carterkonz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/commander-4.4.0/lib/commander/runner.rb:444:in `run_active_command'
    from /Users/carterkonz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/fastlane_core-0.50.2/lib/fastlane_core/ui/fastlane_runner.rb:36:in `run!'
    from /Users/carterkonz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/commander-4.4.0/lib/commander/delegates.rb:15:in `run!'
    from /Users/carterkonz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/match-0.6.2/lib/match/commands_generator.rb:121:in `run'
    from /Users/carterkonz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/match-0.6.2/lib/match/commands_generator.rb:12:in `start'
    from /Users/carterkonz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/match-0.6.2/bin/match:6:in `<top (required)>'
    from /Users/carterkonz/.rbenv/versions/2.3.1/bin/match:23:in `load'
    from /Users/carterkonz/.rbenv/versions/2.3.1/bin/match:23:in `<main>'

Configuration Files

Please copy the complete content of your Fastfile and any other configuration files you use below:

Fastfile:

fastlane_version "1.96.0"

default_platform :ios

platform :ios do
  before_all do
    ENV["SLACK_URL"] = "XXXXXX"
    unlock_keychain(
      path: "~/Library/Keychains/login.keychain",
      password: "XXXXXX"
    )

  end

  desc "Submit a new Beta Build to Apple TestFlight"
  desc "This will also make sure the profile is up to date"
  lane :dev do
    recreate_schemes(
      project: 'XXXXXX.xcodeproj'
    )
    increment_build_number({
      build_number: latest_testflight_build_number(
        app_identifier: "XXXXXX"
      ) + 1
    })
    # match(type: "appstore") # more information: https://codesigning.guide
    # Build your app - more options available
    cert
    sigh(
      app_identifier: "XXXXXX"
    )
    gym(
      scheme: "XXXXXX"
    )
    # Upload to Testflight
    pilot(
      app_identifier: "XXXXXX",
      skip_waiting_for_build_processing: true
    )

  end

  after_all do |lane|

  end

  error do |lane, exception|

  end
end


# More information about multiple platforms in fastlane: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md
# All available actions: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md

# fastlane reports which actions are used
# No personal data is recorded. Learn more at https://github.com/fastlane/enhancer

Environment

fastlane version (run fastlane -v): 1.101.0

  • Do you use bundler to execute fastlane (i.e. bundle exec fastlane)?
  • Do you use a Ruby environment manager (e.g. [ ] chruby, [x] rbenv, [ ] rvm)?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 2
  • Comments: 21 (7 by maintainers)

Most upvoted comments

The new release is live, please update using [sudo] gem update spaceship or if you’re using bundler, use bundle update 🚀 Please let us know if that solves the problem for you 👍

Thanks everybody, I can reproduce, and I’m already working on a fix 🚀

+1 - unexpected token at ‘Bad Request’ for me when running match. This setup was previously working fine

+1 - unexpected token at ‘Bad Request’ for me when running match. This setup was previously working fine