Build completes successfully, but then crashes when trying to launch the app on the simulator. I think it's related to an architecture mismatch with libraries. Any help is appreciated.
- Xcode 14.2
- Flutter 3.72
- Cocoapods 1.11.3
- Ruby 3.0.0
- building to iOS simulator (15.0) iphone 13
xcode debugger logs
Warning: Error creating LLDB target at path '/Users/USER/Library/Developer/Xcode/DerivedData/Runner-blrksncxtnfbrcdtafhrxochtofc/Build/Products/Debug-stage-iphonesimulator/Runner.app'- using an empty LLDB target which can cause slow memory reads from remote devices: the specified architecture 'arm64-*-*' is not compatible with 'x86_64-apple-ios11.0.0-simulator' in '/Users/USER/Library/Developer/Xcode/DerivedData/Runner-blrksncxtnfbrcdtafhrxochtofc/Build/Products/Debug-stage-iphonesimulator/Runner.app/Runner'
dyld[34074]: Symbol not found: _$s13SwiftProtobuf19_ProtoNameProvidingP17_protobuf_nameMapAA01_dH0VvgZTq
Referenced from: /Users/USER/Library/Developer/CoreSimulator/Devices/660D1541-1FAA-4D12-B0F2-D844189798B1/data/Containers/Bundle/Application/8B6A01F0-F54C-4FBB-81CC-EB4E53E205C2/Runner.app/Frameworks/iProov.framework/iProov
Expected in: /Users/USER/Library/Developer/CoreSimulator/Devices/660D1541-1FAA-4D12-B0F2-D844189798B1/data/Containers/Bundle/Application/8B6A01F0-F54C-4FBB-81CC-EB4E53E205C2/Runner.app/Frameworks/SwiftProtobuf.framework/SwiftProtobuf
Message from debugger: Terminated due to signal 6
Xcode Error Report
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Incident Identifier: 864A78AD-6A4A-4777-948E-6325DAAA0350
CrashReporter Key: 945CE127-E12B-BACF-2502-41B2EF0813E5
Hardware Model: MacBookPro18,3
Process: Runner [34095]
Path: /Users/USER/Library/Developer/CoreSimulator/Devices/660D1541-1FAA-4D12-B0F2-D844189798B1/data/Containers/Bundle/Application/8B6A01F0-F54C-4FBB-81CC-EB4E53E205C2/Runner.app/Runner
Identifier: app.bundle.id
Version: 2.8.0.stage (4073)
Code Type: X86-64 (Native)
Role: Foreground
Parent Process: launchd_sim [14790]
Coalition: com.apple.CoreSimulator.SimDevice.660D1541-1FAA-4D12-B0F2-D844189798B1 [4037]
Responsible Process: SimulatorTrampoline [2872]
Date/Time: 2023-02-14 11:12:19.0612 -0800
Launch Time: 2023-02-14 11:12:18.7841 -0800
OS Version: macOS 13.2.1 (22D68)
Release Type: User
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: DYLD 4 Symbol missing
Symbol not found: _$s13SwiftProtobuf19_ProtoNameProvidingP17_protobuf_nameMapAA01_dH0VvgZTq
Referenced from: /Users/USER/Library/Developer/CoreSimulator/Devices/660D1541-1FAA-4D12-B0F2-D844189798B1/data/Containers/Bundle/Application/8B6A01F0-F54C-4FBB-81CC-EB4E53E205C2/Runner.app/Frameworks/iProov.framework/iProov
Expected in: /Users/USER/Library/Developer/CoreSimulator/Devices/660D1541-1FAA-4D12-B0F2-D844189798B1/data/Containers/Bundle/Application/8B6A01F0-F54C-4FBB-81CC-EB4E53E205C2/Runner.app/Frameworks/SwiftProtobuf.framework/SwiftProtobuf
(terminated at launch; ignore backtrace)
Triggered by Thread: 0
Kernel Triage:
VM - pmap_enter retried due to resource shortage
VM - pmap_enter retried due to resource shortage
VM - pmap_enter retried due to resource shortage
VM - pmap_enter retried due to resource shortage
VM - pmap_enter retried due to resource shortage
Thread 0 Crashed:
0 ??? 0x102de29a8 ???
1 <translation info unavailable> 0x102e9a294 ???
2 dyld 0x2030e1d07 abort_with_payload_wrapper_internal + 82
3 dyld 0x2030e1d39 abort_with_payload + 9
4 dyld_sim 0x10b423060 abort_with_payload + 26
5 dyld_sim 0x10b3e308b dyld4::halt(char const*) + 375
6 dyld_sim 0x10b3dfb15 dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 2807
7 dyld_sim 0x10b3dfd3f _dyld_sim_prepare + 379
8 dyld 0x203066ff1 dyld4::prepareSim(dyld4::RuntimeState&, char const*) + 1551
9 dyld 0x2030655be dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 244
10 dyld 0x203065281 start + 2289
Thread 1:: com.apple.rosetta.exceptionserver
0 ??? 0x7ff7ffdf9614 ???
1 ??? 0x7ff7ffe11a50 ???
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000006 rbx: 0x0000000000000214 rcx: 0x0000000000000004 rdx: 0x0000000309cb6490
rdi: 0x000000201050836d rsi: 0x000000011050841c rbp: 0x0000000000000000 rsp: 0x0000000309cb6090
r8: 0x0000000309cb6090 r9: 0x0000000000000000 r10: 0x0000000000000214 r11: 0x0000000000000000
r12: 0x0000000000000214 r13: 0x0000000309cb6490 r14: 0x0000000000000004 r15: 0x0000000000000006
rip: <unavailable> rfl: 0x0000000000000283
tmp0: 0xffffffffffffffff tmp1: 0x0000000102de297c tmp2: 0x00000002030e1d07
Binary Images:
0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???
0x20305f000 - 0x2030f6fff dyld (*) <bba77709-6cad-3592-ab03-09d0f7b8610e> /usr/lib/dyld
0x10b3de000 - 0x10b42afff dyld_sim (*) <d494c297-dc73-394b-901e-1b5930e801df> /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 15.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib/dyld_sim
Error Formulating Crash Report:
dyld_process_snapshot_get_shared_cache failed
EOF
-----------
Full Report
-----------
{"app_name":"Runner","timestamp":"2023-02-14 11:12:25.00 -0800","app_version":"2.8.0.stage","slice_uuid":"234062e7-b199-36f8-a7df-3d41c21912a3","build_version":"4073","platform":7,"bundleID":"app.bundle.id","share_with_app_devs":0,"is_first_party":0,"bug_type":"309","os_version":"macOS 13.2.1 (22D68)","roots_installed":0,"name":"Runner","incident_id":"864A78AD-6A4A-4777-948E-6325DAAA0350"}
{
"uptime" : 3500,
"procRole" : "Foreground",
"version" : 2,
"userID" : 501,
"deployVersion" : 210,
"modelCode" : "MacBookPro18,3",
"coalitionID" : 4037,
"osVersion" : {
"train" : "macOS 13.2.1",
"build" : "22D68",
"releaseType" : "User"
},
"captureTime" : "2023-02-14 11:12:19.0612 -0800",
"incident" : "864A78AD-6A4A-4777-948E-6325DAAA0350",
"pid" : 34095,
"translated" : true,
"cpuType" : "X86-64",
"roots_installed" : 0,
"bug_type" : "309",
"procLaunch" : "2023-02-14 11:12:18.7841 -0800",
"procStartAbsTime" : 84348918859,
"procExitAbsTime" : 84355563049,
"procName" : "Runner",
"procPath" : "\/Users\/USER\/Library\/Developer\/CoreSimulator\/Devices\/660D1541-1FAA-4D12-B0F2-D844189798B1\/data\/Containers\/Bundle\/Application\/8B6A01F0-F54C-4FBB-81CC-EB4E53E205C2\/Runner.app\/Runner",
"bundleInfo" : {"CFBundleShortVersionString":"2.8.0.stage","CFBundleVersion":"4073","CFBundleIdentifier":"app.bundle.id.stage"},
"storeInfo" : {"deviceIdentifierForVendor":"87919FDD-3820-562F-87D4-1E193A62C135","thirdParty":true},
"parentProc" : "launchd_sim",
"parentPid" : 14790,
"coalitionName" : "com.apple.CoreSimulator.SimDevice.660D1541-1FAA-4D12-B0F2-D844189798B1",
"crashReporterKey" : "945CE127-E12B-BACF-2502-41B2EF0813E5",
"responsiblePid" : 2872,
"responsibleProc" : "SimulatorTrampoline",
"wakeTime" : 2610,
"sleepWakeUUID" : "B8E41F3D-8006-4918-8520-CE0C4F6516A8",
"sip" : "enabled",
"exception" : {"codes":"0x0000000000000000, 0x0000000000000000","rawCodes":[0,0],"type":"EXC_CRASH","signal":"SIGABRT"},
"termination" : {"code":4,"flags":518,"namespace":"DYLD","indicator":"Symbol missing","details":["(terminated at launch; ignore backtrace)"],"reasons":["Symbol not found: _$s13SwiftProtobuf19_ProtoNameProvidingP17_protobuf_nameMapAA01_dH0VvgZTq","Referenced from: \/Users\/USER\/Library\/Developer\/CoreSimulator\/Devices\/660D1541-1FAA-4D12-B0F2-D844189798B1\/data\/Containers\/Bundle\/Application\/8B6A01F0-F54C-4FBB-81CC-EB4E53E205C2\/Runner.app\/Frameworks\/iProov.framework\/iProov","Expected in: \/Users\/USER\/Library\/Developer\/CoreSimulator\/Devices\/660D1541-1FAA-4D12-B0F2-D844189798B1\/data\/Containers\/Bundle\/Application\/8B6A01F0-F54C-4FBB-81CC-EB4E53E205C2\/Runner.app\/Frameworks\/SwiftProtobuf.framework\/SwiftProtobuf"]},
"ktriageinfo" : "VM - pmap_enter retried due to resource shortage\nVM - pmap_enter retried due to resource shortage\nVM - pmap_enter retried due to resource shortage\nVM - pmap_enter retried due to resource shortage\nVM - pmap_enter retried due to resource shortage\n",
"extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":2,"task_for_pid":4},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
"faultingThread" : 0,
"threads" : [{"triggered":true,"id":141045,"threadState":{"flavor":"x86_THREAD_STATE","rbp":{"value":0},"r12":{"value":532},"rosetta":{"tmp2":{"value":8641191175},"tmp1":{"value":4343081340},"tmp0":{"value":18446744073709551615}},"rbx":{"value":532},"r8":{"value":13049225360},"r15":{"value":6},"r10":{"value":532},"rdx":{"value":13049226384},"rdi":{"value":137712665453},"r9":{"value":0},"r13":{"value":13049226384},"rflags":{"value":643},"rax":{"value":6},"rsp":{"value":13049225360},"r11":{"value":0},"rcx":{"value":4},"r14":{"value":4},"rsi":{"sourceLine":355,"value":4568679452,"sourceFile":"status.cc","symbol":"absl::lts_20211102::PermissionDeniedError(absl::lts_20211102::string_view)","symbolLocation":0}},"frames":[{"imageOffset":4343081384,"imageIndex":0},{"imageOffset":4343833236,"region":"<translation info unavailable>","imageIndex":0},{"imageOffset":535815,"symbol":"abort_with_payload_wrapper_internal","symbolLocation":82,"imageIndex":1},{"imageOffset":535865,"symbol":"abort_with_payload","symbolLocation":9,"imageIndex":1},{"imageOffset":282720,"symbol":"abort_with_payload","symbolLocation":26,"imageIndex":2},{"imageOffset":20619,"symbol":"dyld4::halt(char const*)","symbolLocation":375,"imageIndex":2},{"imageOffset":6933,"symbol":"dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*)","symbolLocation":2807,"imageIndex":2},{"imageOffset":7487,"symbol":"_dyld_sim_prepare","symbolLocation":379,"imageIndex":2},{"imageOffset":32753,"symbol":"dyld4::prepareSim(dyld4::RuntimeState&, char const*)","symbolLocation":1551,"imageIndex":1},{"imageOffset":26046,"symbol":"dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*)","symbolLocation":244,"imageIndex":1},{"imageOffset":25217,"symbol":"start","symbolLocation":2289,"imageIndex":1}]},{"id":141046,"name":"com.apple.rosetta.exceptionserver","frames":[{"imageOffset":140703126492692,"imageIndex":0},{"imageOffset":140703126592080,"imageIndex":0}]}],
"usedImages" : [
{
"size" : 0,
"source" : "A",
"base" : 0,
"uuid" : "00000000-0000-0000-0000-000000000000"
},
{
"source" : "P",
"arch" : "x86_64",
"base" : 8640655360,
"size" : 622592,
"uuid" : "bba77709-6cad-3592-ab03-09d0f7b8610e",
"path" : "\/usr\/lib\/dyld",
"name" : "dyld"
},
{
"source" : "P",
"arch" : "x86_64",
"base" : 4483571712,
"size" : 315392,
"uuid" : "d494c297-dc73-394b-901e-1b5930e801df",
"path" : "\/Library\/Developer\/CoreSimulator\/Profiles\/Runtimes\/iOS 15.0.simruntime\/Contents\/Resources\/RuntimeRoot\/usr\/lib\/dyld_sim",
"name" : "dyld_sim"
}
],
"vmSummary" : "ReadOnly portion of Libraries: Total=1.0G resident=0K(0%) swapped_out_or_unallocated=1.0G(100%)\nWritable regions: Total=156.3M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=156.3M(100%)\n\n VIRTUAL REGION \nREGION TYPE SIZE COUNT (non-coalesced) \n=========== ======= ======= \nRosetta Arena 4096K 2 \nRosetta Generic 972K 240 \nRosetta IndirectBranch 32K 1 \nRosetta JIT 128.0M 1 \nRosetta Return Stack 20K 2 \nRosetta Thread Context 20K 2 \nStack 8176K 1 \nStack Guard 56.0M 1 \nVM_ALLOCATE 52K 2 \nVM_ALLOCATE (reserved) 20K 2 reserved VM address space (unallocated)\n__DATA 38.8M 796 \n__DATA_CONST 50.7M 569 \n__DATA_DIRTY 100K 12 \n__FONT_DATA 4K 1 \n__LINKEDIT 427.0M 643 \n__TEXT 636.5M 640 \n__UNICODE 588K 1 \ndyld private memory 32.0G 4 \nmapped file 604K 7 \n=========== ======= ======= \nTOTAL 33.3G 2927 \nTOTAL, minus reserved VM space 33.3G 2927 \n",
"legacyInfo" : {
"threadTriggered" : {
}
},
"trialInfo" : {
"rollouts" : [
{
"rolloutId" : "5f72dc58705eff005a46b3a9",
"factorPackIds" : {
},
"deploymentId" : 240000015
},
{
"rolloutId" : "60f8ddccefea4203d95cbeef",
"factorPackIds" : {
},
"deploymentId" : 240000022
}
],
"experiments" : [
]
},
"reportNotes" : [
"dyld_process_snapshot_get_shared_cache failed"
]
}
Model: MacBookPro18,3, BootROM 8419.80.7, proc 10:8:2 processors, 32 GB, SMC
Graphics: Apple M1 Pro, Apple M1 Pro, Built-In
Display: Color LCD, 3024 x 1964 Retina, Main, MirrorOff, Online
Memory Module: LPDDR5, Hynix
AirPort: spairport_wireless_card_type_wifi (0x14E4, 0x4387), wl0: Nov 30 2022 02:17:16 version 20.10.965.13.8.7.131 FWID 01-1251c18d
Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
USB Device: USB31Bus
USB Device: USB31Bus
USB Device: USB31Bus
Thunderbolt Bus: MacBook Pro, Apple Inc.
Thunderbolt Bus: MacBook Pro, Apple Inc.
Thunderbolt Bus: MacBook Pro, Apple Inc.
Podfile
deployment_target = '11.0'
# Uncomment this line to define a global platform for your project
platform :ios, deployment_target
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
# add pods for desired Firebase products
# https://firebase.google.com/docs/ios/setup#available-pods
flutter_ios_podfile_setup
target 'Runner' do
use_frameworks!
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
# JUMIO CHANGES
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target) # CHANGED FOR JUMIO
if ['iProov', 'Socket.IO-Client-Swift', 'Starscream', 'DatadogSDK'].include? target.name
target.build_configurations.each do |config|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
end
end
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
# installer.pods_project.targets.each do |target|
# target.build_configurations.each do |config|
# if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 9.0
# config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
# end
# end
# end
# code below is from this thread: https://stackoverflow.com/questions/73711671/flutter-ios-build-error-select-a-development-team-in-the-signing-capabiliti
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"
target.build_configurations.each do |config|
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
end
end
end
end
end