Xcode 9. Fastlane. ARCHIVE FAILED

Hello! I have a problem after Xcode update to 9.0.

[04:37:16]: $ set -o pipefail && xcodebuild -workspace ./****\.xcworkspace -scheme ****\ -destination 'generic/platform=iOS' -archivePath /Users/distiller/Library/Developer/Xcode/Archives/2017-09-28/flash-food-ios\ 2017-09-28\ 04.37.16.xcarchive archive CODE_SIGN_IDENTITY=iPhone\ Distribution:\ ****\ Inc.\ \(RZLZW449XK\) | tee /tmp/circle-artifacts.rsvaw46/gym/****\.log | xcpretty
[04:37:21]: ▸ Building Pods/Bolts [Dev]
[04:37:21]: ▸ Check Dependencies
[04:37:21]: ▸ ** ARCHIVE FAILED **
[04:37:21]: ▸ The following build commands failed:
[04:37:21]: ▸ Check dependencies
[04:37:21]: ▸ (1 failure)
▸ Building Pods/Bolts [Dev]
▸ Check Dependencies
** ARCHIVE FAILED **

When I start the same fastlane script without circle it works perfectly.

 lane :build do
          cert 
          sigh
          gym(scheme: "flash-food-ios-" + env, export_xcargs: "-allowProvisioningUpdates")
          changelog_from_git_commits
          pilot(skip_waiting_for_build_processing:true, beta_app_description: COMMIT_MSG + env)
  end

circle.yml:

machine:
  environment:
    GYM_CODE_SIGNING_IDENTITY: "iPhone Distribution: ******. (******)"
  xcode:
    version: "9.0"
dependencies:
  pre:
   - sudo gem install fastlane
   - sudo gem update fastlane

test:
  override:
    - echo "test"

deployment:
  features:
    branch: /.*/
    commands:
    - fastlane build
  production:
    branch: release
    commands:
      - fastlane release_appstore

It was working before

If you have this issue just remove

environment:
GYM_CODE_SIGNING_IDENTITY:

I have run into the same issue. When I remove GYM_CODE_SIGNING_IDENTITY, it does proceed, however, I am still not able to build.

I have tried with and without “-allowProvisioningUpdates”.
With I get the following:

Code Signing Error: There are no accounts registered with Xcode. Add your developer account to Xcode
Code Signing Error: No profiles for '[my app name]' were found:  Xcode couldn't find any iOS App Development provisioning profiles matching '[my app name]'.

Without I get:

No profiles for '[my app name]' were found:  Xcode couldn't find any iOS App Development provisioning profiles matching '[my app name]'. 
Automatic signing is disabled and unable to generate a profile. 
To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.

Just remove automatically managed signing and check that the selected provision and the certificate for this provision in circle setting were added

Thank you! That did the trick.

Worked for me. Thank you!