Unverified Commit fe11f57c authored by Jenn Magder's avatar Jenn Magder Committed by GitHub

Detect ARM ffi CocoaPods bus error (#101796)

parent ba89942f
......@@ -360,7 +360,7 @@ class CocoaPods {
' pod repo update\n',
emphasis: true,
);
} else if (stdout.contains('ffi_c.bundle') && stdout.contains('LoadError') &&
} else if ((stdout.contains('ffi_c.bundle') || stdout.contains('/ffi/')) &&
_operatingSystemUtils.hostPlatform == HostPlatform.darwin_arm) {
// https://github.com/flutter/flutter/issues/70796
UsageEvent(
......
......@@ -494,6 +494,7 @@ Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by
final Map<String, String> possibleErrors = <String, String>{
'symbol not found': 'LoadError - dlsym(0x7fbbeb6837d0, Init_ffi_c): symbol not found - /Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1/lib/ffi_c.bundle',
'incompatible architecture': "LoadError - (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/lib/ffi_c.bundle' (no such file) - /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi_c.bundle",
'bus error': '/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi/library.rb:275: [BUG] Bus Error at 0x000000010072c000',
};
possibleErrors.forEach((String errorName, String cocoaPodsError) {
testUsingContext('ffi $errorName failure on ARM macOS prompts gem install', () async {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment