Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot distribute inhouse build with ios-charts library embedded to my project #486

Closed
andrejbroncek opened this issue Oct 20, 2015 · 14 comments

Comments

@andrejbroncek
Copy link

Hello,

first of all, I would like to thank you for creating this library. I have embedded it in my project (as written in the README file) by dragging it into the project, embedding it in the binaries and so on. Target iOS version is 8.0.

Everything worked great for dev version of the app, but as soon as I built the inhouse version, app crashes after initial welcome screen shows. Logs for the crash are as following:

Oct 20 15:54:15 iPhone SpringBoard[54] <Error>:  SecTrustEvaluate  [leaf IssuerCommonName SubjectCommonName]
Oct 20 15:54:15 iPhone SpringBoard[54] <Error>:  SecTrustEvaluate  [leaf IssuerCommonName SubjectCommonName]
Oct 20 15:54:15 iPhone kernel[0] <Notice>: xpcproxy[700] Container: /private/var/mobile/Containers/Data/Application/6D451583-EE0E-4F0A-9CA9-2E33F83D6138 (sandbox)
Oct 20 15:54:15 iPhone kernel[0] <Notice>: AMFI: energy_challenge(pid 700) - [deny-mmap] mapped executable file has no team identifier in its signature: /private/var/mobile/Containers/Bundle/Application/84AEA7F2-4987-4119-B3CC-A4EAFC9989DC/energy_challenge.app/Frameworks/Charts.framework/Charts
Oct 20 15:54:15 iPhone com.apple.xpc.launchd[1] (UIKitApplication:com.edge5.nativeMenuEnergieInhouse[0x1f2e][700]) <Notice>: Service exited due to signal: Trace/BPT trap: 5
Oct 20 15:54:15 iPhone assertiond[63] <Warning>: Unable to obtain a task name port right for pid 700: (os/kern) failure (5)
Oct 20 15:54:15 iPhone SpringBoard[54] <Warning>: Unable to register for exec notifications: No such process
Oct 20 15:54:15 iPhone SpringBoard[54] <Warning>: Unable to obtain a task name port right for pid 700: (os/kern) failure (5)
Oct 20 15:54:15 iPhone SpringBoard[54] <Warning>: Unable to obtain a task name port right for <FBApplicationProcess: 0x13226dc00; com.edge5.nativeMenuEnergieInhouse; pid: 700>
Oct 20 15:54:15 iPhone SpringBoard[54] <Warning>: Application 'UIKitApplication:com.edge5.nativeMenuEnergieInhouse[0x1f2e]' crashed.
Oct 20 15:54:15 iPhone SpringBoard[54] <Warning>: Application '(null)' exited for an unknown reason.
Oct 20 15:54:15 iPhone ReportCrash[701] <Notice>: Formulating report for corpse[700] energy_challenge
Oct 20 15:54:15 iPhone ReportCrash[701] <Warning>: report not saved because the limit of 25 for 109_energy_challenge logs has been reached.
Oct 20 15:54:15 iPhone ReportCrash[701] <Error>: Notice: This report is abbreviated for syslog inclusion because it could not be saved to disk.
    Symbolication may be possible by manually cleaning up and including the Binary Image section of a full report from this same device -- good luck!
Oct 20 15:54:15 iPhone ReportCrash[701] <Error>: Process:             energy_challenge [700]
    Path:                /private/var/mobile/Containers/Bundle/Application/84AEA7F2-4987-4119-B3CC-A4EAFC9989DC/energy_challenge.app/energy_challenge
    OS Version:          iOS 9.0.2 (13A452)
Oct 20 15:54:15 iPhone ReportCrash[701] <Error>: Exception Type:  EXC_BREAKPOINT (SIGTRAP)
    Exception Codes: 0x0000000000000001, 0x0000000120095088
    Triggered by Thread:  0
Oct 20 15:54:15 iPhone ReportCrash[701] <Error>: Dyld Error Message:
    Dyld Message: Library not loaded: @rpath/Charts.framework/Charts
      Referenced from: /var/mobile/Containers/Bundle/Application/84AEA7F2-4987-4119-B3CC-A4EAFC9989DC/energy_challenge.app/energy_challenge
      Reason: no suitable image found.  Did find:
        /private/var/mobile/Containers/Bundle/Application/84AEA7F2-4987-4119-B3CC-A4EAFC9989DC/energy_challenge.app/Frameworks/Charts.framework/Charts: mmap() errno=1 validating first page of '/private/var/mobile/Containers/Bundle/Application/84AEA7F2-4987-4119-B3CC-A4EAFC9989DC/energy_challenge.app/Frameworks/Charts.framework/Charts'
      Dyld Version: 369.12
Oct 20 15:54:16 iPhone wifid[39] <Error>: WiFi:[467042056.241745]: Enable WoW requested by "apsd"
Oct 20 15:54:16 iPhone wifid[39] <Error>: WiFi:[467042056.243839]: Unable to dispatch WowStateChanged message to client dataaccessd (268435460)
Oct 20 15:54:16 iPhone wifid[39] <Error>: WiFi:[467042056.244041]: Unable to dispatch WowStateChanged message to client MobileMail (268435460)
Oct 20 15:54:16 iPhone wifid[39] <Error>: WiFi:[467042056.244185]: Unable to dispatch WowStateChanged message to client softwareupdatese (268435460)
Oct 20 15:54:16 iPhone wifid[39] <Error>: WiFi:[467042056.244422]: Unable to dispatch WowStateChanged message to client dataaccessd (268435460)
Oct 20 15:54:16 iPhone wifid[39] <Error>: WiFi:[467042056.244678]: Unable to dispatch WowStateChanged message to client assistantd (268435460)
Oct 20 15:54:16 iPhone wifid[39] <Error>: WiFi:[467042056.245010]: Unable to dispatch WowStateChanged message to client itunesstored (268435460)

The problem occurs here:

[deny-mmap] mapped executable file has no team identifier in its signature: /private/var/mobile/Containers/Bundle/Application/84AEA7F2-4987-4119-B3CC-A4EAFC9989DC/energy_challenge.app/Frameworks/Charts.framework/Charts

I tried creating new certificate, new inhouse build, basically went through all the stackoverflow questions regarding this or similar issue (eg. https://www.airsignapp.com/ios-apps-using-swift-crash-when-signed-with-inhouse-certificate/) without any success. Is it possible that maybe you need to change something certificate-related on your side?

Thank you very much for any answer

@pmairoldi
Copy link
Collaborator

You might need to add a copy build phase and add the framework to that.

@liuxuan30
Copy link
Member

If your cert already has OU attribute (this is a must and you never want to miss it), then it should be a project setting problem. Double check the build setting and build phase, and embedded framework, etc.
take a look at #57

@andrejbroncek
Copy link
Author

Yes, OU attribute was not there in the old cert, so I created a new one, double-checked it, it is there. To be honest I cannot imagine what could be wrong.

Only thing that comes up to my mind may be related to Carts.xcodeproj not having Inhouse configuration under Info - Configurations, which I "fixed" by copying and renaming the Debug configuration. May this be the problem?

@danielgindi
Copy link
Collaborator

I would try searching for similar issues... There are many - and always resolved with simple steps after banging the head against the table for no reason...

@andrejbroncek
Copy link
Author

As I said, I tried literally everything. Many people on stackoverflow said it might be a bug caused by combination of XCode 7.0.1 and Swift 2.0. Will try building it with XCode 7.1 that came out today and see what happens.

@danielgindi
Copy link
Collaborator

Any news?

@danielgindi
Copy link
Collaborator

You may try the latest version where the tvOS target has been adjusted for Xcode 7.1 GM also

@ghost
Copy link

ghost commented Oct 25, 2015

I'm experiencing a similiar problem: DEBUG versions work, RELEASE versions crash ("Segmentation fault: 11"). In my case, this was due to the Optimization Level (Swift Compiler - Code Generation in Build Settings for Charts framework). When this is set to None I get no crashes, if set to Fast (which is the default for release versions) it crashes soon after the library is used. Charts v2.1.4, xcode 7.1.
Updating to v2.1.5 seems to have fixed this problem

@liuxuan30
Copy link
Member

@tranq72 you need to provide the crash stack trace for such issues. Only saying crash can have many reasons.

@liuxuan30
Copy link
Member

I will take it solved since no updates - closing

@andrejbroncek
Copy link
Author

Ok, I finally got to try it out, unfortunately, it still doesnt work. I am sure library is embedded correctly, I have even created a new certificate, so the Organizational Unit field is there. I am trying it with Xcode Version 7.1.1 (7B1005).

@liuxuan30
Copy link
Member

I guess you have to try some demo projects or other ways, as we cannot offer much help without more details.
mapped executable file has no team identifier in its signature: is the only hint from your original post. More like a cert or signing problem. You have to try different settings and non in-house archive, etc. You also want to check if your developer account is ok.

@wukongiii
Copy link

I have this error too, and finally resolved it. This error shown on our device after we built and installed one version of .ipa file. The message is quit general , no details. After tries, I figured out it how to debug it, that you just connect your phone, open your project and hit "Run" button from your XCode, instead of makeing a ipa and install it on your phone, you'll see the real error message that causes this error msg. Once you disconnect your phone and see the log in XCode device, the "SecTrustEvaluate" error came again.

@madage
Copy link

madage commented Jul 14, 2017

the same problem happens to me ,an app installed in a jailbreake device ,lanunch and log this : Unable to obtain a task name port right for pid 601: (os/kern) failure (5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants