Xamarin iOS App crashes immediately after startup - ios

I've got a Xamarin app, which runs as expected for a while and then, after a couple of days just crashes immediately after trying to start it. Here's the output from the XCode Console filtered by the app's package name.
default 12:54:58.536319 +0200 SpringBoard Bootstrapping foo.bar.MyApp with intent foreground-interactive
default 12:54:58.539833 +0200 assertiond Submitting new job for "foo.bar.MyApp" on behalf of <BKProcess: 0x102877f50; SpringBoard; com.apple.springboard; pid: 15264; agency: SystemShell; visibility: foreground; task: running>
default 12:54:58.540033 +0200 assertiond Submitted job with label: UIKitApplication:foo.bar.MyApp[0x44cf][62]
default 12:54:58.580322 +0200 assertiond Unable to get pid for 'UIKitApplication:foo.bar.MyApp[0x44cf][62]': No such process (3)
error 12:54:58.580490 +0200 assertiond Failed to start job with error <NSError: 0x10288ff30; domain: NSPOSIXErrorDomain; code: 3; reason: "No such process"> {
description = "Unable to get pid for label UIKitApplication:foo.bar.MyApp[0x44cf][62]";
failureReason = "No such process";
userInfo = {
BKLaunchdJobLabel = UIKitApplication:foo.bar.MyApp[0x44cf][62];
BKLaunchdOperation = launch_get_running_pid_4SB;
}
}
default 12:54:58.580757 +0200 assertiond Deleted job with label: UIKitApplication:foo.bar.MyApp[0x44cf][62]
error 12:54:58.582916 +0200 SpringBoard [foo.bar.MyApp] Bootstrap failed with error: <NSError: 0x283076850; domain: BKSProcessErrorDomain; code: 1 (bootstrap-failed); reason: "Failed to start job">
error 12:54:58.583057 +0200 SpringBoard Bootstrapping failed for <FBApplicationProcess: 0x10b1768b0; foo.bar.MyApp; pid: -1> with error: Error Domain=BKSProcessErrorDomain Code=1 "Unable to bootstrap process with bundleID foo.bar.MyApp" UserInfo={NSLocalizedDescription=Unable to bootstrap process with bundleID foo.bar.MyApp, BKSProcessExitReason=0, NSLocalizedFailureReason=Failed to start job, NSUnderlyingError=0x2832f7e10 {Error Domain=NSPOSIXErrorDomain Code=3 "No such process" UserInfo={BKLaunchdOperation=launch_get_running_pid_4SB, NSLocalizedDescription=Unable to get pid for label UIKitApplication:foo.bar.MyApp[0x44cf][62], BKLaunchdJobLabel=UIKitApplication:foo.bar.MyApp[0x44cf][62], NSLocalizedFailureReason=No such process}}, BKSProcessJobLabel=UIKitApplication:foo.bar.MyApp[0x44cf][62], BSErrorCodeDescription=bootstrap-failed}
default 12:54:58.583151 +0200 SpringBoard Adding: <FBApplicationProcess: 0x10b1768b0; foo.bar.MyApp; pid: -1>
default 12:54:58.583303 +0200 SpringBoard <FBApplicationProcess: 0x10b1768b0; foo.bar.MyApp; pid: -1> exited.
default 12:54:58.584241 +0200 SpringBoard Removing: <FBApplicationProcess: 0x10b1768b0; foo.bar.MyApp; pid: -1>
default 12:54:58.591967 +0200 SpringBoard Application process state changed for foo.bar.MyApp: <SBApplicationProcessState: 0x283c6a420; pid: -1; taskState: Not Running; visibility: Unknown>
default 12:54:58.592169 +0200 SpringBoard Process exited: <FBApplicationProcess: 0x10b1768b0; foo.bar.MyApp; pid: -1> -> <FBApplicationProcessExitContext: 0x2832cbe10; exitReason: (none); terminationReason: (none)> {
stateAtExit = <FBProcessState: 0x283c38060; pid: -1; taskState: Unknown; visibility: Unknown>;
}
default 12:54:58.592395 +0200 SpringBoard Application process state changed for foo.bar.MyApp: (null)
default 12:54:58.838065 +0200 SpringBoard Front display did change: <SBApplication: 0x2803522b0; foo.bar.MyApp>
I observed that this phenomenon always happens after a certain amount of days, which keeps me thinking that there's some certificate or something similar, which expired in the meanwhile.
Q: Is there such a thing and how can I ensure that it's longer valid?

Are you testing your application on a real device and using free provisioning profile? If so, it could be a certificate issue.
There're some limitations when you are using free provisioning profile. One of them is:
Provisioning profiles created with free provisioning will expire after
one week, and signing identities will expire after one year.
Refer to this documentation for more details: https://learn.microsoft.com/en-us/xamarin/ios/get-started/installation/device-provisioning/free-provisioning?tabs=windows#limitations.
When it has been expired, you have to use Visual Studio to generate a new ipa for deploying your app on a real device.

Related

iOS adhoc Enterprise Signed App Crashes Immediately on Some Devices

The application is signed with an Enterprise account and works fine on most of devices, but on some different devices with different iOS versions crashes immediately on splash
here is the Console log:
default 17:25:19.364457 +0330 SpringBoard Bootstrapping "Bundl ID" with intent foreground-interactive
default 17:25:19.462242 +0330 symptomsd 664 "Bundl ID": ForegroundRunning (most elevated: ForegroundRunning)
default 17:25:19.743261 +0330 SpringBoard WIFI PICKER ["Bundl ID"]: isProcessLaunch: 1, isForegroundActivation: 1, isForegroundDeactivation: 0
default 17:25:19.882549 +0330 symptomsd Entry, display name "Bundl ID" uuid 94CCE971-9F48-37E2-BB94-A7DD47298557 pid 664 isFront 1
default 17:25:19.885622 +0330 symptomsd Continue with bundle name "Bundl ID", is front 1
default 17:25:19.886169 +0330 symptomsd "Bundl ID": Foreground: true
default 17:25:19.933423 +0330 assertiond Process exited: <BKProcess: 0x1014274d0; "App Name"; "Bundl ID"; pid: 664; agency: Application; visibility: foreground; task: none; hostpid: 50>
default 17:25:20.036993 +0330 SpringBoard <FBApplicationProcess: 0x10a438400; "App Name" ("Bundl ID"); pid: 664> assertiond says the process actually exited with context: <BKSProcessExitContext: 0x281c2b0d0; reason: (none)>
default 17:25:20.037163 +0330 SpringBoard <FBApplicationProcess: 0x10a438400; "App Name" ("Bundl ID"); pid: 664> exited.
default 17:25:20.045961 +0330 SpringBoard Removing: <FBApplicationProcess: 0x10a438400; "App Name" ("Bundl ID"); pid: -1>
default 17:25:20.137150 +0330 SpringBoard Front display did change: <SBApplication: 0x282104000; "Bundl ID">
default 17:25:20.197763 +0330 SpringBoard ["Bundl ID"] Will update scene - foregroundness changed to: Background
default 17:25:20.225123 +0330 assertiond Deleted job with label: UIKitApplication:"Bundl ID"[0xb8ff][60]
default 17:25:20.225306 +0330 assertiond ["App Name":664] Deleted launchd job with label: UIKitApplication:"Bundl ID"[0xb8ff][60]
default 17:25:20.288201 +0330 assertiond Checking for deferred bootstrap request for "Bundl ID"
default 17:25:20.289644 +0330 mediaserverd -CMSessionMgr- CMSessionMgrHandleApplicationStateChange: CMSession: Client "Bundl ID" with pid '664' is now Terminated. Background entitlement: NO
default 17:25:20.303932 +0330 SpringBoard Process exited: <FBApplicationProcess: 0x10a438400; "App Name" ("Bundl ID"); pid: -1> -> <FBApplicationProcessExitContext: 0x2810a8cc0; exitReason: (none); terminationReason: (none)> {
stateAtExit = <FBProcessState: 0x281f72180; pid: 664; taskState: Not Running; visibility: Unknown>;
}
default 17:25:20.304539 +0330 SpringBoard Application process state changed for "Bundl ID": (null)
default 17:25:20.373002 +0330 SpringBoard WIFI PICKER ["Bundl ID"]: isProcessLaunch: 0, isForegroundActivation: 0, isForegroundDeactivation: 1
default 17:25:20.373920 +0330 symptomsd Failed to find process for "Bundl ID"
default 17:25:20.418162 +0330 symptomsd 664 "Bundl ID": Terminated (most elevated: Terminated)
default 17:25:20.507758 +0330 symptomsd Entry, display name "Bundl ID" uuid (null) pid 664 isFront 0
default 17:25:20.509119 +0330 symptomsd Continue with bundle name "Bundl ID", is front 0
default 17:25:20.511078 +0330 symptomsd "Bundl ID": Foreground: false
default 17:25:20.520161 +0330 symptomsd Failed to find process for "Bundl ID"
Two things that could be happening that I think of when I see your logs:
Enterprise apps need a network connection to verify the certificate. The device needs to be able to connect to https://ppq.apple.com. Are these devices online or behind a firewall?
The way to trust a certificate on a device changed over the years. Does the device trust the enterprise certificate?
This link should give more context about these two issues: https://support.apple.com/en-gb/HT204460

iOS app crashs only after opening it. New Build

My app is crashing after opening it, please any idea ?
I am testing my iOS app on my phone and when I try opening it, it instantly exits. App builds and works in simulator or if I run through xCode. Does anyone know what could be the cause?
default 23:34:28.298271 +0300 SpringBoard Running <SBAppToAppWorkspaceTransaction: 0x10c501e00> for transition request:
<SBMainWorkspaceTransitionRequest: 0x1c56e8e00; eventLabel: SBUIApplicationIconLaunchEventLabel; display: Main; source: HomeScreen> {
applicationContext = <SBWorkspaceApplicationSceneTransitionContext: 0x1c43510f0; background: NO> entities = {
SBLayoutRolePrimary = <SBDeviceApplicationSceneEntity: 0x1c46988d0; ID: com.myapp; layoutRole: primary>;
};
}
default 23:34:28.312181 +0300 assertiond Submitting new job for "com.myapp" on behalf of <BKProcess: 0x100a0cda0; SpringBoard; com.apple.springboard; pid: 55; agency: SystemShell; visibility: foreground; task: running>
default 23:34:28.312373 +0300 assertiond Submitted job with label: UIKitApplication:com.myapp[0x5e0f][66]
default 23:34:28.429755 +0300 assertiond Now tracking process <BKProcess: 0x100b482b0; Real Agent; com.myapp; pid: 386; agency: Application; visibility: none; task: running; hostpid: 55> with host <BKProcess: 0x100a0cda0; SpringBoard; com.apple.springboard; pid: 55; agency: SystemShell; visibility: foreground; task: running>
default 23:34:28.434511 +0300 SpringBoard [com.myapp] Bootstrap complete with label: UIKitApplication:com.myapp[0x5e0f][66]
default 23:34:28.436639 +0300 SpringBoard [FBProcessManager] Adding: <FBApplicationProcess: 0x10c510250; Real Agent (com.myapp); pid: 386>
default 23:34:28.444373 +0300 SpringBoard WIFI PICKER [com.myapp]: isProcessLaunch: 1, isForegroundActivation: 1, isForegroundDeactivation: 0
default 23:34:28.517241 +0300 mediaserverd -CMSessionMgr- CMSessionMgrHandleApplicationStateChange: CMSession: Client com.myapp with pid '386' is now Foreground Running. Background entitlement: YES
default 23:34:28.522407 +0300 SpringBoard [com.myapp] Setting deactivation reasons to: 'systemAnimation' for reason: scene settings update - settings are eligible for deactivation reasons.
default 23:34:28.534346 +0300 SpringBoard [com.myapp] Setting deactivation reasons to: '(none)' for reason: updateAllScenesForBand - Assertion removed.
default 23:34:28.638341 +0300 SpringBoard Application process state changed for com.myapp: <SBApplicationProcessState: 0x1c42301c0; pid: 386; taskState: Running; visibility: Unknown>
default 23:34:28.736365 +0300 symptomsd 386 com.myapp: ForegroundRunning (most elevated: ForegroundRunning)
error 23:34:28.736560 +0300 symptomsd Attempt to add an app with insufficient id, info {
BKSApplicationStateAppIsFrontmost = 1;
BKSApplicationStateExtensionKey = 0;
SBApplicationStateDisplayIDKey = "com.myapp";
SBApplicationStateKey = 8;
SBApplicationStateProcessIDKey = 386;
SBMostElevatedStateForProcessID = 8;
}
default 23:34:29.453786 +0300 assertiond Process exited: <BKProcess: 0x100b482b0; Real Agent; com.myapp; pid: 386; agency: Application; visibility: foreground; task: none; hostpid: 55>
default 23:34:29.779352 +0300 SpringBoard <FBApplicationProcess: 0x10c510250; Real Agent (com.myapp); pid: 386> crashed.
default 23:34:29.779441 +0300 assertiond Deleted job with label: UIKitApplication:com.myapp[0x5e0f][66]
default 23:34:29.783121 +0300 SpringBoard [FBProcessManager] Removing: <FBApplicationProcess: 0x10c510250; Real Agent (com.myapp); pid: -1>
default 23:34:29.784062 +0300 assertiond [Real Agent:386] Deleted launchd job with label: UIKitApplication:com.myapp[0x5e0f][66]
default 23:34:29.785372 +0300 SpringBoard WIFI PICKER [com.myapp]: isProcessLaunch: 0, isForegroundActivation: 0, isForegroundDeactivation: 1
default 23:34:29.786566 +0300 SpringBoard Front display did change: <SBApplication: 0x1c43c4470; com.myapp>
default 23:34:29.789791 +0300 SpringBoard [com.myapp] Setting deactivation reasons to: 'systemAnimation' for reason: updateAllScenesForBand - Assertion added.
default 23:34:29.795982 +0300 SpringBoard [com.myapp] Setting deactivation reasons to: 'appSwitcher, systemAnimation' for reason: updateAllScenesForBand - Assertion added.
default 23:34:29.797861 +0300 mediaserverd -CMSessionMgr- CMSessionMgrHandleApplicationStateChange: CMSession: Client com.myapp with pid '386' is now Terminated. Background entitlement: NO
default 23:34:29.810557 +0300 SpringBoard [com.myapp] Will update scene - foregroundness changed to: Background
default 23:34:29.810662 +0300 SpringBoard [com.myapp] Setting deactivation reasons to: '(none)' for reason: scene settings update - settings are NOT eligible for deactivation reasons.
default 23:34:29.818875 +0300 assertiond Checking for deferred bootstrap request for com.myapp
default 23:34:29.849094 +0300 SpringBoard Process exited: <FBApplicationProcess: 0x10c510250; Real Agent (com.myapp); pid: -1> -> <FBApplicationProcessExitContext: 0x1c0830c00; exitReason: crash; terminationReason: (none)>
default 23:34:29.849356 +0300 SpringBoard Application process state changed for com.myapp: (null)
default 23:34:29.986805 +0300 symptomsd 386 com.myapp: Terminated (most elevated: Terminated)
default 23:34:29.987061 +0300 symptomsd Entry, display name com.myapp uuid (null) pid 386 isFront 0

iOS Release App crashes on Launch "Unable to get pid for label"

Disclaimer: I am not using Expo.
react: 16.8.3
react-native: 0.59.9
react-native-cli: 2.0.1
iOS 12.2 (16E227)
I have this weird problem with my React Native iOS app that has been happening for a while. At a first glance everything works as excepted, both Development and Release. I am able to install it in my device and use it without the metro server running.
However after some time, like couple of days the app in my phone won't launch, it crashes at the launch screen, the one that says "Powered by React Native ..." with the following errors showing up in the console:
Process: assertiond
Failed to start job with error <NSError: 0x103e56f70; domain: NSPOSIXErrorDomain; code: 3; reason: "No such process"> {
description = "Unable to get pid for label UIKitApplication:org.josemigallas.RealmsCounter[0x953c][62]";
failureReason = "No such process";
userInfo = {
BKLaunchdJobLabel = UIKitApplication:org.josemigallas.RealmsCounter[0x953c][62];
BKLaunchdOperation = launch_get_running_pid_4SB;
}
}
Process: SpringBoard
[org.josemigallas.RealmsCounter] Bootstrap failed with error: <NSError: 0x2830c26a0; domain: BKSProcessErrorDomain; code: 1 (bootstrap-failed); reason: "Failed to start job">
Process: SpringBoard
Bootstrapping failed for <FBApplicationProcess: 0x1371b5470; org.josemigallas.RealmsCounter; pid: -1> with error: Error Domain=BKSProcessErrorDomain Code=1 "Unable to bootstrap process with bundleID org.josemigallas.RealmsCounter" UserInfo={NSLocalizedDescription=Unable to bootstrap process with bundleID org.josemigallas.RealmsCounter, BKSProcessExitReason=0, NSLocalizedFailureReason=Failed to start job, NSUnderlyingError=0x2830c0210 {Error Domain=NSPOSIXErrorDomain Code=3 "No such process" UserInfo={BKLaunchdOperation=launch_get_running_pid_4SB, NSLocalizedDescription=Unable to get pid for label UIKitApplication:org.josemigallas.RealmsCounter[0x953c][62], BKLaunchdJobLabel=UIKitApplication:org.josemigallas.RealmsCounter[0x953c][62], NSLocalizedFailureReason=No such process}}, BKSProcessJobLabel=UIKitApplication:org.josemigallas.RealmsCounter[0x953c][62], BSErrorCodeDescription=bootstrap-failed}
Is this a bug? Or did I do something wrong with the Xcode configuration? The React Native documentation is of no use Xcode wise and so is iOS's because this is something in between of both.
Any ideas?
OK, turned out it as simple as the provisioning profile is only valid for 6 days without a paid Apple Developer account... The app will work during the first days then inevitably it won't start anymore and it has to be rebuild again.

iOS crash when testing on device - debug logs

I've begun testing my iOS app on my iPhone. Everything works great for a week or so and then my app starts to crash immediately when I try to open it. When I check the logs for my phone (Window-Devices-Select my iPhone), I see the following log messages.
<Notice>: Submitted job with label: UIKitApplication:com.app.App-Name[0x9fed][63]
<Notice>: /private/var/containers/Bundle/Application/64152E86-B292-47E5-A12D-27E5E23CACFF/App-Name.app/App-Name not valid: 0xe8008015: A valid provisioning profile for this executable was not found.
<Error>: Unable to obtain a task name port right for pid 14847: (os/kern) failure (0x5)
May 29 08:46:13 iPhone assertiond[63] <Notice>: Failed to start job
with error Error Domain=NSPOSIXErrorDomain Code=3 "No such process"
UserInfo={NSLocalizedRecoverySuggestion=Consult
/var/log/com.apple.xpc.launchd/launchd.log for more information,
NSLocalizedDescription=Unable to get valid task name port right for pid
14847, NSLocalizedFailureReason=The process failed to exec}
<Notice>: Deleted job with label: UIKitApplication:com.app.App-
Name[0x9fed][63]
<Notice>: [app.App-Name] Bootstrap failed with error: <NSError:
0x115657730; domain: BKSProcessErrorDomain; code: 1 (bootstrap-failed);
reason: "Failed to start job">
<Error>: Bootstrapping failed for <FBApplicationProcess: 0x11d2702a0;
com.app.App-Name; pid: -1> with error: Error
Domain=BKSProcessErrorDomain Code=1 "Unable to bootstrap process with
bundleID com.app.App-Name" UserInfo={BKSProcessExitReason=0,
NSLocalizedFailureReason=Failed to start job,
NSUnderlyingError=0x11fa53590 {Error Domain=NSPOSIXErrorDomain Code=3
"No such process" UserInfo={NSLocalizedFailureReason=The process failed
to exec, NSLocalizedRecoverySuggestion=Consult
/var/log/com.apple.xpc.launchd/launchd.log for more information,
NSLocalizedDescription=Unable to get valid task name port right for pid
14847}}, BSErrorCodeDescription=bootstrap-failed,
NSLocalizedDescription=Unable to bootstrap process with bundleID
com.app.App-Name}
<Notice>: <FBApplicationProcess: 0x11d2702a0; com.app.App-Name; pid: -1> exited.
<Notice>: SystemUI unknown identifier: 'com.app.App-Name'
<Notice>: Process exited: <FBApplicationProcess: 0x11d2702a0; com.app.App-Name; pid: -1> -> <FBApplicationProcessExitContext: 0x176235aa0; exitReason: (none); terminationReason: (none)>
I've googled for these error logs to try and find a solution, but no luck.
Any help would be much appreciated.
I had the same situation with an app which Bundle Identifier has been moved to another Apple Developer Team.
After Bundle Identifier was moved, a previous build was containing a provisioning profile which was no longer valid, and I got this error message in logs.
I guess the same happens if you delete the Provisioning Profile or if it is invalidated for whatever reason.

App crashing in Ipad 3rd Generation , but working fine in ipad 2

My App is crashing in Ipad 3rd Generation but working fine in my ipad 2 , in ipad 3rd Gen its saying "Memory Warning". My app is in ARC .The console log is like below. I googled few times about this , in one of the post they suggested to change the plist name , i am wired but tried, no change.Please help me.Thank you
2013-04-17 13:21:42 +0000 searchd Could not open updates file for com.apple.MobileSMS SMSSearch
2013-04-17 13:21:42 +0000 searchd Finished getting 33 applications, took 0.048442 seconds
2013-04-17 13:21:43 +0000 searchd Indexed all records in 0.28s
2013-04-17 13:22:09 +0000 SpringBoard could not save thumbnail for downloading icon: image=(null) path='/var/mobile/Library/SpringBoard/DownloadingIconImageCache/com.OneandoLLC.MyApp-14C1F156-4461-410E-93CE-4FE55B75B86D'
2013-04-17 13:22:14 +0000 lsd Attempting to store identifiers file
2013-04-17 13:22:14 +0000 lsd updating identifier store
2013-04-17 13:22:27 +0000 SpringBoard Memory level is not normal. Pending auto-relaunch of 'com.facebook.Facebook' until it is.
2013-04-17 13:22:27 +0000 backboardd Application 'UIKitApplication:com.apple.mobilesafari[0x7974]' exited abnormally with signal 9: Killed: 9
2013-04-17 13:22:27 +0000 backboardd Application 'UIKitApplication:com.mybusinessapp.JPOP[0x22fc]' exited abnormally with signal 9: Killed: 9
2013-04-17 13:22:27 +0000 backboardd Application 'UIKitApplication:com.mybusinessapp.dssapp[0x11db]' exited abnormally with signal 9: Killed: 9
2013-04-17 13:22:27 +0000 backboardd Application 'UIKitApplication:com.facebook.Facebook[0xbf29]' exited abnormally with signal 9: Killed: 9
2013-04-17 13:22:28 +0000 My App Received memory warning.
2013-04-17 13:22:31 +0000 backboardd -[BKSystemAppSentinel lock_bootstrapEmbedded] Found running system app (com.apple.SpringBoard, pid 66). Attempting to stop it...
2013-04-17 13:22:32 +0000 SpringBoard lockdown says we've previously registered: [0], state is 0
2013-04-17 13:22:32 +0000 SpringBoard lockdown says the device is: [Activated], state is 3
2013-04-17 13:22:32 +0000 SpringBoard ERROR: _xpc_handle_outgoing_request error: Connection invalid
2013-04-17 13:22:32 +0000 backboardd Telling the system app that it can start immediately
2013-04-17 13:22:38 +0000 SpringBoard BTM: attaching to BTServer
2013-04-17 13:22:39 +0000 assistant_service the local store doesn't allow tasks and we have no default calendar :(
2013-04-17 13:22:39 +0000 SpringBoard WiFi picker plugin initialized
2013-04-17 13:22:39 +0000 SpringBoard SIMToolkit plugin for SpringBoard initialized.
2013-04-17 13:22:39 +0000 SpringBoard SMS Plugin initialized.
2013-04-17 13:22:42 +0000 itunesstored iTunes Store environment is: ST11
2013-04-17 13:22:49 +0000 assistant_service the local store doesn't allow tasks and we have no default calendar :(
you are using ARC but ARC is not provide any guarantee related to memory crash,compiler have automatically leave reference when resource is free but if any resources use in whole navigation flow then it can not leave reference, if your app have memory crashes, then check your app on Instruments tool, specially focus on dirty size section on instrument tool.

Resources