libPhoneNumber-iOS icon indicating copy to clipboard operation
libPhoneNumber-iOS copied to clipboard

Getting "Class X is implemented in both": seems like PrivateFrameworks/BusinessChatService.framework defines the same classes as libPhoneNumberiOS

Open acecilia opened this issue 3 years ago • 3 comments

Hello 👋

I am experiencing random crashes when running tests on a framework that depends on libPhoneNumberiOS. Before the crash I see these lines on the log:

objc[32559]: Class NBMetadataHelper is implemented in both /Applications/Xcode-12.5.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/BusinessChatService.framework/BusinessChatService (0x7fff828b72f0) and /Users/<build_dir>/HostApp.app/PlugIns/<my_tests>/Frameworks/libPhoneNumberiOS.framework/libPhoneNumberiOS (0x10f4f3958). One of the two will be used. Which one is undefined.
objc[32559]: Class NBPhoneNumberDesc is implemented in both /Applications/Xcode-12.5.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/BusinessChatService.framework/BusinessChatService (0x7fff828b8330) and /Users/<build_dir>/HostApp.app/PlugIns/<my_tests>/Frameworks/libPhoneNumberiOS.framework/libPhoneNumberiOS (0x10f4f39a8). One of the two will be used. Which one is undefined.
objc[32559]: Class NBPhoneNumber is implemented in both /Applications/Xcode-12.5.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/BusinessChatService.framework/BusinessChatService (0x7fff828b8a10) and /Users/<build_dir>/HostApp.app/PlugIns/<my_tests>/Frameworks/libPhoneNumberiOS.framework/libPhoneNumberiOS (0x10f4f39f8). One of the two will be used. Which one is undefined.
objc[32559]: Class NBRegExMatcher is implemented in both /Applications/Xcode-12.5.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/BusinessChatService.framework/BusinessChatService (0x7fff828b83a8) and /Users/<build_dir>/HostApp.app/PlugIns/<my_tests>/Frameworks/libPhoneNumberiOS.framework/libPhoneNumberiOS (0x10f4f3a70). One of the two will be used. Which one is undefined.
objc[32559]: Class NBPhoneNumberUtil is implemented in both /Applications/Xcode-12.5.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/BusinessChatService.framework/BusinessChatService (0x7fff828b8e98) and /Users/<build_dir>/HostApp.app/PlugIns/<my_tests>/Frameworks/libPhoneNumberiOS.framework/libPhoneNumberiOS (0x10f4f3ac0). One of the two will be used. Which one is undefined.
objc[32559]: Class NBNumberFormat is implemented in both /Applications/Xcode-12.5.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/BusinessChatService.framework/BusinessChatService (0x7fff828b9140) and /Users/<build_dir>/HostApp.app/PlugIns/<my_tests>/Frameworks/libPhoneNumberiOS.framework/libPhoneNumberiOS (0x10f4f3ae8). One of the two will be used. Which one is undefined.
objc[32559]: Class NBPhoneMetaData is implemented in both /Applications/Xcode-12.5.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/BusinessChatService.framework/BusinessChatService (0x7fff828b8150) and /Users/<build_dir>/HostApp.app/PlugIns/<my_tests>/Frameworks/libPhoneNumberiOS.framework/libPhoneNumberiOS (0x10f4f3b38). One of the two will be used. Which one is undefined.
objc[32559]: Class NBAsYouTypeFormatter is implemented in both /Applications/Xcode-12.5.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/BusinessChatService.framework/BusinessChatService (0x7fff828b7ac0) and /Users/<build_dir>/HostApp.app/PlugIns/<my_tests>/Frameworks/libPhoneNumberiOS.framework/libPhoneNumberiOS (0x10f4f3b88). One of the two will be used. Which one is undefined.
objc[32559]: Class NBRegularExpressionCache is implemented in both /Applications/Xcode-12.5.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/BusinessChatService.framework/BusinessChatService (0x7fff828b7430) and /Users/<build_dir>/HostApp.app/PlugIns/<my_tests>/Frameworks/libPhoneNumberiOS.framework/libPhoneNumberiOS (0x10f4f3bd8). One of the two will be used. Which one is undefined.

I am not sure what conclusion to extract from this. Is apple depending on libPhoneNumberiOS for their private frameworks? Is anybody experiencing the same? Thanks!

Using libPhoneNumberiOS 0.9.15

acecilia avatar Nov 10 '21 12:11 acecilia

@paween your feedback would be very much appreciated, I run out of ideas with this one 😞

acecilia avatar Nov 23 '21 19:11 acecilia

just wanted to chime in that we're experiencing the same warning. However, it isn't causing any crashes--it is just printing that warning in the console.

jagdeep-manik avatar Dec 02 '21 01:12 jagdeep-manik

For me it is flaky and crashing very few times, only detected because I run the related tests many times as part of a CI job for flaky test detection. The print I think only happens when crashing, otherwise I see no print at all and code tests green

acecilia avatar Dec 02 '21 02:12 acecilia