I tested app on 10 different iOS devices, with and without Internet connection, with direct build and with Testflight build - app works. I tried different language settings, different regional settings - it works.
When I submit it for review it gets rejected for reason "Performance - 2.1" - app crash for them on first view.
Here is crash log Apple review team sent:
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000001000a5d6c
Triggered by Thread: 0
Filtered syslog:
None found
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 App name 0x00000001000a5d6c 0x100050000 + 351596
1 App name 0x00000001000a2dac 0x100050000 + 339372
2 UIKit 0x00000001882f0be8 -[UIApplication sendAction:to:from:forEvent:] + 100
3 UIKit 0x00000001882f0b64 -[UIControl sendAction:to:forEvent:] + 80
4 UIKit 0x00000001882d8870 -[UIControl _sendActionsForEvents:withEvent:] + 436
5 UIKit 0x00000001882f0454 -[UIControl touchesEnded:withEvent:] + 572
6 UIKit 0x00000001882f0084 -[UIWindow _sendTouchesForEvent:] + 804
7 UIKit 0x00000001882e8c20 -[UIWindow sendEvent:] + 784
8 UIKit 0x00000001882b904c -[UIApplication sendEvent:] + 248
9 UIKit 0x00000001882b7628 _UIApplicationHandleEventQueue + 6568
10 CoreFoundation 0x000000018311909c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
11 CoreFoundation 0x0000000183118b30 __CFRunLoopDoSources0 + 540
12 CoreFoundation 0x0000000183116830 __CFRunLoopRun + 724
13 CoreFoundation 0x0000000183040c50 CFRunLoopRunSpecific + 384
14 GraphicsServices 0x0000000184928088 GSEventRunModal + 180
15 UIKit 0x0000000188322088 UIApplicationMain + 204
16 App name 0x0000000100086d1c 0x100050000 + 224540
17 libdyld.dylib 0x0000000182bde8b8 start + 4
Whatever I try (as described at top of question) I can't make app crash. I really can't figure out what is different in settings that they use on their test devices and in settings on devices I use for test (please note again: I'm not testing on one or two - I tested on 10 devices). I also tried on several last versions of iOS and (of course) on version 9.3.3 they use for test - it works.
I would really appreciate some advice regarding crash log here or how to make some configuration to make this app crash (so I can debug it).
Related
My app was rejected with this reason:
Your app crashed on iPad running iOS 13.4.1 on WiFi when we:
Tapped on any locked content
Tapped on the settings icon
We have attached detailed crash logs to help troubleshoot this issue.
I tested my app. Everything work fine. How can I find the error?
One of three crashlogs:
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x000000010403514c
Termination Signal: Trace/BPT trap: 5
Termination Reason: Namespace SIGNAL, Code 0x5
Terminating Process: exc handler [630]
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 appTime 0x000000010403514c 0x104014000 + 135500
1 appTime 0x00000001040351b8 0x104014000 + 135608
2 UIKitCore 0x00000001acfece08 -[UIViewController _sendViewDidLoadWithAppearanceProxyObjectTaggingEnabled] + 100
3 UIKitCore 0x00000001acff1898 -[UIViewController loadViewIfRequired] + 936
4 UIKitCore 0x00000001acff1ca0 -[UIViewController view] + 28
5 UIKitCore 0x00000001acf1cccc -[_UIFullscreenPresentationController _setPresentedViewController:] + 80
6 UIKitCore 0x00000001acf10810 -[UIPresentationController initWithPresentedViewController:presentingViewController:] + 188
7 UIKitCore 0x00000001ad0014bc -[UIViewController _presentViewController:withAnimationController:completion:] + 2616
8 UIKitCore 0x00000001ad004014 __63-[UIViewController _presentViewController:animated:completion:]_block_invoke + 104
9 UIKitCore 0x00000001ad00451c -[UIViewController _performCoordinatedPresentOrDismiss:animated:] + 508
10 UIKitCore 0x00000001ad003f64 -[UIViewController _presentViewController:animated:completion:] + 196
11 UIKitCore 0x00000001ad0041d0 -[UIViewController presentViewController:animated:completion:] + 164
12 UIKitCore 0x00000001ad791db0 __67-[UIStoryboardModalSegueTemplate newDefaultPerformHandlerForSegue:]_block_invoke + 248
13 UIKitCore 0x00000001ad796ac4 -[UIStoryboardSegueTemplate _performWithDestinationViewController:sender:] + 292
14 UIKitCore 0x00000001ad796970 -[UIStoryboardSegueTemplate _perform:] + 92
15 UIKitCore 0x00000001acff43b0 -[UIViewController performSegueWithIdentifier:sender:] + 104
16 appTime 0x0000000104023c44 0x104014000 + 64580
17 appTime 0x0000000104023338 0x104014000 + 62264
18 UIKitCore 0x00000001ad80bb4c -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:isCellMultiSelect:] + 1200
19 UIKitCore 0x00000001ad80b684 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 108
20 UIKitCore 0x00000001ad80be8c -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 268
21 UIKitCore 0x00000001ad63b94c _runAfterCACommitDeferredBlocks + 316
22 UIKitCore 0x00000001ad62b2f4 _cleanUpAfterCAFlushAndRunDeferredBlocks + 232
23 UIKitCore 0x00000001ad65b744 _afterCACommitHandler + 76
24 CoreFoundation 0x00000001a9504fb8 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
25 CoreFoundation 0x00000001a94ffeac __CFRunLoopDoObservers + 420
26 CoreFoundation 0x00000001a9500328 __CFRunLoopRun + 968
27 CoreFoundation 0x00000001a94ffc34 CFRunLoopRunSpecific + 424
28 GraphicsServices 0x00000001b364938c GSEventRunModal + 160
29 UIKitCore 0x00000001ad63222c UIApplicationMain + 1932
30 appTime 0x000000010401b3ec 0x104014000 + 29676
31 libdyld.dylib 0x00000001a9387800 start + 4
Short answer, you use the crashlog to identify the part of code where the app crashed, and be effective with writing a fix.
Now the long answer:
Refer to the Technical Note TN2151 - Understanding and Analyzing Application Crash Reports on Apple Developer website.
When an application crashes, a crash report is created and stored on the device. Crash reports describe the conditions under which the application terminated, in most cases including a complete backtrace for each executing thread, and are typically very useful for debugging issues in the application. You should look at these crash reports to understand what crashes your application is having, and then try to fix them.
and
Crash reports with backtraces need to be symbolicated before they can be analyzed. Symbolication replaces memory addresses with human-readable function names and line numbers. If you get crash logs off a device through Xcode's Devices window, then they will be symbolicated for you automatically after a few seconds. Otherwise you will need to symbolicate the .crash file yourself by importing it to the Xcode Devices window. See Symbolicating Crash Reports for details.
So to put it simply, when you build your app with Xcode, the compiler also generates debug symbols. You should generally store the debug symbols in a dSYM file corresponding to the build that you submit for review.
If your app crashes during review, the App Store Review team member fetches and shares the crash log with you. Now the crash log contains machine (assembly language) instructions, and your can use Xcode to symbolicate the crash report. Doing this would convert the machine symbols into the name of identifies that you have in your code, which would help you with determining the section of code where the crash occurred.
Consider reading the attached technical note to understand how you can easily determine the part of code where your app crashed and be more effective with fix.
React Native should automatically fallback to using the offline bundle, which it saves on the first run, if it cannot find a running packager. This is mentioned in Running react-native app on iOS device using offline bundle.
However, in my case, after disconnecting the phone from the WiFi and launching the app, it just hangs on a pre-cached page (or image of a page), and it's often the last loaded page (i.e. the last page that was loaded when the app was connected to the packager). This one is counter-intuitive because you'd think that after closing the app, it wouldn't persist any local state.
I'm not sure why this happens in my case. Here is the relevant log-trace from my device and it's crashing in isPackagerRunning which seems to be attempting to make some sort request to a URL. Should it even be attempting to do this? I can try logging the URL it's trying to connect to I suppose.
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x0000000186eaf260 semaphore_wait_trap + 8
1 libdispatch.dylib 0x0000000186d9d5e8 _os_semaphore_wait + 24
2 libdispatch.dylib 0x0000000186d9cca0 _dispatch_semaphore_wait_slow + 140
3 CFNetwork 0x000000018858eb9c CFURLConnectionSendSynchronousRequest + 284
4 CFNetwork 0x00000001885bb154 +[NSURLConnection sendSynchronousRequest:returningResponse:error:] + 120
5 resiShare 0x00000001003d4334 -[RCTBundleURLProvider isPackagerRunning:] (RCTBundleURLProvider.m:76)
6 resiShare 0x00000001003d45e4 -[RCTBundleURLProvider guessPackagerHost] (RCTBundleURLProvider.m:92)
7 resiShare 0x00000001003d47f4 -[RCTBundleURLProvider packagerServerHost] (RCTBundleURLProvider.m:106)
8 resiShare 0x00000001003d49b8 -[RCTBundleURLProvider jsBundleURLForBundleRoot:fallbackResource:] (RCTBundleURLProvider.m:123)
9 resiShare 0x00000001000cad6c -[AppDelegate application:didFinishLaunchingWithOptions:] (AppDelegate.m:23)
10 UIKit 0x000000018e0732dc -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 380
11 UIKit 0x000000018e27f800 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3452
12 UIKit 0x000000018e2852a8 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1684
13 UIKit 0x000000018e299de0 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke.3151 + 48
14 UIKit 0x000000018e28253c -[UIApplication workspaceDidEndTransaction:] + 168
15 FrontBoardServices 0x0000000189a7b884 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 36
16 FrontBoardServices 0x0000000189a7b6f0 -[FBSSerialQueue _performNext] + 176
17 FrontBoardServices 0x0000000189a7baa0 -[FBSSerialQueue _performNextFromRunLoopSource] + 56
18 CoreFoundation 0x0000000187e81424 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
19 CoreFoundation 0x0000000187e80d94 __CFRunLoopDoSources0 + 540
20 CoreFoundation 0x0000000187e7e9a0 __CFRunLoopRun + 744
21 CoreFoundation 0x0000000187daed94 CFRunLoopRunSpecific + 424
22 UIKit 0x000000018e06c45c -[UIApplication _run] + 652
23 UIKit 0x000000018e067130 UIApplicationMain + 208
24 resiShare 0x00000001000cb1d0 main (main.m:16)
25 libdyld.dylib 0x0000000186dbd59c start + 4
I've posted a workaround here - https://github.com/facebook/react-native/issues/10187 in the hopes that someone better versed with objective-c and url loading will take a look and put in the proper fix. Hope this helps. Thanks.
The issue is that a synchronous request is made from the main thread at load time in order to figure out whether the react packager (remote server running on the same network) is accessible. This can take awhile for reasons beyond my knowledge (if someone can expound on this, I'd be grateful), but apple will crash the app if this takes longer than 19 seconds (approx).
My app is working perfectly fine in development but switching to production / AdHoc release it crashes on the transition to the third UIViewController of my application flow.
Between the build there shouldn't be any difference. I have retrieved the log from the Devices window:
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000001000d49ac
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 MYAPP 0x00000001000d49ac 0x100010000 + 805292
1 UIKit 0x00000001868a8954 -[UIViewController loadViewIfRequired] + 688
2 UIKit 0x00000001868a8664 -[UIViewController view] + 28
3 UIKit 0x0000000186f9c1cc -[_UIFullscreenPresentationController _setPresentedViewController:] + 72
4 UIKit 0x0000000186ba378c -[UIPresentationController initWithPresentedViewController:presentingViewController:] + 116
5 UIKit 0x0000000186bbeb4c -[UIViewController _presentViewController:withAnimationController:completion:] + 1968
6 UIKit 0x0000000186bc0f64 __62-[UIViewController presentViewController:animated:completion:]_block_invoke + 116
7 UIKit 0x0000000186995c48 -[UIViewController presentViewController:animated:completion:] + 212
8 MYAPP 0x0000000100090dcc 0x100010000 + 527820
9 MYAPP 0x0000000100090bd0 0x100010000 + 527312
10 PromiseKit 0x000000010032a9f4 0x1002e8000 + 272884
11 PromiseKit 0x00000001002ee820 0x1002e8000 + 26656
12 libdispatch.dylib 0x00000001936c1990 _dispatch_call_block_and_release + 20
13 libdispatch.dylib 0x00000001936c1950 _dispatch_client_callout + 12
14 libdispatch.dylib 0x00000001936c6208 _dispatch_main_queue_callback_4CF + 1604
15 CoreFoundation 0x00000001820522e8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
16 CoreFoundation 0x0000000182050390 __CFRunLoopRun + 1488
17 CoreFoundation 0x0000000181f7d1f0 CFRunLoopRunSpecific + 392
18 GraphicsServices 0x000000018b39f6f8 GSEventRunModal + 164
19 UIKit 0x000000018690e108 UIApplicationMain + 1484
20 MYAPP 0x00000001000be820 0x100010000 + 714784
21 libdyld.dylib 0x00000001936eea04 start + 0
What is bugging me:
There is a clear inconsistency between the environments I am working on.
The calls from MYAPP doesn't seem to be linked to any component / method call. I'm working with Swift maybe it does cause problem to resolve symbols. Which could make sense since PromiseKit calls are also unresolved.
I have no idea about how to debug this, not even about how to put log everywhere (because I wouldn't know how to get them).
Any help is welcome!
In Build settings, try changing Swift compiler -> Optimization Level -> Release to None. There's still a bug where sometimes the compiler messes up closures when optimizations are on. Maybe that's what's happening to you.
I have a strange issue.
After my App reboots, my Launch Image won't disappear and my initial view of my Main Storyboard won't show.
Instead of disappearing the launch image resizes to half the width...
This started happening after I added a launch image.
When I manually remove the launch image, it doesn't matter, the App still shows the launch image, even after removing it from XCode.
Here is screenshots of what is happening:
Anyone seen this before and knows how to fix this?
EDIT: (Additional info)
I could no longer select my main storyboard in the project summary.
All other storyboards were visible but not the main storyboard.
Also as a result of that, the app was working fine in debugger, but it would crash straight away when it was distributed over TestFlight. I wouldn't even get TestFlight logs. The following CrashReport on the device directed me into the right way:
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Crashed Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x3235029e __exceptionPreprocess + 158
1 libobjc.A.dylib 0x39fce97a objc_exception_throw + 26
2 UIKit 0x344e537c +[UIStoryboard storyboardWithName:bundle:] + 436
3 UIKit 0x3432758e -[UIApplication _loadMainStoryboardFileNamed:bundle:] + 38
4 UIKit 0x341b079c -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 524
5 UIKit 0x34158c34 -[UIApplication handleEvent:withNewEvent:] + 1000
6 UIKit 0x341586c8 -[UIApplication sendEvent:] + 68
7 UIKit 0x34158116 _UIApplicationHandleEvent + 6150
8 GraphicsServices 0x35e4a59e _PurpleEventCallback + 586
9 GraphicsServices 0x35e4a1ce PurpleEventCallback + 30
10 CoreFoundation 0x3232516e __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 30
11 CoreFoundation 0x32325112 __CFRunLoopDoSource1 + 134
12 CoreFoundation 0x32323f94 __CFRunLoopRun + 1380
13 CoreFoundation 0x32296eb8 CFRunLoopRunSpecific + 352
14 CoreFoundation 0x32296d44 CFRunLoopRunInMode + 100
15 UIKit 0x341af480 -[UIApplication _run] + 664
16 UIKit 0x341ac2fc UIApplicationMain + 1116
17 visitconnect-ios 0x00047e82 main (main.m:16)
18 libdyld.dylib 0x3a405b1c start + 0
This is where I found the answer:
XCode 4.2 MainStoryBoard Not Found
The reference to my MainStoryboard file somehow got corrupted.
This wasn't showing in the Simulator (other than the above symptoms) but when distributing the App over TestFlight, it would crash the App even before [TestFlight takeoff:] took place (meaning I had no logging at all in TestFlight).
I had to delete the references to the original MainStoryBoard.storyboard and put it back in the project by dragging it from finder back into xcode
Seems a bit lame to answer my own question, but anyway, for other people who might run into the same problem, hopefully this points you in the right direction.
I'm getting crash reports for my iOS app with the following or similar stack in the crashed thread:
0 TextInput 0x0003149a TIInputManager::apply_case_changes_to_result(std::vector >&, KB::Hashmap const&, std::vector > const&) const + 402
1 TextInput 0x00030bf3 TIInputManager::lookup() + 863
2 TextInput 0x000307ad TIInputManager::autocorrection() + 61
3 TextInput 0x00042d21 -[TIKeyboardInputManagerZephyr autocorrection] + 137
4 UIKit 0x0011a319 -[UIKeyboardImpl generateCandidatesWithOptions:] + 377
5 UIKit 0x00133071 -[UIKeyboardImpl addInputString:fromVariantKey:] + 2597
6 UIKit 0x00130f8d -[UIKeyboardImpl handleKeyEvent:] + 1453
7 UIKit 0x001308b7 -[UIKeyboardLayoutStar sendStringAction:forKey:isPopupVariant:] + 487
8 UIKit 0x0012f3ad -[UIKeyboardLayoutStar touchUp:] + 3101
9 UIKit 0x0012e737 -[UIKeyboardLayout touchesEnded:withEvent:] + 387
10 UIKit 0x000165f9 -[UIWindow _sendTouchesForEvent:] + 525
11 UIKit 0x00003809 -[UIApplication sendEvent:] + 381
12 UIKit 0x00003123 _UIApplicationHandleEvent + 6155
13 GraphicsServices 0x000065a3 _PurpleEventCallback + 591
14 GraphicsServices 0x000061d3 PurpleEventCallback + 35
15 CoreFoundation 0x00097173 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 35
16 CoreFoundation 0x00097117 __CFRunLoopDoSource1 + 139
17 CoreFoundation 0x00095f99 __CFRunLoopRun + 1385
18 CoreFoundation 0x00008ebd CFRunLoopRunSpecific + 357
19 CoreFoundation 0x00008d49 CFRunLoopRunInMode + 105
20 GraphicsServices 0x000052eb GSEventRunModal + 75
21 UIKit 0x00057301 UIApplicationMain + 1121
22 MyApp 0x0000294b main (main.mm:8)
Only the bottom-most line (main) is mine. It looks like the crash is somewhere in an touch up event handler within the text input framework, and it has to do with autocorrect.
Those crashes come with disheartening consistency - this looks like a subtle bug of mine, not that of iOS itself. The call stack is inconsistent - sometimes it ends in UIKit, sometimes in libobjc. The iOS version, however, seems to be consistently 6.x.
Any idea how to debug this, please?
EDIT: SIGSEGV/SEGV_ACCERR in thread 0. The error address varies - sometimes, it's zero, sometimes not.
This is actually an error with Apple. Go into your Settings on the simulator (the Settings app on the sim, that is) and turn off auto correction.
I've seen the same on iOS 6.1.3 (twice) and 6.1.4 (once), all in the field reported as crashlogs. All seem to be nil pointer dereferences deep within Apple's C++ code for . I don't think that there is anything that we can do beyond filing a bug report with Apple (I've raised one listed as: 15573020). Apple treat duplicate reports as an indicator of prioritisation of bugs so if you have suffered I suggest that you add a report at https://bugreport.apple.com and reference the report I have provided.