facebook-ios-sdk icon indicating copy to clipboard operation
facebook-ios-sdk copied to clipboard

Application crashes at launch with error: Library not loaded: @rpath/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics

Open ricsantos opened this issue 2 years ago • 11 comments

Checklist before submitting a bug report

Xcode version

14.2

Facebook iOS SDK version

16.0.0

Dependency Manager

CocoaPods

SDK Framework

Core

Goals

App to launch

Expected results

App doesn't crash

Actual results

App crashes with error:

dyld[61917]: Library not loaded: @rpath/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics
  Referenced from: <88642464-0425-3FEE-9B92-8D28201DC608> /Users/ricsantos/Library/Developer/CoreSimulator/Devices/87DE27D3-5B45-411A-8A72-E9CE118D3DE3/data/Containers/Bundle/Application/1932DED3-D3BD-4434-AF63-A257AC001C2F/redacted.app/redacted
  Reason: tried: '/Users/ricsantos/Library/Developer/Xcode/DerivedData/redacted-egtwuuvzcdkvsbeakesglyajsnny/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics' (errno=2), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics' (errno=2), '/usr/lib/swift/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics' (errno=2, not in dyld cache), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics' (errno=2), '/usr/lib/swift/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics' (errno=2, not in dyld cache), '/Users/ricsantos/Library/Developer/CoreSimulator/Devices/87DE27D3-5B45-411A-8A72-E9CE118D3DE3/data/Containers/Bundle/Application/1932DED3-D3BD-4434-AF63-A257AC001C2F/redacted.app/Frameworks/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics' (errno=2), '/Users/ricsantos/Library/Developer/CoreSimulator/Devices/87DE27D3-5B45-411A-8A72-E9CE118D3DE3/data/Containers/Bundle/Application/1932DED3-D3BD-4434-AF63-A257AC001C2F/redacted.app/Frameworks/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics' (errno=2), '/Users/ricsantos/Library/Developer/CoreSimulator/Devices/87DE27D3-5B45-411A-8A72-E9CE118D3DE3/data/Containers/Bundle/Application/1932DED3-D3BD-4434-AF63-A257AC001C2F/redacted.app/Frameworks/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics' (errno=2), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics' (errno=2), '/usr/lib/swift/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics' (errno=2, not in dyld cache), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics' (errno=2), '/usr/lib/swift/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics' (errno=2, not in dyld cache), '/Users/ricsantos/Library/Developer/CoreSimulator/Devices/87DE27D3-5B45-411A-8A72-E9CE118D3DE3/data/Containers/Bundle/Application/1932DED3-D3BD-4434-AF63-A257AC001C2F/redacted.app/Frameworks/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics' (errno=2), '/Users/ricsantos/Library/Developer/CoreSimulator/Devices/87DE27D3-5B45-411A-8A72-E9CE118D3DE3/data/Containers/Bundle/Application/1932DED3-D3BD-4434-AF63-A257AC001C2F/redacted.app/Frameworks/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics' (errno=2), '/Users/ricsantos/Library/Developer/CoreSimulator/Devices/87DE27D3-5B45-411A-8A72-E9CE118D3DE3/data/Containers/Bundle/Application/1932DED3-D3BD-4434-AF63-A257AC001C2F/redacted.app/Frameworks/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics' (errno=2), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics' (errno=2)
Library not loaded: @rpath/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics
  Referenced from: <88642464-0425-3FEE-9B92-8D28201DC608> /Users/ricsantos/Library/Developer/CoreSimulator/Devices/87DE27D3-5B45-411A-8A72-E9CE118D3DE3/data/Containers/Bundle/Application/1932DED3-D3BD-4434-AF63-A257AC001C2F/redacted.app/redacted
  Reason: tried: '/Users/ricsantos/Library/Developer/Xcode/DerivedData/redacted-egtwuuvzcdkvsbeakesglyajsnny/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics' (errno=2), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics' (errno=2), '/usr/lib/swift/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics' (errno=2, not in dyld cache), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/Runtime
dyld config: DYLD_SHARED_CACHE_DIR=/Users/ricsantos/Library/Developer/CoreSimulator/Caches/dyld/22D49/com.apple.CoreSimulator.SimRuntime.iOS-16-2.20C52 DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot DYLD_LIBRARY_PATH=/Users/ricsantos/Library/Developer/Xcode/DerivedData/redacted-egtwuuvzcdkvsbeakesglyajsnny/Build/Products/Debug-iphonesimulator:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libBacktraceRecording.dylib:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libMainThreadChecker.dylib:/usr/lib/libRPAC.dylib:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib DYLD_FRAMEWORK_PATH=/Users/ricsantos/Library/Developer/Xcode/DerivedData/redacted-egtwuuvzcdkvsbeakesglyajsnny/Build/Products/Debug-iphonesimulator DYLD_FALLBACK_FRAMEWORK_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks DYLD_FALLBACK_LIBRARY_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib

Steps to reproduce

Install via cocapods:

pod 'FBSDKCoreKit', '~> 16.0'
pod 'FBSDKLoginKit', '~> 16.0'
pod 'FBSDKShareKit', '~> 16.0'

Code samples & details

No response

ricsantos avatar Feb 14 '23 04:02 ricsantos

There are workarounds on https://stackoverflow.com/questions/31610368/project-error-with-fbsdkcorekit but prefer not to use a workaround.

ricsantos avatar Feb 14 '23 04:02 ricsantos

Looks like same issue as #2169

ricsantos avatar Feb 23 '23 00:02 ricsantos

Reading the integration instructions https://developers.facebook.com/docs/ios/getting-started it no longer mentions CocoaPods, maybe that install method is not longer supported.

Installing Facebook SDK 16.0.0 via Swift Packages worked for me.

ricsantos avatar Feb 23 '23 01:02 ricsantos

I also encounter this today.

alvincrisuy avatar Feb 26 '23 09:02 alvincrisuy

Installing Facebook SDK 16.0.0 via Swift Packages worked for me.

@ricsantos I only installed it via Swift Packages and the error is still there

topclaudy avatar Feb 27 '23 21:02 topclaudy

@ricsantos What did you specify for "Up to Next Major" in the Swift Packages installation dialog?

topclaudy avatar Feb 27 '23 21:02 topclaudy

I used 16.0.0. I actually ended up rolling back to 14.1.0 via CocoaPods because although the project would build, it wouldn't archive 😭.

ricsantos avatar Feb 27 '23 22:02 ricsantos

@ricsantos Thanks for the tip. I'll try 14.1.0 when I have a moment.

topclaudy avatar Feb 28 '23 13:02 topclaudy

Hey @KylinChang just wondering if you are able to give any feedback on this?

ricsantos avatar Mar 14 '23 21:03 ricsantos

@dastochsuper

mspaansen avatar Mar 19 '23 08:03 mspaansen

I've recently updated to 16.1.0 and it seems ok, so can probably close this ticket (seeing as nothing doing anyway...) cc @KylinChang

ricsantos avatar Jun 01 '23 00:06 ricsantos