[Codesign] Bootstrapping failed with error ?

Hello,


I'm trying to recodesign an ipa with another certificate and provisioning profile, that do not belong to my company, for a publishing agreement.

However, I am getting a weird error. The codesign does not yield any error, nor do I fail to install the application. However, when I launch the game, it crashes before it even reaches the app's code, with a SIGKILL - CODESIGNING error.


Incident Identifier: 08929527-6EA1-4251-AC3F-5196A84D0D30
CrashReporter Key:   dc1fedcdb9509dda3f9256c21eb7fcef6f87724b
Hardware Model:      iPhone7,1
Process:             MCVS [5156]
Path:                /private/var/containers/Bundle/Application/9AF071CF-9545-4C3E-8561-68C57FB8AFB6/MCVS-original.app/MCVS
Identifier:          com.kayac.mcvs
Version:             1.3.2 (1.3.2)
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           com.kayac.mcvs [5925]




Date/Time:           2017-11-10 10:08:41.7246 -0500
Launch Time:         2017-11-10 10:08:41.7136 -0500
OS Version:          iPhone OS 11.0.1 (15A402)
Baseband Version:    6.17.00
Report Version:      104


Exception Type:  EXC_CRASH (SIGKILL - CODESIGNING)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Termination Reason: Namespace EXEC, Code 0x1
Triggered by Thread:  0


Filtered syslog:
None found


Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_kernel.dylib          0x0000000180ddd00c __posix_spawn + 8
1   libsystem_kernel.dylib          0x0000000180dd6ca0 posix_spawn + 324
2   libsystem_c.dylib               0x0000000180d0eb04 posix_spawnp + 420
3   xpcproxy                        0x000000010041dcbc 0x100418000 + 23740
4   xpcproxy                        0x000000010041e634 0x100418000 + 26164
5   libdyld.dylib                   0x0000000180cae568 start + 0


Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x000000000000000d   x1: 0x0000000000000000   x2: 0x000000016f9e71c0   x3: 0x000000014bd02900
    x4: 0x000000014bd03c80   x5: 0x000000014bd03c80   x6: 0x000000000000004c   x7: 0x0000000000000ca0
    x8: 0x00000000000000c3   x9: 0x0000000000000c38  x10: 0x0000000000000018  x11: 0x0000000000000008
   x12: 0x000000016f9e7220  x13: 0x0000000000000000  x14: 0x0000000180d65817  x15: 0x0000000000000048
   x16: 0x00000000000000f4  x17: 0x00000000ffffffff  x18: 0x0000000000000000  x19: 0x000000014bd03c80
   x20: 0x000000014bd02900  x21: 0x000000014bd02db1  x22: 0x0000000000000000  x23: 0x000000016f9e7870
   x24: 0x000000016f9e7878  x25: 0x0000000000000000  x26: 0x000000014c005600  x27: 0x000000014bd02435
   x28: 0x000000014bd02db1   fp: 0x000000016f9e7260   lr: 0x0000000180dd6ca0
    sp: 0x000000016f9e71c0   pc: 0x0000000180ddd00c cpsr: 0x20000000


Binary Images:
0x100418000 - 0x10041ffff xpcproxy arm64  <00f466e38b09322288c75c258ffb7ea9> /usr/libexec/xpcproxy
0x100470000 - 0x1004affff dyld arm64  <53a4ddc2fbaa3b44ba58024c7ca0729d> /usr/lib/dyld
0x180752000 - 0x180753fff libSystem.B.dylib arm64  <426d6254d3793f9ebcb528a8df85b7e8> /usr/lib/libSystem.B.dylib
0x180754000 - 0x1807adfff libc++.1.dylib arm64  <b5750788b63b3612b8bbfb2da1e3dbca> /usr/lib/libc++.1.dylib
0x1807ae000 - 0x1807cefff libc++abi.dylib arm64  <9dc64e3f9d1a31ffbd425695d02c3fea> /usr/lib/libc++abi.dylib
0x1807d0000 - 0x180bc7fff libobjc.A.dylib arm64  <d5f3817d3f4e3326b690688e1484ec38> /usr/lib/libobjc.A.dylib
0x180bc8000 - 0x180bccfff libcache.dylib arm64  <646be68098ea3b7ea9fe9a99028b19b2> /usr/lib/system/libcache.dylib
0x180bcd000 - 0x180bd8fff libcommonCrypto.dylib arm64  <df61da1e49933adf97238737fd34f44b> /usr/lib/system/libcommonCrypto.dylib
0x180bd9000 - 0x180bdcfff libcompiler_rt.dylib arm64  <d269360ab8553644a82a1fb5ce9d9597> /usr/lib/system/libcompiler_rt.dylib
0x180bdd000 - 0x180be4fff libcopyfile.dylib arm64  <9ec7f9a0ad703544abc0297192ab7294> /usr/lib/system/libcopyfile.dylib
0x180be5000 - 0x180c47fff libcorecrypto.dylib arm64  <b3ca6ff1dc4d3ad59fe74daec704bfea> /usr/lib/system/libcorecrypto.dylib
0x180c48000 - 0x180cacfff libdispatch.dylib arm64  <d16541550d403e77967bd529061c87a4> /usr/lib/system/libdispatch.dylib
0x180cad000 - 0x180cc7fff libdyld.dylib arm64  <a3fd76b1d04738dab6f7bc9410c4b3bd> /usr/lib/system/libdyld.dylib
0x180cc8000 - 0x180cc8fff liblaunch.dylib arm64  <a2e68c7089ba360e9fe1c2f71cef033b> /usr/lib/system/liblaunch.dylib
0x180cc9000 - 0x180ccefff libmacho.dylib arm64  <f384756091413dc18d540a60b1d78863> /usr/lib/system/libmacho.dylib
0x180ccf000 - 0x180cd0fff libremovefile.dylib arm64  <dec463ad2922349d9447681f0277a592> /usr/lib/system/libremovefile.dylib
0x180cd1000 - 0x180ce8fff libsystem_asl.dylib arm64  <efd2bb6daeb832dda9301f476f2b200f> /usr/lib/system/libsystem_asl.dylib
0x180ce9000 - 0x180ce9fff libsystem_blocks.dylib arm64  <26a917fcb90131d9b897b72c4552d679> /usr/lib/system/libsystem_blocks.dylib
0x180cea000 - 0x180d67fff libsystem_c.dylib arm64  <8ea1d364be023157b5d8bed8ebc9a313> /usr/lib/system/libsystem_c.dylib
0x180d68000 - 0x180d6cfff libsystem_configuration.dylib arm64  <8cf0b157c3f03be3b29a508f00a9d3b5> /usr/lib/system/libsystem_configuration.dylib
0x180d6d000 - 0x180d72fff libsystem_containermanager.dylib arm64  <8bc89cd3ae6630b685e301fad855596e> /usr/lib/system/libsystem_containermanager.dylib
0x180d73000 - 0x180d74fff libsystem_coreservices.dylib arm64  <d98d116a800d3f33928bbfc3dd08c31f> /usr/lib/system/libsystem_coreservices.dylib
0x180d75000 - 0x180d76fff libsystem_darwin.dylib arm64  <be175cfebf1b31a3b332885778dc6847> /usr/lib/system/libsystem_darwin.dylib
0x180d77000 - 0x180d7dfff libsystem_dnssd.dylib arm64  <14d0f03f303836c7a7185668ce7b0522> /usr/lib/system/libsystem_dnssd.dylib
0x180d7e000 - 0x180dbbfff libsystem_info.dylib arm64  <9dc8ba8705e033cb8d2c02e3bdb2f0bf> /usr/lib/system/libsystem_info.dylib
0x180dbc000 - 0x180de3fff libsystem_kernel.dylib arm64  <05b1da08eba13342b0a776a29ad02c23> /usr/lib/system/libsystem_kernel.dylib
0x180de4000 - 0x180e11fff libsystem_m.dylib arm64  <11aee15148e2399eae7bacf96ba51267> /usr/lib/system/libsystem_m.dylib
0x180e12000 - 0x180e2cfff libsystem_malloc.dylib arm64  <902bc46c74203a2f9f961488f20887a4> /usr/lib/system/libsystem_malloc.dylib
0x180e2d000 - 0x180eccfff libsystem_network.dylib arm64  <79ef5028a0113ab8a0ae20aa77ad9862> /usr/lib/system/libsystem_network.dylib
0x180ecd000 - 0x180ed8fff libsystem_networkextension.dylib arm64  <1950c6f6d72e3148a77c04bcfb744592> /usr/lib/system/libsystem_networkextension.dylib
0x180ed9000 - 0x180ee3fff libsystem_notify.dylib arm64  <266f38a610d23eed98864a40a20ccaa8> /usr/lib/system/libsystem_notify.dylib
0x180ee4000 - 0x180eedfff libsystem_platform.dylib arm64  <94c4d83227113803a50499805f767a5c> /usr/lib/system/libsystem_platform.dylib
0x180eee000 - 0x180efdfff libsystem_pthread.dylib arm64  <79349704b029373da3a4116da895eadc> /usr/lib/system/libsystem_pthread.dylib
0x180efe000 - 0x180f01fff libsystem_sandbox.dylib arm64  <a850a46bf1de3716988bd1b093333387> /usr/lib/system/libsystem_sandbox.dylib
0x180f02000 - 0x180f09fff libsystem_symptoms.dylib arm64  <29ef743636383bb9b19a6592a581e279> /usr/lib/system/libsystem_symptoms.dylib
0x180f0a000 - 0x180f1dfff libsystem_trace.dylib arm64  <3185cddeca983d5d9ca01a9998e0c5ae> /usr/lib/system/libsystem_trace.dylib
0x180f1e000 - 0x180f23fff libunwind.dylib arm64  <1bbecec4400b3fa19f176d1a2c35799e> /usr/lib/system/libunwind.dylib
0x180f24000 - 0x180f24fff libvminterpose.dylib arm64  <2be4e5790f673386a2329d2ee621d20e> /usr/lib/system/libvminterpose.dylib
0x180f25000 - 0x180f4efff libxpc.dylib arm64  <a75cf23f010b383aaa4a5a162f4da1f8> /usr/lib/system/libxpc.dylib
0x1a85a4000 - 0x1a85d5fff libclosured.dylib arm64  <81ab29ce13173b7db7389232701746ef> /usr/lib/closure/libclosured.dylib


EOF


And in the console, I noticed some unusual logs :

SpringBoard  14:43:46.705335 -0500  default  Running <SBAppToAppWorkspaceTransaction: 0x1556409b0> for transition request:
 <SBMainWorkspaceTransitionRequest: 0x1c46ed080; eventLabel: SBUIApplicationIconLaunchEventLabel; display: Main; source: HomeScreen> {
     applicationContext = <SBWorkspaceApplicationSceneTransitionContext: 0x1c4341290; background: NO> entities = {
         SBLayoutRolePrimary = <SBDeviceApplicationSceneEntity: 0x1c4692de0; ID: com.kayac.mcvs; layoutRole: primary>;
     };
 }
 assertiond  14:43:46.717517 -0500  default  Submitting new job for "com.kayac.mcvs" on behalf of <BKProcess: 0x10071c360; SpringBoard; com.apple.springboard; pid: 55; agency: SystemShell; visibility: foreground; task: running>
 assertiond  14:43:46.719192 -0500  default  Submitted job with label: UIKitApplication:com.kayac.mcvs[0x5424][66]
 SpringBoard  14:43:46.730665 -0500  error  [com.kayac.mcvs] Bootstrap failed with error: <NSError: 0x1c5247680; domain: BKSProcessErrorDomain; code: 1 (bootstrap-failed); reason: "Unable to obtain valid process handle">
 SpringBoard  14:43:46.731180 -0500  error  Bootstrapping failed for <FBApplicationProcess: 0x155739ce0; com.kayac.mcvs; pid: -1> with error: Error Domain=BKSProcessErrorDomain Code=1 "Unable to bootstrap process with bundleID com.kayac.mcvs" UserInfo={NSLocalizedFailureReason=Unable to obtain valid process handle, BKSProcessExitReason=0, BSErrorCodeDescription=bootstrap-failed, BKSProcessJobLabel=UIKitApplication:com.kayac.mcvs[0x5424][66], NSLocalizedDescription=Unable to bootstrap process with bundleID com.kayac.mcvs}
 SpringBoard  14:43:46.731549 -0500  default  [FBProcessManager] Adding: <FBApplicationProcess: 0x155739ce0; com.kayac.mcvs; pid: -1>
 SpringBoard  14:43:46.731703 -0500  default  <FBApplicationProcess: 0x155739ce0; com.kayac.mcvs; pid: -1> exited.
 SpringBoard  14:43:46.732257 -0500  default  [FBProcessManager] Removing: <FBApplicationProcess: 0x155739ce0; com.kayac.mcvs; pid: -1>
 assertiond  14:43:46.803538 -0500  error  Process handle ((null), <BSProcessHandle: 0x10104e6e0; xpcproxy:4441; valid: YES>) is invalid. Returning error {
     BKSProcessExitReason = 0;
     BKSProcessJobLabel = "UIKitApplication:com.kayac.mcvs[0x5424][66]";
     NSLocalizedFailureReason = "Unable to obtain valid process handle";
 }
 SpringBoard  14:43:46.901199 -0500  default  Application process state changed for com.kayac.mcvs: <SBApplicationProcessState: 0x1c0839640; pid: -1; taskState: Not Running; visibility: Unknown>
 SpringBoard  14:43:46.901496 -0500  default  Process exited: <FBApplicationProcess: 0x155739ce0; com.kayac.mcvs; pid: -1> -> <FBApplicationProcessExitContext: 0x1c0421de0; exitReason: (none); terminationReason: (none)>
 SpringBoard  14:43:46.902234 -0500  default  Application process state changed for com.kayac.mcvs: (null)
 SpringBoard  14:43:47.851322 -0500  default  Front display did change: <SBApplication: 0x1c41cf2d0; com.kayac.mcvs>


Note that I don't get this error if I just build from Xcode with the same certificate and provisioning profile.

The codesign tool usually works just fine when I recodesign with a provisioning profile with the same certificate. However here, I'm a bit lost. I have no idea what's going on. I have never seen this error before, and I didn't even know it was possible to install applications with provisioning issues.


Any idea what this error means ?


Thank you.

Hi. Did you find the issue? I have the same problem with either the development or the distribution profile. Certificates are trusted "Use system default" and I tripple checked all profiles and app identifiers. No success...
[Codesign] Bootstrapping failed with error ?
 
 
Q