fastlane: Swift fastlane does not run on Apple Silicon

New Issue Checklist

Issue Description

When I try to run fastlane in Swift on Apple Silicone machine natively it fails on running. When I run the same command through Rosetta 2 (arch -x86_64) or on Intel machine, it works fine.

I’ve tried it running it on macOS system Ruby (ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.arm64e-darwin20]) and on latest Ruby 2.7 (ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [arm64-darwin20]) but with no luck.

Command executed

bundle exec fastlane custom

Complete output when running fastlane, including the stack trace and command used
% bundle exec fastlane custom 
[✔] 🚀 
[15:35:42]: loading manifest: /Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.179.0/fastlane/swift/upgrade_manifest.json
[15:35:42]: FastlaneSwiftRunner project is up-to-date
[15:35:42]: Resolving Swift Package Manager dependencies...
[15:35:42]: $ xcodebuild -resolvePackageDependencies -scheme FastlaneRunner -project ./fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj
[15:35:42]: â–¸ objc[59172]: Class AMSupportURLConnectionDelegate is implemented in both ?? (0x204ed0188) and ?? (0x1161a02b8). One of the two will be used. Which one is undefined.
[15:35:42]: â–¸ objc[59172]: Class AMSupportURLSession is implemented in both ?? (0x204ed01d8) and ?? (0x1161a0308). One of the two will be used. Which one is undefined.
[15:35:42]: â–¸ Command line invocation:
[15:35:42]: â–¸     /Applications/Xcode-12.4.app/Contents/Developer/usr/bin/xcodebuild -resolvePackageDependencies -scheme FastlaneRunner -project ./fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj
[15:35:42]: â–¸ resolved source packages: 
[15:35:42]: $ xcodebuild -showBuildSettings -scheme FastlaneRunner -project ./fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj
objc[59178]: Class AMSupportURLConnectionDelegate is implemented in both ?? (0x204ed0188) and ?? (0x117d9c2b8). One of the two will be used. Which one is undefined.
objc[59178]: Class AMSupportURLSession is implemented in both ?? (0x204ed01d8) and ?? (0x117d9c308). One of the two will be used. Which one is undefined.
[15:35:43]: $ set -o pipefail && xcodebuild -scheme FastlaneRunner -project ./fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj -destination 'generic/platform=macOS' build | tee /Users/builder/Library/Logs/gym/App-FastlaneRunner.log | xcpretty
[15:35:52]: $ ./fastlane/FastlaneRunner lane custom swiftServerPort 2000 > /dev/null
[15:35:52]: â–¸ sh: line 1: 59261 Killed: 9               ./fastlane/FastlaneRunner lane custom swiftServerPort 2000 > /dev/null
#<Thread:0x000000014921cc18 /Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.179.0/fastlane/lib/fastlane/swift_lane_manager.rb:96 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
	4: from /Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.179.0/fastlane/lib/fastlane/swift_lane_manager.rb:97:in `block in cruise_swift_lane_in_thread'
	3: from /Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.179.0/fastlane/lib/fastlane/helper/sh_helper.rb:12:in `sh'
	2: from /Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.179.0/fastlane/lib/fastlane/helper/sh_helper.rb:80:in `sh_control_output'
	1: from /Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.179.0/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing'
/Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.179.0/fastlane_core/lib/fastlane_core/ui/interface.rb:153:in `shell_error!': Exit status of command './fastlane/FastlaneRunner lane custom swiftServerPort 2000 > /dev/null' was 137 instead of 0. (FastlaneCore::Interface::FastlaneShellError)
sh: line 1: 59261 Killed: 9               ./fastlane/FastlaneRunner lane custom swiftServerPort 2000 > /dev/null
#<Thread:0x000000014925c598 /Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.179.0/fastlane/lib/fastlane/swift_lane_manager.rb:220 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
	5: from /Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.179.0/fastlane/lib/fastlane/swift_lane_manager.rb:223:in `block in start_socket_thread'
	4: from /Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.179.0/fastlane/lib/fastlane/server/socket_server.rb:38:in `start'
	3: from /Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.179.0/fastlane/lib/fastlane/server/socket_server.rb:147:in `listen'
	2: from /Users/builder/.rbenv/versions/2.7.2/lib/ruby/2.7.0/timeout.rb:110:in `timeout'
	1: from /Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.179.0/fastlane/lib/fastlane/server/socket_server.rb:148:in `block in listen'
/Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.179.0/fastlane/lib/fastlane/server/socket_server.rb:148:in `accept': execution expired (Timeout::Error)
	5: from /Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.179.0/fastlane/lib/fastlane/swift_lane_manager.rb:223:in `block in start_socket_thread'
	4: from /Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.179.0/fastlane/lib/fastlane/server/socket_server.rb:38:in `start'
	3: from /Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.179.0/fastlane/lib/fastlane/server/socket_server.rb:146:in `listen'
	2: from /Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.179.0/fastlane/lib/fastlane/server/socket_server.rb:151:in `rescue in listen'
	1: from /Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.179.0/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing'
/Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.179.0/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)
+-----------+--------+
|    Lane Context    |
+-----------+--------+
| LANE_NAME | custom |
+-----------+--------+
[15:35:57]: fastlane failed to receive a connection from the FastlaneRunner binary after 5 seconds, shutting down
[15:35:57]: fastlane finished with errors

[!] fastlane failed to receive a connection from the FastlaneRunner binary after 5 seconds, shutting down

Environment

✅ fastlane environment ✅

Stack

Key Value
OS 11.2.3
Ruby 2.7.2
Bundler? true
Git git version 2.24.3 (Apple Git-128)
Installation Source ~/.rbenv/versions/2.7.2/bin/fastlane
Host macOS 11.2.3 (20D91)
Ruby Lib Dir ~/.rbenv/versions/2.7.2/lib
OpenSSL Version OpenSSL 1.1.1j 16 Feb 2021
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode-12.4.app/Contents/Developer/
Xcode Version 12.4

System Locale

Variable Value
LANG en_US.UTF-8 ✅
LC_ALL en_US.UTF-8 ✅
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

class Fastfile: LaneFile {
	func customLane() {
	desc("Description of what the lane does")
		// add actions here: https://docs.fastlane.tools/actions
	}
}

No Appfile found

fastlane gems

Gem Version Update-Status
fastlane 2.179.0 ✅ Up-To-Date

Loaded fastlane plugins:

No plugins Loaded

Loaded gems
Gem Version
did_you_mean 1.4.0
bundler 2.2.15
uri 0.10.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.440.0
aws-sigv4 1.2.3
jmespath 1.4.0
aws-sdk-core 3.113.1
aws-sdk-kms 1.43.0
aws-sdk-s3 1.93.0
babosa 1.0.4
claide 1.0.3
colored 1.2
colored2 3.1.2
highline 1.7.10
commander-fastlane 4.4.6
declarative 0.0.20
declarative-option 0.1.0
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.79.0
faraday-net_http 1.0.1
multipart-post 2.0.0
ruby2_keywords 0.0.4
faraday 1.3.0
http-cookie 1.0.3
faraday-cookie_jar 0.0.7
faraday_middleware 1.0.0
fastimage 2.2.3
gh_inspector 1.1.3
jwt 2.2.2
memoist 0.16.2
multi_json 1.15.0
os 1.1.1
signet 0.15.0
googleauth 0.16.1
httpclient 2.8.3
mini_mime 1.0.3
uber 0.1.0
representable 3.0.4
retriable 3.1.2
google-api-client 0.38.0
rexml 3.2.4
webrick 1.7.0
google-apis-core 0.3.0
google-apis-iamcredentials_v1 0.2.0
google-apis-storage_v1 0.3.0
google-cloud-env 1.5.0
google-cloud-errors 1.1.0
google-cloud-core 1.6.0
google-cloud-storage 1.31.0
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
slack-notifier 2.3.2
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-04-02

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 6
  • Comments: 22 (5 by maintainers)

Commits related to this issue

Most upvoted comments

Just curious as to what the timeline might be for these changes to be available in public release?