fastlane: FastlaneRunner lane swiftServerPort 2000 Killed: 9
New Issue Checklist
- Updated fastlane to the latest version
- I read the Contribution Guidelines
- I read docs.fastlane.tools
- I searched for existing GitHub issues
Issue Description
I use Fastlane with swift, on Mac intel and m1, on this both machines I have the same failure
bundle exec fastlane updateProvisioning
bundle fastlane updateProvisioning
[✔] 🚀
[07:52:36]: loading manifest: /Users/amine/Projects/ios/intech-consulting-match/.vendor/ruby/3.0.0/gems/fastlane-2.185.1/fastlane/swift/upgrade_manifest.json
[07:52:36]: FastlaneSwiftRunner project is up-to-date
[07:52:36]: $ ./fastlane/FastlaneRunner lane updateProvisioning swiftServerPort 2000 > /dev/null
[07:52:36]: ▸ sh: line 1: 2110 Killed: 9 ./fastlane/FastlaneRunner lane updateProvisioning swiftServerPort 2000 > /dev/null
#<Thread:0x0000000107e7a510 /Users/amine/Projects/ios/intech-consulting-match/.vendor/ruby/3.0.0/gems/fastlane-2.185.1/fastlane/lib/fastlane/swift_lane_manager.rb:96 run> terminated with exception (report_on_exception is true):
/Users/amine/Projects/ios/intech-consulting-match/.vendor/ruby/3.0.0/gems/fastlane-2.185.1/fastlane_core/lib/fastlane_core/ui/interface.rb:153:in `shell_error!': Exit status of command './fastlane/FastlaneRunner lane updateProvisioning swiftServerPort 2000 > /dev/null' was 137 instead of 0. (FastlaneCore::Interface::FastlaneShellError)
sh: line 1: 2110 Killed: 9 ./fastlane/FastlaneRunner lane updateProvisioning swiftServerPort 2000 > /dev/null
from /Users/amine/Projects/ios/intech-consulting-match/.vendor/ruby/3.0.0/gems/fastlane-2.185.1/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing'
from /Users/amine/Projects/ios/intech-consulting-match/.vendor/ruby/3.0.0/gems/fastlane-2.185.1/fastlane/lib/fastlane/helper/sh_helper.rb:80:in `sh_control_output'
from /Users/amine/Projects/ios/intech-consulting-match/.vendor/ruby/3.0.0/gems/fastlane-2.185.1/fastlane/lib/fastlane/helper/sh_helper.rb:12:in `sh'
from /Users/amine/Projects/ios/intech-consulting-match/.vendor/ruby/3.0.0/gems/fastlane-2.185.1/fastlane/lib/fastlane/swift_lane_manager.rb:97:in `block in cruise_swift_lane_in_thread'
#<Thread:0x0000000107e8aeb0 /Users/amine/Projects/ios/intech-consulting-match/.vendor/ruby/3.0.0/gems/fastlane-2.185.1/fastlane/lib/fastlane/swift_lane_manager.rb:220 run> terminated with exception (report_on_exception is true):
/Users/amine/Projects/ios/intech-consulting-match/.vendor/ruby/3.0.0/gems/fastlane-2.185.1/fastlane_core/lib/fastlane_core/ui/interface.rb:141:in `user_error!': fastlane failed to receive a connection from the FastlaneRunner binary after 5 seconds, shutting down (FastlaneCore::Interface::FastlaneError)
from /Users/amine/Projects/ios/intech-consulting-match/.vendor/ruby/3.0.0/gems/fastlane-2.185.1/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing'
from /Users/amine/Projects/ios/intech-consulting-match/.vendor/ruby/3.0.0/gems/fastlane-2.185.1/fastlane/lib/fastlane/server/socket_server.rb:151:in `rescue in listen'
from /Users/amine/Projects/ios/intech-consulting-match/.vendor/ruby/3.0.0/gems/fastlane-2.185.1/fastlane/lib/fastlane/server/socket_server.rb:146:in `listen'
from /Users/amine/Projects/ios/intech-consulting-match/.vendor/ruby/3.0.0/gems/fastlane-2.185.1/fastlane/lib/fastlane/server/socket_server.rb:38:in `start'
from /Users/amine/Projects/ios/intech-consulting-match/.vendor/ruby/3.0.0/gems/fastlane-2.185.1/fastlane/lib/fastlane/swift_lane_manager.rb:223:in `block in start_socket_thread'
/Users/amine/Projects/ios/intech-consulting-match/.vendor/ruby/3.0.0/gems/fastlane-2.185.1/fastlane/lib/fastlane/server/socket_server.rb:148:in `accept': execution expired (Timeout::Error)
from /Users/amine/Projects/ios/intech-consulting-match/.vendor/ruby/3.0.0/gems/fastlane-2.185.1/fastlane/lib/fastlane/server/socket_server.rb:148:in `block in listen'
from /Users/amine/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/timeout.rb:112:in `timeout'
from /Users/amine/Projects/ios/intech-consulting-match/.vendor/ruby/3.0.0/gems/fastlane-2.185.1/fastlane/lib/fastlane/server/socket_server.rb:147:in `listen'
from /Users/amine/Projects/ios/intech-consulting-match/.vendor/ruby/3.0.0/gems/fastlane-2.185.1/fastlane/lib/fastlane/server/socket_server.rb:38:in `start'
from /Users/amine/Projects/ios/intech-consulting-match/.vendor/ruby/3.0.0/gems/fastlane-2.185.1/fastlane/lib/fastlane/swift_lane_manager.rb:223:in `block in start_socket_thread'
+-----------+--------------------+
| Lane Context |
+-----------+--------------------+
| LANE_NAME | updateProvisioning |
+-----------+--------------------+
[07:52:41]: fastlane failed to receive a connection from the FastlaneRunner binary after 5 seconds, shutting down
[07:52:41]: fastlane finished with errors
[!] fastlane failed to receive a connection from the FastlaneRunner binary after 5 seconds, shutting down
Command executed
I just excuse my lane `bundle exec fastlane updateProvisioning
Complete output when running fastlane, including the stack trace and command used
✅ fastlane environment ✅
Stack
| Key | Value |
|---|---|
| OS | 11.4 |
| Ruby | 3.0.1 |
| Bundler? | true |
| Git | git version 2.32.0 |
| Installation Source | ~/Projects/ios/intech-consulting-match/.vendor/ruby/3.0.0/bin/fastlane |
| Host | macOS 11.4 (20F71) |
| Ruby Lib Dir | ~/.rvm/rubies/ruby-3.0.1/lib |
| OpenSSL Version | OpenSSL 1.1.1k 25 Mar 2021 |
| Is contained | false |
| Is homebrew | false |
| Is installed via Fabric.app | false |
| Xcode Path | /Applications/Xcode.app/Contents/Developer/ |
| Xcode Version | 12.5 |
| Swift Version | 5.4 |
System Locale
| Variable | Value | |
|---|---|---|
| LANG | fr_FR.UTF-8 | ✅ |
| LC_ALL | ||
| LANGUAGE |
fastlane files:
`./fastlane/Fastfile.swift`
// This file contains the fastlane.tools configuration
// You can find the documentation at https://docs.fastlane.tools
//
// For a list of all available actions, check out
//
// https://docs.fastlane.tools/actions
//
import Foundation
func environment(get key: String) -> String {
ProcessInfo.processInfo.environment[key] ?? ""
}
class Fastfile: LaneFile {
private lazy var s3Region: String = { environment(get: "S3_REGION") }()
private lazy var s3AccessKey: String = { environment(get: "S3_ACCESS_KEY") }()
private lazy var s3SecretAccessKey: String = { environment(get: "S3_SECRET_ACCESS_KEY") }()
private lazy var s3Bucket: String = { environment(get: "S3_BUCKET") }()
private func getAppIdentifiers(withOptions options:[String: String]?) -> [Constants.AppIdentifiers] {
guard let options = options,
let app = options[Constants.appIdentifiersOption],
let appIdentifier = Constants.AppIdentifiers(rawValue: app) else { return Constants.AppIdentifiers.allCases }
return [appIdentifier]
}
private func getOutputPath(withOptions options:[String: String]?) -> String? {
guard let options = options,
let outputPath = options[Constants.outputPathOption] else { return nil }
return outputPath
}
func fetchProvisioningLane(withOptions options:[String: String]?) {
desc("Fetch provisiong profiles")
let appIdentifiers = getAppIdentifiers(withOptions: options)
let outputPath = getOutputPath(withOptions: options)
appIdentifiers.forEach { key in
key.appIdentifiers.forEach { appIdentifier in
appIdentifier.types.forEach { type in
appIdentifier.platforms.forEach { platform in
match(
type: type.rawValue,
readonly: true,
appIdentifier: appIdentifier.identifiers,
username: .userDefined(appleID),
teamId: .userDefined(teamID),
teamName: .userDefined(key.rawValue),
storageMode: Constants.storageMode,
s3Region: .userDefined(s3Region),
s3AccessKey: .userDefined(s3AccessKey),
s3SecretAccessKey: .userDefined(s3SecretAccessKey),
s3Bucket: .userDefined(key.s3Bucket ?? s3Bucket),
s3ObjectPrefix: .userDefined(key.s3ObjectPrefix),
platform: platform.rawValue,
deriveCatalystAppIdentifier: .userDefined(appIdentifier.includeMacCatalyst),
outputPath: .userDefined(outputPath)
)
}
}
}
}
}
// fastlane [lane] key:value key2:value2
func updateProvisioningLane(withOptions options:[String: String]?) {
desc("Update provisiong profiles")
let appIdentifiers = getAppIdentifiers(withOptions: options)
let outputPath = getOutputPath(withOptions: options)
appIdentifiers.forEach { key in
key.appIdentifiers.forEach { appIdentifier in
appIdentifier.types.forEach { type in
appIdentifier.platforms.forEach { platform in
match(
type: type.rawValue,
readonly: false,
generateAppleCerts: false,
appIdentifier: appIdentifier.identifiers,
username: .userDefined(appleID),
teamId: .userDefined(teamID),
teamName: .userDefined(key.rawValue),
storageMode: Constants.storageMode,
s3Region: .userDefined(s3Region),
s3AccessKey: .userDefined(s3AccessKey),
s3SecretAccessKey: .userDefined(s3SecretAccessKey),
s3Bucket: .userDefined(key.s3Bucket ?? s3Bucket),
s3ObjectPrefix: .userDefined(key.s3ObjectPrefix),
platform: platform.rawValue,
deriveCatalystAppIdentifier: .userDefined(appIdentifier.includeMacCatalyst),
outputPath: .userDefined(outputPath)
)
}
}
}
}
}
func nukeDevelopmentLane(withOptions options:[String: String]?) {
desc("Clear developement certificates & provioning profiles")
let appIdentifiers = getAppIdentifiers(withOptions: options)
appIdentifiers.forEach { key in
key.appIdentifiers.forEach { appIdentifier in
appIdentifier.types.forEach { type in
matchNuke(
type: type.rawValue,
appIdentifier: appIdentifier.identifiers,
username: .userDefined(appleID),
teamId: .userDefined(teamID),
storageMode: Constants.storageMode,
gitUrl: "",
s3Region: .userDefined(s3Region),
s3AccessKey: .userDefined(s3AccessKey),
s3SecretAccessKey: .userDefined(s3SecretAccessKey),
s3Bucket: .userDefined(key.s3Bucket ?? s3Bucket),
s3ObjectPrefix: .userDefined(key.s3ObjectPrefix)
)
}
}
}
}
}
No Appfile found
fastlane gems
| Gem | Version | Update-Status |
|---|---|---|
| fastlane | 2.185.1 | ✅ Up-To-Date |
Loaded fastlane plugins:
No plugins Loaded
Loaded gems
| Gem | Version |
|---|---|
| did_you_mean | 1.5.0 |
| pathname | 0.1.0 |
| tsort | 0.1.0 |
| rake | 13.0.3 |
| CFPropertyList | 3.0.3 |
| public_suffix | 4.0.6 |
| addressable | 2.7.0 |
| artifactory | 3.0.15 |
| atomos | 0.1.3 |
| aws-eventstream | 1.1.1 |
| aws-partitions | 1.469.0 |
| aws-sigv4 | 1.2.3 |
| jmespath | 1.4.0 |
| aws-sdk-core | 3.114.3 |
| aws-sdk-kms | 1.44.0 |
| aws-sdk-s3 | 1.96.1 |
| babosa | 1.0.4 |
| bundler | 2.2.15 |
| claide | 1.0.3 |
| colored | 1.2 |
| colored2 | 3.1.2 |
| highline | 2.0.3 |
| commander | 4.6.0 |
| declarative | 0.0.20 |
| digest-crc | 0.6.3 |
| unf_ext | 0.0.7.7 |
| unf | 0.1.4 |
| domain_name | 0.5.20190701 |
| dotenv | 2.7.6 |
| emoji_regex | 3.2.2 |
| excon | 0.82.0 |
| faraday-em_http | 1.0.0 |
| faraday-em_synchrony | 1.0.0 |
| faraday-excon | 1.1.0 |
| faraday-net_http | 1.0.1 |
| faraday-net_http_persistent | 1.1.0 |
| multipart-post | 2.0.0 |
| ruby2_keywords | 0.0.4 |
| faraday | 1.4.2 |
| http-cookie | 1.0.4 |
| faraday-cookie_jar | 0.0.7 |
| faraday_middleware | 1.0.0 |
| fastimage | 2.2.4 |
| gh_inspector | 1.1.3 |
| jwt | 2.2.3 |
| memoist | 0.16.2 |
| multi_json | 1.15.0 |
| os | 1.1.1 |
| signet | 0.15.0 |
| googleauth | 0.16.2 |
| httpclient | 2.8.3 |
| mini_mime | 1.1.0 |
| trailblazer-option | 0.1.1 |
| uber | 0.1.0 |
| representable | 3.1.1 |
| retriable | 3.1.2 |
| rexml | 3.2.5 |
| webrick | 1.7.0 |
| google-apis-core | 0.3.0 |
| google-apis-androidpublisher_v3 | 0.6.0 |
| google-apis-playcustomapp_v1 | 0.3.0 |
| google-apis-iamcredentials_v1 | 0.4.0 |
| google-apis-storage_v1 | 0.4.0 |
| google-cloud-env | 1.5.0 |
| google-cloud-errors | 1.1.0 |
| google-cloud-core | 1.6.0 |
| google-cloud-storage | 1.31.1 |
| json | 2.5.1 |
| mini_magick | 4.11.0 |
| naturally | 2.2.1 |
| plist | 3.6.0 |
| rubyzip | 2.3.0 |
| security | 0.1.3 |
| simctl | 1.6.8 |
| terminal-notifier | 2.0.0 |
| unicode-display_width | 1.7.0 |
| terminal-table | 1.8.0 |
| tty-screen | 0.8.1 |
| tty-cursor | 0.7.1 |
| tty-spinner | 0.9.3 |
| word_wrap | 1.0.0 |
| nanaimo | 0.3.0 |
| xcodeproj | 1.19.0 |
| rouge | 2.0.7 |
| xcpretty | 0.3.0 |
| xcpretty-travis-formatter | 1.0.1 |
generated on: 2021-06-21
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 21 (7 by maintainers)
Commits related to this issue
- [Fastlane.Swift] Swift fastlane upgrader #18933 + fix upgrades checks to avoid false not up-to-date messages. — committed to kikeenrique/fastlane by kikeenrique 2 years ago
- [Fastlane.Swift] Swift fastlane upgrader #18933 (#19914) + fix upgrades checks to avoid false not up-to-date messages. — committed to fastlane/fastlane by kikeenrique 2 years ago
That’s what I meant with Signed binaries in macOS can give problems due to caching. I’ve read in an apple forums about this problems, check https://developer.apple.com/forums/thread/669145 or https://developer.apple.com/documentation/security/updating_mac_software.
But, the Code Sign on copy shall prevent these problems, at least I didn’t manage to reproduce them again. Did you review the build phase “Run Script”? That phases uses cp, which doesn’t behave as expected with signed binaries, and may be the root of the problem.