Flutter app crash with debug build in TestFlight - ios

We are developing a flutter application and are trying to test it via TestFlight. It uses amplify. If we submit a release build, it works well and can be tested. If we submit a debug build it crashes on start. By debug build I mean that in Product -> Scheme -> Edit Scheme -> Archive -> Build Configuration is Debug.
When debugging on simulator or a device via VSCode if Start Debugging is selected and under Breakpoints All Exceptions is selected, the app crashes with PlatformException:
PlatformException (PlatformException(SignedOutException, Translating
platform exception failed. Please take a look at
https://github.com/aws-amplify/amplify-flutter/issues to see if there
are any existing issues that match your scenario, and file an issue
with the details of the bug if there isn't., {recoverySuggestion:
Please sign in and reattempt the operation., message: You are
currently signed out.}, null))
If the option All Exceptions is not selected, this doesn't get triggered and the app runs successfully. This may not be connected at all, but is the only place, where the app seems like it's crashing when running it.
This is from the crash report on the iPhone:
Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype:
KERN_INVALID_ADDRESS at 0x0000000000000000 VM Region Info: 0 is not in
any region. Bytes before following region: 4329111552
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
__TEXT 102090000-102094000 [ 16K] r-x/r-x SM=COW ...er.app/Runner Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb Terminating Process:
exc handler [559] Triggered by Thread: 0

Related

How to use a launch storyboard or XIB?

iOS App Store did not reject but downloaded app can not complete app launch
Published version in App Store stays on startup then closes.
My NativeScript-Vue app was updated from NS v6
I have re-generated splash images
runs fine through ns run ios --device or ns run ios --emulator
I can run app on iphone 6S using Xcode too
I can even publish to Apple Store and it's excepted.
But released app can not start and stays in the launch screen for a while then closes.
It looks like It's the same error I was getting in my previous attempt to build.
My app runs only if Main Interface area is empty
If I select LaunchScreen or LaunchScreen.storyboard app stays on launchScreen for ever.
Details:
I am getting errors after build analysis such as;
/Users/user/Documents/myapp-mobil/platforms/ios/Pods/MaterialComponents/components/Tabs/src
/MDCTabBarViewController.m:213:5: nil passed to a callee that requires a non-null 1st parameter
and
/Users/cemkaan/Documents/myapp-mobil/platforms/ios/sebappmobil/Resources/Assets.xcassets:1:1: Launch images are deprecated in iOS 13.0. Use a launch storyboard or XIB instead.
iOS Development Target: 12.4
It was rejected from the app store with a Binary Rejected notice
iOS crash log which I have shared as a gist. says:
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000
UNUSED SPACE AT START
__TEXT 1003e8000-1003ec000 [ 16K] r-x/r-x SM=COW ...p/myappmobil
Am I doing something wrong in Main Interface area?
Is there any way to determine; why the published version can not complete the app launch?

Unity - Distribution build crash - EXC_BAD_ACCESS - KERN_INVALID_ADDRESS

I have developed a game on Unity (2019.2.16f1) and I have a big problem :
The build submitted to the App Store crash after 1 second (on startup)
Some more informations :
I coded some c# script, but most of the game is running with Bolt (Ludiq / Visual scripting)
I use the Unity Cloud Building service (For development and distribution build)
The development build dont crash. Only the distribution build. (The one submitted to the app store connect)
I distribute the ipa file with the mac "Transporter" application
I use UnityAds in this game
Here is the main log :
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x000000000000003a
VM Region Info: 0x3a is not in any region. Bytes before following region: 4367777734
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
__TEXT 0000000104570000-0000000104574000 [ 16K] r-x/r-x SM=COW ....app/z4league
(Full Log : https://docs.google.com/document/d/1wjLG5oKqP_isgPce8ND5Nrz7wYtoiC2OIXc1cN9sPy0/edit?usp=sharing)
Did someone had this (quite obscur) problem ?
I did some research on google, but nothing seems to be appropriate to my case.
I did not find the exact solution of this problem.
What I did is remove "Bolt" from the project and re-code everything in c#.
(By the way, incredible exercise for learning to code c# in Unity)
My game is now validated by Apple and ready to go live
The problem is with the location of your project files. It is trying to access that location. It could also be a problem which is caused by app store. "The development build doesn't crash. Only the distribution build." <- This is caused by you. You did something wrong when building the app or releasing it for distribution. Try to give access to the location where you have your project files. And also try watching a tutorial for releasing your app for distribution from YouTubers like Brackeys etc.

App crash on launch Apple reject

I have test and submit my app to Apple Store but Apple reject and response my app crash on launch. I have test my app on many model iPhone and iPad it's working normal, Have anyone can tell me why?
Crash log Apple send to me:
"bug_type":"109","os_version":"iPhone OS 11.2.5 (15D60)","incident_id":"F2C32C7F-63B2-4D96-8D90-1AF644DC5179","name":""}
Incident Identifier: F2C32C7F-63B2-4D96-8D90-1AF644DC5179
CrashReporter Key: 31ed20e652158d2a96b6662d50b1000ce2837b82
Hardware Model: iPad5,1
Device Model: J96AP
Process: gamebaionline [5995]
Path: /private/var/containers/Bundle/Application/872913FE-A768-4837-81EB-F76C427CFBED/gamebaionline.app/gamebaionline
Version: 0 (2.0.5)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd.development [1]
Date/Time: 2018-03-03 07:05:30.9221 -0800
Launch Time: 2018-03-03 07:05:23.9926 -0800
OS Version: iPhone OS 11.2.5 (15D60)
Baseband Version: n/a
UDID: 3ab61350a5372c6a81b3d6b6ac3e5a8c7d1cd04c
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 11
Application Specific Information:
* Terminating app due to uncaught exception 'NSGenericException', reason: '* Collection was mutated while being enumerated.'
terminating with uncaught exception of type NSException
abort() called.
Now i can't test with iOS 11.2.5 because Apple not allow signing in iOS version 11.2.5 or downgrade version to 11.2.5. Please help me.
Collection was mutated while being enumerated.
This mean that you have some data structure (like dictionary or array) and you iterate over elements and in same moment modify this structure, for example remove some elements. I suppose you to check all iteration that you do on very start. Or use symbolic breakpoint to find it. Note, that such crash can be a little bit tricky, because i guess some operation like remove or so may be not performed. Because of this you may or may not have crash on start
I solved mine by doing the following,
1. Symbolicate the error logs received from Apple.
2. Delete the app completely from you actual device and run a build from Xcode on it, this time it will crash and show you the lines where the bugs are!!!

iOS app crashes with EXC_CRASH (SIGKILL) when launched via TestFlight, but runs fine from Xcode

I'm running into a strange issue whereby an app I'm building crashes shortly after launching as an archived build from TestFlight, but runs without issue when running on the same device directly from Xcode. The application doesn't appear to be terminating fully - if I double-tap the home button, I see what looks like an image of the application in the background from midway through a run, even though the new session crashed long before it would have gotten to the displayed screen. If I then bring the application back to the foreground, it returns to its loading screen and then shuts down again, with a log that looks like this:
Incident Identifier: 983F8E4E-EFE0-4C93-8F46-D223FD86DF14
CrashReporter Key: 3515df1d8c55a27394a78b6efee5f83946ed9a99
Hardware Model: iPhone7,2
Process: FileProvider [218]
Path: /private/var/containers/Bundle/Application/89708FF4-E848-4F49-BC0D-B2DC9EF536C6/Drive.app/PlugIns/FileProvider.appex/FileProvider
Identifier: com.google.Drive.FileProviderExtension
Version: 4.2017.25202 (4.2017.25202)
Code Type: ARM-64 (Native)
Role: Unspecified
Parent Process: launchd [1]
Coalition: com.google.Drive.FileProviderExtension [368]
Date/Time: 2017-06-30 22:59:01.2937 -0700
Launch Time: 2017-06-30 22:59:00.7649 -0700
OS Version: iPhone OS 10.3.2 (14F89)
Report Version: 104
Exception Type: EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace <0xF>, Code 0xdead10cc
Triggered by Thread: 0
...Any thoughts on what I should be investigating to understand what's going on here?
App is built in C++ using the Cocos2d-x framework.
Thanks!
_Kevin
Figured out what was going on, if not yet exactly why. Some of the details posted above turned out to be red herrings as I investigated further. What initially appeared to be a difference in behavior between an archived build and a build launched directly from Xcode was actually a difference in behavior between a debug build and a release build.
The solution was to create a new scheme in Xcode to run a release build (Product->Scheme->Manage Schemes in Xcode 8.3), duplicate my default mobile scheme, and then set the new scheme's Run->Info->Build Configuration to Release.
Once I ran a release build with Xcode attached, I found an error (probably an incorrectly-initialized variable but I'm still investigating) that occurred in release builds only.
The reason why crash logs weren't being generated appears to have been that the error was causing an assertion to trip (the CC_ASSERT macro in Cocos2d-x), so iOS considered the app shutdown to be a legitimate termination and didn't log it as a crash.

why different behaviour between ipa and running directly on device

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x00000000ce72bec8
when error like this happens when using ipa, but not run on simulator or directory on device,
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x00000000ce72bec8
when error like this happens when using ipa, but not run on simulator or directory on device, the reason mostly likely is the different optimization level between debug and release

Resources