Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facebook Unity SDK crash iOS app when app launch #193

Open
yong-qin opened this issue Oct 16, 2018 · 17 comments
Open

Facebook Unity SDK crash iOS app when app launch #193

yong-qin opened this issue Oct 16, 2018 · 17 comments

Comments

@yong-qin
Copy link

I integrated Facebook SDK for Unity into my app, but I got app watchdog timeout crash when app start. The crash get app review rejected by Apple.
It looks process is blocked in clearing cache of keychain.

Exception Note:  EXC_CORPSE_NOTIFY
    Termination Reason: Namespace SPRINGBOARD, Code 0x8badf00d
    Termination Description: SPRINGBOARD, scene-create watchdog transgression: jp.co.bandainamcoent.BNEI0348 exhausted real (wall clock) time allowance of 19.35 seconds | ProcessVisibility: Foreground | ProcessState: Running | WatchdogEvent: scene-create | WatchdogVisibility: Foreground | WatchdogCPUStatistics: ( | "Elapsed total CPU time (seconds): 23.410 (user 23.410, system 0.000), 39% CPU", | "Elapsed application CPU time (seconds): 0.450, 1% CPU" | )
    Triggered by Thread:  0

    Thread 0 name: Dispatch queue: com.apple.main-thread
    Thread 0 Crashed:
    0 libsystem_kernel.dylib 0x00000001a808ced0 0x1a8075000 + 98000
    1 libsystem_kernel.dylib 0x00000001a808c3a8 0x1a8075000 + 95144
    2 libdispatch.dylib 0x00000001a7ef1318 0x1a7eda000 + 95000
    3 libdispatch.dylib 0x00000001a7ef17ac 0x1a7eda000 + 96172
    4 libxpc.dylib 0x00000001a8153eb4 0x1a8149000 + 44724
    5 Security 0x00000001a91a3948 0x1a9184000 + 129352
    6 Security 0x00000001a91a3f14 0x1a9184000 + 130836
    7 Security 0x00000001a91fcdbc 0x1a9184000 + 495036
    8 Security 0x00000001a91fc4f8 0x1a9184000 + 492792
    9 Security 0x00000001a91faf48 0x1a9184000 + 487240
    10 Security 0x00000001a91fb7e0 0x1a9184000 + 489440
    11 Security 0x00000001a91f9554 0x1a9184000 + 480596
    12 Security 0x00000001a91fbdd8 0x1a9184000 + 490968
    13 BNEI0348 0x0000000102aaeaa4 -[FBSDKKeychainStore setData:forKey:accessibility:] + 31845028 (FBSDKKeychainStore.m:118)
    14 BNEI0348 0x0000000102aae750 -[FBSDKKeychainStore setDictionary:forKey:accessibility:] + 31844176 (FBSDKKeychainStore.m:52)
    15 BNEI0348 0x0000000102a99f84 -[FBSDKAccessTokenCacheV4 clearCache] + 31760260 (FBSDKAccessTokenCacheV4.m:95)
    16 BNEI0348 0x0000000102a99d08 -[FBSDKAccessTokenCacheV4 fetchAccessToken] + 31759624 (FBSDKAccessTokenCacheV4.m:62)
    17 BNEI0348 0x0000000102a862e0 -[FBSDKAccessTokenCache fetchAccessToken] + 31679200 (FBSDKAccessTokenCache.m:32)
    18 BNEI0348 0x0000000102a90518 -[FBSDKApplicationDelegate application:didFinishLaunchingWithOptions:] + 31720728 (FBSDKApplicationDelegate.m:187)
    19 BNEI0348 0x0000000101dcce4c -[FBUnityInterface didFinishLaunching:] + 18337356 (FBUnityInterface.mm:73)
    20 CoreFoundation 0x00000001a846fd14 0x1a83e5000 + 568596
    21 CoreFoundation 0x00000001a846fce0 0x1a83e5000 + 568544
    22 CoreFoundation 0x00000001a846f1d0 0x1a83e5000 + 565712
    23 CoreFoundation 0x00000001a846ee7c 0x1a83e5000 + 564860
    24 CoreFoundation 0x00000001a83e71c0 0x1a83e5000 + 8640
    25 CoreFoundation 0x00000001a846e908 0x1a83e5000 + 563464
    26 Foundation 0x00000001a8e7deb0 0x1a8e77000 + 28336
    27 UIKitCore 0x00000001d4ac3e8c 0x1d4765000 + 3534476
    28 UIKitCore 0x00000001d4ac97ac 0x1d4765000 + 3557292
@dreamolight
Copy link
Contributor

Hi @yong-qin, which version of SDK are you using?

@yong-qin
Copy link
Author

yong-qin commented Oct 16, 2018

@dreamolight
Copy link
Contributor

Hi @yong-qin, Facebook Unity SDK version 7.10.1 uses Facebook iOS SDK version 4.22.0, which was released 1 and half years ago, do you mind updating your Facebook Unity SDK to latest version? The issue is not necessary caused by the FBSDKKeyChainStore. It looks like a deadlock that caused by dispatch_once_f. Please let me know if you can still reproduce the issue after updating.

@yong-qin
Copy link
Author

yong-qin commented Oct 16, 2018

Thanks, I try to update SDK to latest version.

@bluerainorange
Copy link

I also had the same problem. The version of sdk I used was 4.36.0. Is the problem solved by upgrading to the latest version 4.38.0?

@bluerainorange
Copy link

Exception Type: EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace SPRINGBOARD, Code 0x8badf00d
Termination Description: SPRINGBOARD, scene-create watchdog transgression: com.my.demo exhausted real (wall clock) time allowance of 19.62 seconds | ProcessVisibility: Foreground | ProcessState: Running | WatchdogEvent: scene-create | WatchdogVisibility: Foreground | WatchdogCPUStatistics: ( | "Elapsed total CPU time (seconds): 33.040 (user 33.040, system 0.000), 55% CPU", | "Elapsed application CPU time (seconds): 2.232, 4% CPU" | )
Triggered by Thread: 0

Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x000000023ade3ea4 0x23adcc000 + 97956
1 libsystem_kernel.dylib 0x000000023ade337c 0x23adcc000 + 95100
2 libdispatch.dylib 0x000000023ac482d0 0x23ac31000 + 94928
3 libdispatch.dylib 0x000000023ac48764 0x23ac31000 + 96100
4 libxpc.dylib 0x000000023aeabeb4 0x23aea1000 + 44724
5 Security 0x000000023befdaac 0x23bede000 + 129708
6 Security 0x000000023befe070 0x23bede000 + 131184
7 Security 0x000000023bf57188 0x23bede000 + 496008
8 Security 0x000000023bf568c4 0x23bede000 + 493764
9 Security 0x000000023bf55314 0x23bede000 + 488212
10 Security 0x000000023bf55bac 0x23bede000 + 490412
11 Security 0x000000023bf53920 0x23bede000 + 481568
12 Security 0x000000023bf561a4 0x23bede000 + 491940
13 MyDemo 0x00000001018d20f4 -[FBSDKKeychainStore setData:forKey:accessibility:] + 13934836 (FBSDKKeychainStore.m:118)
14 MyDemo 0x00000001018d1da4 -[FBSDKKeychainStore setDictionary:forKey:accessibility:] + 13933988 (FBSDKKeychainStore.m:52)
15 MyDemo 0x00000001018b616c -[FBSDKAccessTokenCacheV4 clearCache] + 13820268 (FBSDKAccessTokenCacheV4.m:95)
16 MyDemo 0x00000001018b5ef4 -[FBSDKAccessTokenCacheV4 fetchAccessToken] + 13819636 (FBSDKAccessTokenCacheV4.m:62)
17 MyDemo 0x000000010189ff2c -[FBSDKAccessTokenCache fetchAccessToken] + 13729580 (FBSDKAccessTokenCache.m:0)
18 MyDemo 0x00000001018aa7d8 -[FBSDKApplicationDelegate application:didFinishLaunchingWithOptions:] + 13772760 (FBSDKApplicationDelegate.m:0)
19 MyDemo 0x00000001032bcfac -[AppDelegate application:didFinishLaunchingWithOptions:] + 41111468 (AppDelegate.m:229)
20 UIKitCore 0x0000000268126560 0x267846000 + 9307488
21 UIKitCore 0x0000000268127cc8 0x267846000 + 9313480
22 UIKitCore 0x000000026812d714 0x267846000 + 9336596
23 UIKitCore 0x00000002679c9074 0x267846000 + 1585268
24 UIKitCore 0x00000002679d1cf4 0x267846000 + 1621236
25 UIKitCore 0x00000002679c8cf0 0x267846000 + 1584368
26 UIKitCore 0x00000002679c9690 0x267846000 + 1586832
27 UIKitCore 0x00000002679c7790 0x267846000 + 1578896
28 UIKitCore 0x00000002679c743c 0x267846000 + 1578044
29 UIKitCore 0x00000002679cc5fc 0x267846000 + 1598972
30 UIKitCore 0x00000002679cd55c 0x267846000 + 1602908
31 UIKitCore 0x00000002679cc4b4 0x267846000 + 1598644
32 UIKitCore 0x00000002679d13a0 0x267846000 + 1618848
33 UIKitCore 0x000000026812bc0c 0x267846000 + 9329676
34 UIKitCore 0x0000000267d1697c 0x267846000 + 5048700
35 FrontBoardServices 0x000000023dc8f9d4 0x23dc83000 + 51668
36 FrontBoardServices 0x000000023dc9a79c 0x23dc83000 + 96156
37 FrontBoardServices 0x000000023dc99e94 0x23dc83000 + 93844
38 libdispatch.dylib 0x000000023ac92484 0x23ac31000 + 398468
39 libdispatch.dylib 0x000000023ac35e10 0x23ac31000 + 19984
40 FrontBoardServices 0x000000023dccea9c 0x23dc83000 + 309916
41 FrontBoardServices 0x000000023dcce728 0x23dc83000 + 309032
42 FrontBoardServices 0x000000023dcced44 0x23dc83000 + 310596
43 CoreFoundation 0x000000023b1e91f0 0x23b13d000 + 705008
44 CoreFoundation 0x000000023b1e9170 0x23b13d000 + 704880
45 CoreFoundation 0x000000023b1e8a54 0x23b13d000 + 703060
46 CoreFoundation 0x000000023b1e3920 0x23b13d000 + 682272
47 CoreFoundation 0x000000023b1e31f0 0x23b13d000 + 680432
48 GraphicsServices 0x000000023d45c584 0x23d451000 + 46468
49 UIKitCore 0x000000026812f4c0 0x267846000 + 9344192
50 MyDemo 0x000000010331c3dc main + 41501660 (main.m:14)
51 libdyld.dylib 0x000000023aca2bb4 0x23aca2000 + 2996

@renattou
Copy link

Our build was rejected by Apple because it was crashing on startup and the crash log was the same as @bluerainorange. We can't reproduce it though. This began after we upgraded the SDK from v7.11.0 to v7.15.1 (iOS v4.39.1).

@yong-qin did you get to resolve your issue?

@renattou
Copy link

renattou commented Feb 27, 2019

Here's the log that Apple sent us:

Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Termination Reason: Namespace SPRINGBOARD, Code 0x8badf00d
Termination Description: SPRINGBOARD, scene-create watchdog transgression: com.my.app exhausted real (wall clock) time allowance of 18.96 seconds | ProcessVisibility: Foreground | ProcessState: Running | WatchdogEvent: scene-create | WatchdogVisibility: Foreground | WatchdogCPUStatistics: ( | "Elapsed total CPU time (seconds): 27.370 (user 27.370, system 0.000), 46% CPU", | "Elapsed application CPU time (seconds): 0.655, 1% CPU" | )
Triggered by Thread:  0

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_kernel.dylib        	0x00000001b927fea4 0x1b9268000 + 97956
1   libsystem_kernel.dylib        	0x00000001b927f37c 0x1b9268000 + 95100
2   libdispatch.dylib             	0x00000001b90e42d0 0x1b90cd000 + 94928
3   libdispatch.dylib             	0x00000001b90e4764 0x1b90cd000 + 96100
4   libxpc.dylib                  	0x00000001b9347ea0 0x1b933d000 + 44704
5   Security                      	0x00000001ba39aaac 0x1ba37b000 + 129708
6   Security                      	0x00000001ba39b070 0x1ba37b000 + 131184
7   Security                      	0x00000001ba3f4188 0x1ba37b000 + 496008
8   Security                      	0x00000001ba3f38c4 0x1ba37b000 + 493764
9   Security                      	0x00000001ba3f2314 0x1ba37b000 + 488212
10  Security                      	0x00000001ba3f2bac 0x1ba37b000 + 490412
11  Security                      	0x00000001ba3f0920 0x1ba37b000 + 481568
12  Security                      	0x00000001ba3f31a4 0x1ba37b000 + 491940
13  MyApp                         	0x0000000101db9f84 -[FBSDKKeychainStore setData:forKey:accessibility:] + 20225924 (FBSDKKeychainStore.m:113)
14  MyApp                         	0x0000000101db9c34 -[FBSDKKeychainStore setDictionary:forKey:accessibility:] + 20225076 (FBSDKKeychainStore.m:45)
15  MyApp                         	0x0000000101d98890 -[FBSDKAccessTokenCacheV4 clearCache] + 20088976 (FBSDKAccessTokenCacheV4.m:95)
16  MyApp                         	0x0000000101d98618 -[FBSDKAccessTokenCacheV4 accessToken] + 20088344 (FBSDKAccessTokenCacheV4.m:0)
17  MyApp                         	0x0000000101d7db08 -[FBSDKAccessTokenCache accessToken] + 19979016 (FBSDKAccessTokenCache.m:0)
18  MyApp                         	0x0000000101d8a0b8 -[FBSDKApplicationDelegate application:didFinishLaunchingWithOptions:] + 20029624 (FBSDKApplicationDelegate.m:0)
19  MyApp                         	0x0000000101d897b8 +[FBSDKApplicationDelegate initializeWithLaunchData:] + 20027320 (FBSDKApplicationDelegate.m:104)
20  CoreFoundation                	0x00000001b966483c 0x1b95d9000 + 571452
21  CoreFoundation                	0x00000001b9664808 0x1b95d9000 + 571400
22  CoreFoundation                	0x00000001b9663cf8 0x1b95d9000 + 568568
23  CoreFoundation                	0x00000001b96639a4 0x1b95d9000 + 567716
24  CoreFoundation                	0x00000001b95dbb80 0x1b95d9000 + 11136
25  CoreFoundation                	0x00000001b9663430 0x1b95d9000 + 566320
26  Foundation                    	0x00000001ba074ca0 0x1ba06e000 + 27808
27  UIKitCore                     	0x00000001e65cd534 0x1e5cec000 + 9311540
28  UIKitCore                     	0x00000001e65d2e54 0x1e5cec000 + 9334356
29  UIKitCore                     	0x00000001e5e6e93c 0x1e5cec000 + 1583420
30  UIKitCore                     	0x00000001e5e775bc 0x1e5cec000 + 1619388
31  UIKitCore                     	0x00000001e5e6e5b8 0x1e5cec000 + 1582520
32  UIKitCore                     	0x00000001e5e6ef58 0x1e5cec000 + 1584984
33  UIKitCore                     	0x00000001e5e6d058 0x1e5cec000 + 1577048
34  UIKitCore                     	0x00000001e5e6cd04 0x1e5cec000 + 1576196
35  UIKitCore                     	0x00000001e5e71ec4 0x1e5cec000 + 1597124
36  UIKitCore                     	0x00000001e5e72e24 0x1e5cec000 + 1601060
37  UIKitCore                     	0x00000001e5e71d7c 0x1e5cec000 + 1596796
38  UIKitCore                     	0x00000001e5e76c68 0x1e5cec000 + 1617000
39  UIKitCore                     	0x00000001e65d134c 0x1e5cec000 + 9327436
40  UIKitCore                     	0x00000001e61bc244 0x1e5cec000 + 5046852
41  FrontBoardServices            	0x00000001bc12c9d4 0x1bc120000 + 51668
42  FrontBoardServices            	0x00000001bc13779c 0x1bc120000 + 96156
43  FrontBoardServices            	0x00000001bc136e94 0x1bc120000 + 93844
44  libdispatch.dylib             	0x00000001b912e484 0x1b90cd000 + 398468
45  libdispatch.dylib             	0x00000001b90d1e10 0x1b90cd000 + 19984
46  FrontBoardServices            	0x00000001bc16ba9c 0x1bc120000 + 309916
47  FrontBoardServices            	0x00000001bc16b728 0x1bc120000 + 309032
48  FrontBoardServices            	0x00000001bc16bd44 0x1bc120000 + 310596
49  CoreFoundation                	0x00000001b96860e0 0x1b95d9000 + 708832
50  CoreFoundation                	0x00000001b9686060 0x1b95d9000 + 708704
51  CoreFoundation                	0x00000001b9685944 0x1b95d9000 + 706884
52  CoreFoundation                	0x00000001b9680810 0x1b95d9000 + 686096
53  CoreFoundation                	0x00000001b96800e0 0x1b95d9000 + 684256
54  GraphicsServices              	0x00000001bb8f9584 0x1bb8ee000 + 46468
55  UIKitCore                     	0x00000001e65d4c00 0x1e5cec000 + 9341952
56  MyApp                         	0x0000000100a76d70 main + 28016 (main.mm:33)
57  libdyld.dylib                 	0x00000001b913ebb4 0x1b913e000 + 2996

@chedabob
Copy link

chedabob commented Apr 1, 2019

@renattou Did you ever find a solution to this? We've got the same rejection from Apple, but on a non-Unity app. We can't reproduce it on 9 different devices, but Apple have done it consistently 3 times on one device.

Upgrading from 4.39.0 to 4.42.0 seems to have gotten us through App Review, however I can't really see anything in the github diffs of facebook-objc-sdk to suggest anything was changed that would fix the keychain issue.

@renattou
Copy link

renattou commented Apr 1, 2019

@chedabob We didn't find a solution. Since we couldn't reproduce the crash, we just tried making a new build with no changes, submitted it and it actually got approved. So maybe the upgrade really didn't have anything to do with your build getting through review. My guess is that our builds got tested on a different device on the second time.

@marslin1220
Copy link

Upgrade to 4.44.1 and still have the same issue ;(

@SendorWang
Copy link

5.0.0 still have the same issue ;(

@duongntb94
Copy link

I had the same issue. But after increasing build number and resubmitting again, app got approved from Apple.

@cometa93
Copy link

cometa93 commented Sep 9, 2019

Did someone made any progress under this issue?

@codmw44
Copy link

codmw44 commented Apr 29, 2020

I have the same issue on Facebook Unity SDK 7.17.2 with Unity 2019.3.0f1

Executing termination for reason (none) with request: <FBSProcessTerminationRequest: 0x283e57ec0; label: "watchdog provision violated"; exceptionCode: "Watchdog Violation (0x8BADF00D)"; reportType: CrashLog; explanation: "process-launch watchdog transgression: application<com.appquantum.idlefarmer>:2944 exhausted real (wall clock) time allowance of 20.00 seconds">

@NumaNumaNuma
Copy link

Same issue today with Unity 2019.4.1 , iOS 13.5.1 and FB SDK 7.19.2, rejected by Apple but can't reproduce the crash locally using xcode or testflight builds.

@deirvlon
Copy link

deirvlon commented Jan 5, 2021

Hi everyone, I can't find how to solve this issue for a newer version of the SDK but I somehow managed to find a working form of SDK.

My solution is to use the older and sustainable version of the SDK.
I am using "facebook-unity-sdk-7.17.2.unitypackage", it works fine.

On the iOS side, you need to add 5 .frameworks in order to manage to work.

image

image

After adding these .frameworks to the project you can build it.

You can get the error 'RegisterMonoModules.h' file not found

This is the solution of error Just comment out the line
#323

This is the link for both the frameworks and unitypackage:

https://drive.google.com/file/d/1qu1-ePRCnhRKaSicv9KSa9A1yRYKEJK8/view?usp=sharing

I hope it will be beneficial for everybody to solve the Facebook SDK problem )
Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests