Flutter - Phone Auth Verification ID is getting null sometimes for iOS - ios

My App got rejected 4th time in review from Apple team, they are saying App is crashing on tap of verify OTP button. They have shared a crash log, After checking the log I got to know that app is crashing due to null verification ID.
However everything is working perfectly locally and Android version is live, I have tested in real device & in emulator. Now I am not able to understand why verification ID is getting null sometime. I have already added try catch to handle exception, But that is not working in iOS, But working in Android.
Can someone please help me on this.
Below is the crash log...
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 9
Last Exception Backtrace:
(0x1ae904a48 0x1ae62bfa4 0x1ae8085a8 0x1ae908af4 0x1ae90aa7c 0x10264cc88 0x102648d58 0x1026489ec 0x1ae5d0610 0x1ae5d1184 0x1ae57d404 0x1ae57ddf8 0x1ae587314 0x1ae620b88 0x1ae623760)
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0:
0 libsystem_kernel.dylib 0x00000001ae6da634 0x1ae6d7000 + 13876
1 libsystem_kernel.dylib 0x00000001ae6d9aa0 0x1ae6d7000 + 10912
2 CoreFoundation 0x00000001ae882288 0x1ae7d9000 + 692872
3 CoreFoundation 0x00000001ae87d3a8 0x1ae7d9000 + 672680
4 CoreFoundation 0x00000001ae87cadc 0x1ae7d9000 + 670428
5 GraphicsServices 0x00000001b8802328 0x1b87ff000 + 13096
6 UIKitCore 0x00000001b2977ae0 0x1b1f74000 + 10500832
7 Runner 0x000000010263edf4 0x102638000 + 28148
8 libdyld.dylib 0x00000001ae706360 0x1ae705000 + 4960
Thread 1 name: com.apple.uikit.eventfetch-thread
Thread 1:
0 libsystem_kernel.dylib 0x00000001ae6da634 0x1ae6d7000 + 13876
1 libsystem_kernel.dylib 0x00000001ae6d9aa0 0x1ae6d7000 + 10912
2 CoreFoundation 0x00000001ae882288 0x1ae7d9000 + 692872
3 CoreFoundation 0x00000001ae87d3a8 0x1ae7d9000 + 672680
4 CoreFoundation 0x00000001ae87cadc 0x1ae7d9000 + 670428
5 Foundation 0x00000001aebbc7f4 0x1aebb5000 + 30708
6 Foundation 0x00000001aebbc6d4 0x1aebb5000 + 30420
7 UIKitCore 0x00000001b2a10204 0x1b1f74000 + 11125252
8 Foundation 0x00000001aeced0a4 0x1aebb5000 + 1278116
9 libsystem_pthread.dylib 0x00000001ae61fd8c 0x1ae615000 + 44428
10 libsystem_pthread.dylib 0x00000001ae62376c 0x1ae615000 + 59244

Related

iOS React Native Testflight EXC_CRASH(SIGABRT) only for the Apple Tester

For some reasons our internal testers was able to run the app but somehow the apple beta tester says the app crashes as soon as the app launches. They provided me with this error
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 1
Application Specific Information:
abort() called
Last Exception Backtrace:
(0x18d80827c 0x18c9e29f8 0x101124b94 0x101121108 0x18d80f900 0x18d6f14d0 0x18d6f2104 0x101137f20 0x1011778b4 0x101177614 0x18d247a38 0x18d2487d4 0x18d1f1324 0x18d1f1e40 0x18d1fa4ac 0x18d428114 0x18d42acd4)
Thread 1 name: Dispatch queue:com.facebook.react.ExceptionsManagerQueue
Thread 1 Crashed:
0 libsystem_kernel.dylib 0x000000018d3a50dc 0x18d382000 + 143580
1 libsystem_pthread.dylib 0x000000018d41e094 0x18d41c000 + 8340
2 libsystem_c.dylib 0x000000018d2feea8 0x18d2a4000 + 372392
3 libc++abi.dylib 0x000000018c9cb788 0x18c9ca000 + 6024
4 libc++abi.dylib 0x000000018c9cb934 0x18c9ca000 + 6452
5 libobjc.A.dylib 0x000000018c9e2e00 0x18c9dd000 + 24064
6 libc++abi.dylib 0x000000018c9d7838 0x18c9ca000 + 55352
7 libc++abi.dylib 0x000000018c9d78c4 0x18c9ca000 + 55492
8 libdispatch.dylib 0x000000018d2487e8 0x18d1e8000 + 395240
9 libdispatch.dylib 0x000000018d1f1324 0x18d1e8000 + 37668
10 libdispatch.dylib 0x000000018d1f1e40 0x18d1e8000 + 40512
11 libdispatch.dylib 0x000000018d1fa4ac 0x18d1e8000 + 74924
12 libsystem_pthread.dylib 0x000000018d428114 0x18d41c000 + 49428
13 libsystem_pthread.dylib 0x000000018d42acd4 0x18d41c000 + 60628
im really not sure why the apple developer is experiencing crashes while the rest of the team was able to run the app normally through the testflight

How to handle crash from notification service extension crash?

Getting weird from notification service extension
I think this might be due to sending of AWS event from receivedNotification method which might be taking more time that causes OS killing it. if this the scenario then how should i handle the crash and prevent it.
please check the crash logs,
Exception Type: EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace ASSERTIOND, Code 0xdead10cc
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001c829bed0 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001c829b3a8 mach_msg + 72
2 CoreFoundation 0x00000001c869fbc4 __CFRunLoopServiceMachPort + 236
3 CoreFoundation 0x00000001c869aa60 __CFRunLoopRun + 1396
4 CoreFoundation 0x00000001c869a1cc CFRunLoopRunSpecific + 436
5 Foundation 0x00000001c908f404 -[NSRunLoop+ 33796 (NSRunLoop) runMode:beforeDate:] + 300
6 Foundation 0x00000001c90cadf4 -[NSRunLoop+ 278004 (NSRunLoop) run] + 88
7 libxpc.dylib 0x00000001c836c070 _xpc_objc_main + 516
8 libxpc.dylib 0x00000001c836ea30 xpc_main + 180
9 Foundation 0x00000001c90ccdb0 +[NSXPCListener serviceListener] + 0
10 PlugInKit 0x00000001ce2eb498 0x1ce2d8000 + 79000
11 PlugInKit 0x00000001ce2eb2c4 0x1ce2d8000 + 78532
12 PlugInKit 0x00000001ce2eb848 0x1ce2d8000 + 79944
13 Foundation 0x00000001c92b46bc NSExtensionMain + 64
14 libdyld.dylib 0x00000001c815abb4 start + 4
#Sumeet.Jain you need to set debug executable on your extension
project their are some steps here.
step 1: select your service extension project to run
step 2: you will see list of your project below some option "SELECT EDIT SCHEME" option
step 3: after then you have to go for RUN -> INFO -> EXECUTABLE
step 4: and you should change "ASK TO LAUNCH" to "YOUR PROJECT"
THATS IT.

My app is rejected with Exception EXC_BREAKPOINT (SIGTRAP)

I tested my app on iPhone and iPad devices and it works fine, also I tested it on iOS 10.1.1 and on IPV6 network and it also works fine but after uploading my app to the app store, it is rejected because it crashes when login if the device is offline or on Wifi. They gave me a crash report and after I symplocited it, I get thhis Info :
Date/Time: 2016-11-01 10:07:03.2150 -0700
Launch Time: 2016-11-01 10:05:21.7124 -0700
OS Version: iPhone OS 10.1 (14B72)
Report Version: 104
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000001000f18c0
Termination Signal: Trace/BPT trap: 5
Termination Reason: Namespace SIGNAL, Code 0x5
Terminating Process: exc handler [0]
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 MyApp -[FIRMessagingSecureSocket closeStream:] (in MyApp) + 56
1 MyApp -[FIRMessagingRmq2PersistentStore openDatabase:] (in MyApp) + 228
2 MyApp -[FIRMessagingReceiver didSendDataMessageWithID:] (in MyApp) + 128
3 Foundation 0x00000001835e08f8
4 CoreFoundation 0x0000000182aa48f4
5 CoreFoundation 0x0000000182aa4608
6 CoreFoundation 0x0000000182aa3ec4
7 CoreFoundation 0x0000000182aa1ac0
8 CoreFoundation 0x00000001829d0048
9 GraphicsServices 0x0000000184456198
10 UIKit 0x00000001889b42fc
11 UIKit 0x00000001889af034
12 MyApp -[FIRMessagingClient tryToConnect] (in MyApp) + 212
13 libdyld.dylib 0x00000001819b45b8
update :
I published new version put also get this crash log
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000001000a1658
Termination Signal: Trace/BPT trap: 5
Termination Reason: Namespace SIGNAL, Code 0x5
Terminating Process: exc handler [0]
Triggered by Thread: 0
Filtered syslog:
None found
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 MyApp [FIRAMeasurement setUserAttributeOnWorkerQueue:] (in MyApp) + 580
1 MyApp [FIRAMeasurement uploadData] (MyApp) + 180 0x100054000 + 303808
2 MyApp [FIRAMeasurement reportOSUpdateOnWorkerQueue] (in PetCasa Vet) + 124
3 Foundation 0x0000000187acc8f8 0x1879c1000 + 1095928
4 CoreFoundation 0x0000000186f908f4 0x186eb3000 + 907508
5 CoreFoundation 0x0000000186f90608 0x186eb3000 + 906760
6 CoreFoundation 0x0000000186f8fec4 0x186eb3000 + 904900
7 CoreFoundation 0x0000000186f8dac0 0x186eb3000 + 895680
8 CoreFoundation 0x0000000186ebc048 0x186eb3000 + 36936
9 GraphicsServices 0x0000000188942198 0x188936000 + 49560
10 UIKit 0x000000018cea02fc 0x18ce25000 + 504572
11 UIKit 0x000000018ce9b034 0x18ce25000 + 483380
12 MyApp 0x00000001000907d8 (in MyApp) + 448
13 libdyld.dylib 0x0000000185ea05b8 0x185e9c000 + 17848
and this log crash :
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000001000e5658
Termination Signal: Trace/BPT trap: 5
Termination Reason: Namespace SIGNAL, Code 0x5
Terminating Process: exc handler [0]
Triggered by Thread: 0
Filtered syslog:
None found
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 MyApp 0x00000001000e5658 (in MyApp) + 1060
1 MyApp [FIRMessagingConnection loginRequestWithToken:authID:] (in MyApp) + 300
2 MyApp [FIRMessagingConnection initWithAuthID:token:host:port:runLoop:rmq2Manager:gcmManager:] (in MyApp) + 32
3 Foundation 0x0000000187acc8f8 0x1879c1000 + 1095928
4 CoreFoundation 0x0000000186f908f4 0x186eb3000 + 907508
5 CoreFoundation 0x0000000186f90608 0x186eb3000 + 906760
6 CoreFoundation 0x0000000186f8fec4 0x186eb3000 + 904900
7 CoreFoundation 0x0000000186f8dac0 0x186eb3000 + 895680
8 CoreFoundation 0x0000000186ebc048 0x186eb3000 + 36936
9 GraphicsServices 0x0000000188942198 0x188936000 + 49560
10 UIKit 0x000000018cea02fc 0x18ce25000 + 504572
11 UIKit 0x000000018ce9b034 0x18ce25000 + 483380
12 MyApp [FIRInstanceIDRegistrationClient parseToken:authToken:withRequestID:handler:] (in MyApp) + 564
13 libdyld.dylib 0x0000000185ea05b8 0x185e9c000 + 17848
From apple documentation
Trace Trap [EXC_BREAKPOINT // SIGTRAP]
......
......
Swift code will terminate with this exception type if an unexpected
condition is encountered at runtime such as:
1- a non-optional type with a nil
2- value a failed forced type conversion
In my app I use location and I send it to backend, and it works fine, but when opening app at first time, system show alert to say that my app want to use your location allow or not allow, if user didn't allow so location methods will not work and location will be nil and unfortunately I didn't check if location is nil so when unwrap it app crashed, it's my mistake.
Please send message to the Apple review team about same and ask to them
"We tested application on iPhone 6, 6s, 7 and 7+ with iOS 10.x and application works perfect in IPV6 network, We follow following process for IPV6 network: http://www.brianjcoleman.com/tutorial-how-to-test-your-app-for-ipv6-compatibility/" and request to them your event will be held on the coming week so, please release application to store asap and let me know the flow of the application, where you find issue or crashes.
It works, I had done same thing with 4 application and they approved.

2.1 - Apps that crash will be rejected

I made a PhoneGap/cordova app with Sencha Touch. When I build it in newest stable XCode and using the Developer key/prov. profile, I can deploy it to my iPhone and browse the interface. But when I then submit it to apple using the deployment key, I get:
We were unable to review your app, as it crashed on launch. We have attached detailed crash logs to help troubleshoot this issue.
and the log contains like:
Last Exception Backtrace:
(0x1831e42d8 0x1949040e4 0x1831e3f5c 0x18401d480 0x18310f520 0x1880447a0 0x1880465a8 0x187eb1ec4 0x187eb10e0 0x187eaf778 0x18b8c53c8 0x18319c27c 0x18319b384 0x1831999a8 0x1830c52d4 0x187c9043c 0x187c8afac 0x10007afec 0x194f82a08)
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x000000019509b270 0x195080000 + 111216
1 libsystem_pthread.dylib 0x000000019513916c 0x195134000 + 20844
2 libsystem_c.dylib 0x0000000195012b14 0x194fb0000 + 404244
3 libc++abi.dylib 0x00000001940d1414 0x1940d0000 + 5140
4 libc++abi.dylib 0x00000001940f0b88 0x1940d0000 + 134024
5 libobjc.A.dylib 0x00000001949043bc 0x1948fc000 + 33724
6 libc++abi.dylib 0x00000001940edbb0 0x1940d0000 + 121776
7 libc++abi.dylib 0x00000001940ed738 0x1940d0000 + 120632
8 libobjc.A.dylib 0x0000000194904290 0x1948fc000 + 33424
9 CoreFoundation 0x00000001830c5380 0x1830bc000 + 37760
10 UIKit 0x0000000187c90438 0x187c14000 + 508984
11 UIKit 0x0000000187c8afa8 0x187c14000 + 487336
12 lightController 0x000000010007afe8 0x100074000 + 28648
13 libdyld.dylib 0x0000000194f82a04 0x194f80000 + 10756
with (12) being my app. I am not sure how this log may help. How can I get to the root of the problem? (As I said, deploying to my iPhone works!)

ios app runs perfectly in debug mode but crashes in release

My app crashes in certain moments in release build. I don't know if it is important but I use mainly c++ with cocos2d-x framework. I tried setting optimization level to none but it won't work too. I get this output in console :
libc++abi.dylib: terminating with uncaught exception of type std::out_of_range: map::at: key not found
This is part of the crash log:
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x3870d1f0 0x386fa000 + 78320
1 libsystem_pthread.dylib 0x38777792 0x38774000 + 14226
2 libsystem_c.dylib 0x386bdfd8 0x38675000 + 298968
3 libc++abi.dylib 0x379eccd2 0x379ec000 + 3282
4 libc++abi.dylib 0x37a056aa 0x379ec000 + 104106
5 libobjc.A.dylib 0x3814af86 0x38147000 + 16262
6 libc++abi.dylib 0x37a031c4 0x379ec000 + 94660
7 libc++abi.dylib 0x37a02d28 0x379ec000 + 93480
8 libobjc.A.dylib 0x3814ae12 0x38147000 + 15890
9 CoreFoundation 0x2d3d2f80 0x2d3cb000 + 32640
10 CoreFoundation 0x2d3d2cee 0x2d3cb000 + 31982
11 GraphicsServices 0x3230565e 0x322fc000 + 38494
12 UIKit 0x2fd1e168 0x2fcb0000 + 450920
13 BumpRace iOS 0x00044b1e 0x4000 + 264990
14 libdyld.dylib 0x38657ab4 0x38656000 + 6836
Any help would be apprieciated.
You must use iOS instruments tool. To debug you memory leaks. As possible to conclude from youre ERROR message.
Small useful link.

Resources