facebook / facebook-ios-sdk

Used to integrate the Facebook Platform with your iOS & tvOS apps.
https://developers.facebook.com/docs/ios
Other
7.8k stars 3.56k forks source link

FB SDK v15.1.0. FB Messenger crashes on startup when using FBSDKMessageDialog to share link #2177

Open MTPirate89 opened 1 year ago

MTPirate89 commented 1 year ago

Checklist before submitting a bug report

Xcode version

14.2

Facebook iOS SDK version

15.1.0, 16.0.0

Dependency Manager

CocoaPods

SDK Framework

Share

Goals

Share link via FBSDKMessageDialog with FB Messenger app installed.

Expected results

Actual results

FB Messenger crashes on startup

Steps to reproduce

Just configure a FBSDKMessageDialog with FBSDKShareLinkContent.contentURL and showWithContent it.

Code samples & details

FBSDKShareLinkContent *content = [[FBSDKShareLinkContent alloc] init];
    content.contentURL = [NSURL URLWithString:url];

    [FBSDKMessageDialog showWithContent:content delegate:self];
MTPirate89 commented 1 year ago

FB Messenger crash log added Messenger 05.02.2023, 11-01.txt

abelokon0711 commented 1 year ago

We are experiencing the same issue with the versions above 14.1.0

haolifeng415 commented 6 months ago

@abelokon0711 @MTPirate89 @alloy hi, how did you fix this

blaugold commented 2 months ago

We are still having this issue and validated that it started with FB SDK 15.1.0. FB SDK 15.0.0 works fine.

We need to use FB SDK 17.0.0 though, to satisfy Apple's Privacy Manifest requirements.

Here is an excerpt of a Facebook Messenger crash report that happened immediately after initiating the share (full crash report):

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Incident Identifier: 3E0419BF-D02C-41D3-8D09-1A7EBE54A3A5
CrashReporter Key:   92a35ad5f91427ca856770d6bc3a1a4b88f5ff38
Hardware Model:      iPhone16,1
Process:             Messenger [30033]
Path:                /private/var/containers/Bundle/Application/DAF96382-0668-4C67-9A01-6A56E3748A41/Messenger.app/Messenger
Identifier:          com.facebook.Messenger
Version:             469.0.0 (627618824)
AppStoreTools:       15F31e
AppVariant:          1:iPhone16,1:17
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           com.facebook.Messenger [4686]

Date/Time:           2024-08-05 15:38:28.1128 +0200
Launch Time:         2024-08-05 15:09:15.2738 +0200
OS Version:          iPhone OS 17.5.1 (21F90)
Release Type:        User
Baseband Version:    1.60.02
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread:  0

Application Specific Information:
abort() called

Thread 0 name:   Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_kernel.dylib                 0x1ea9a742c __pthread_kill + 8
1   libsystem_pthread.dylib                0x1fe746c0c pthread_kill + 267
2   libsystem_c.dylib                      0x1a984aba0 abort + 179
3   LightSpeedCore                         0x10363c30c abort_no_merge + 28
4   LightSpeedCore                         0x1037ce9d0 __MCFCastToClassNullable + 32
5   LightSpeedCore                         0x1041e2090 MSGBroadcastFlowIntentCreate + 8452
6   LightSpeedCore                         0x1041e1c6c MSGBroadcastFlowIntentCreate + 7392
7   LightSpeedCore                         0x1043031d0 LSHandleURLForKey + 84
8   LightSpeedCore                         0x103d09d0c LSGestureRecognizerRemoveHandler + 1520
9   LightSpeedCore                         0x103f4cbd0 LSIsMessengerBundleIdentifier + 6168
10  LightSpeedCore                         0x103c90d64 MSGCAuthSessionLoadUser + 5156
11  UIKitCore                              0x1a49b0d18 __58-[UIApplication _applicationOpenURLAction:payload:origin:]_block_invoke + 1023
12  UIKitCore                              0x1a49b0768 -[UIApplication _applicationOpenURLAction:payload:origin:] + 787
13  UIKitCore                              0x1a3fb2598 -[_UIOpenURLApplicationBSActionHandler _respondToApplicationActions:fromTransitionContext:] + 355
14  UIKitCore                              0x1a3fae808 -[UIApplication _handleNonLaunchSpecificActions:forScene:withTransitionContext:completion:] + 283
15  UIKitCore                              0x1a3d21f98 -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 419
16  UIKitCore                              0x1a3dece7c -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 243
17  UIKitCore                              0x1a3deca5c -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 335
18  FrontBoardServices                     0x1ba5556e4 -[FBSScene updater:didUpdateSettings:withDiff:transitionContext:completion:] + 659
19  FrontBoardServices                     0x1ba565844 __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke_2 + 151
20  FrontBoardServices                     0x1ba5656cc -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 167
21  FrontBoardServices                     0x1ba56a7fc __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke + 343
22  libdispatch.dylib                      0x1a9791dd4 _dispatch_client_callout + 19
23  libdispatch.dylib                      0x1a979586c _dispatch_block_invoke_direct + 287
24  FrontBoardServices                     0x1ba566d58 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 51
25  FrontBoardServices                     0x1ba566cd8 -[FBSMainRunLoopSerialQueue _targetQueue_performNextIfPossible] + 239
26  FrontBoardServices                     0x1ba566bb0 -[FBSMainRunLoopSerialQueue _performNextFromRunLoopSource] + 27
27  CoreFoundation                         0x1a18bf834 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 27
28  CoreFoundation                         0x1a18bf7c8 __CFRunLoopDoSource0 + 175
29  CoreFoundation                         0x1a18bd298 __CFRunLoopDoSources0 + 243
30  CoreFoundation                         0x1a18bc484 __CFRunLoopRun + 827
31  CoreFoundation                         0x1a18bbcd8 CFRunLoopRunSpecific + 607
32  GraphicsServices                       0x1e676c1a8 GSEventRunModal + 163
33  UIKitCore                              0x1a3ef490c -[UIApplication _run] + 887
34  UIKitCore                              0x1a3fa89d0 UIApplicationMain + 339
35  Messenger                              0x102de076c XPluginsGetFuncPtr + 1040
36  dyld                                   0x1c4f6de4c start + 2239
Ysiel commented 1 month ago

Same issue here with version 17.1

Reproducible simply in the sample app provided with the framework using MessageDialog instead of ShareDialog.