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

Themis iOS 0.13.1 CocoaPods crashing immediately on start-up due to not being able to find 'openssl.dylib' [RESOLVED: use themis, 0.13.3] #715

Closed
lordcodes opened this issue Oct 2, 2020 · 5 comments
Assignees
Labels
bug installation Installation of Themis core and wrapper packages M-CocoaPods Package manager: CocoaPods, Objective-C and Swift, iOS and macOS O-iOS 📱 Operating system: iOS

Comments

@lordcodes
Copy link

Describe the bug

After upgrading to 0.13.1 (we also started building on Xcode 12 at the same time), the app works fine running on simulators or real devices from Xcode. However, when we create an archive using fastlane or via Xcode and then deploy that to a real-device, the app crashes immediately upon start-up.
After producing a log dump from the phone, we found a line that seems to point to issues loading 'openssl.dylib'.

Termination Description: DYLD, dyld: Using shared cache: A653290E-2904-322C-AA1C-DF4B231FA8C8 | dependent dylib 'openssl.dylib' not found for '/private/var/containers/Bundle/Application/UUID/AppName.app/App', tried but didn't find: 'openssl.dylib'

We are integrating themis using Cocoapods. Downgrading back to 0.13.0 fixes the issue immediately. The 0.13.1 update which updated OpenSSL seemed to change the OpenSSL framework that was being included, so there must be an issue in this.

To Reproduce
Steps to reproduce the behavior:

  1. Use themis iOS 0.13.1 via Cocoapods
  2. Use themis in the app
  3. Create an archive
  4. Deploy to device
  5. Launch the app
  6. Observe it crashing immediately upon opening
Termination Description: DYLD, dyld: Using shared cache: A653290E-2904-322C-AA1C-DF4B231FA8C8 | dependent dylib 'openssl.dylib' not found for '/private/var/containers/Bundle/Application/UUID/AppName.app/App', tried but didn't find: 'openssl.dylib'

Expected behavior
The app to launch okay.

Environment (please complete the following information):

  • OS: iOS 12-14 (tested on 12, 13 and 14)
  • Hardware: Range of iPhones, 8, X, 11
  • Themis version: 0.13.1
  • Installation way: Cocoapods

Additional context
Downgrading back to 0.13.0 fixes the issue.

@vixentael vixentael self-assigned this Oct 2, 2020
@vixentael vixentael added clarification needed M-CocoaPods Package manager: CocoaPods, Objective-C and Swift, iOS and macOS O-iOS 📱 Operating system: iOS question labels Oct 2, 2020
@vixentael
Copy link
Contributor

Hi @lordcodes! Thank you for letting us know. That's definitely not expected behaviour 😅

This might be a caching problem on your side (easy) or a linking problem on our side (complicated, requires to update Themis on our side). The background story: between 0.13.0 and 0.13.1 we've switched to updated OpenSSL library. It might be a case, that CocoaPods have cached previous OpenSSL and didn't find it.

Let's try to repro the issue.

  1. Please clarify when crash happens.

However, when we create an archive using fastlane or via Xcode and then deploy that to a real-device, the app crashes immediately upon start-up.

Do you mean that you create app archive using Xcode/fastlane, and then publish app via TestFlight or similar, and see the crash on install? I'd try to reproduce this behaviour in our test app.

  1. Please clear caches and re-install Themis 0.13.1 using Cocoapods:
pod deintegrate <xcode project>
pod install

Pod deintegrate deletes all pods from the project. Also, I'd recommend you to clean up DerivedData and Pods folder.

And try archiving app again. If archiving is okay on your local machine, but you experience issue on fastlane machine, please make sure to clean up CocoaPods caches there.

  1. If you still experience this issue, please take a look on our example app with CocoaPods. Basically, that's one of our test applications, I've updated it to have a proper icon and use 0.13.1 Themis, and pushed into 0.13.1-cocoapods branch of Themis repo.

https://github.com/cossacklabs/themis/tree/vxtl/0.13.1-cocoapods/docs/examples/swift/iOS-CocoaPods

Can you please try to archive it in a similar way, distribute to device and see if it's crashing? The app does nothing, only shows white screen, so expected behaviour would be to open app and see the white screen.

@lordcodes
Copy link
Author

We create builds on CI (Bitrise) in a completely blank environment, just to double check I cleared all CI caches as well and the issue was still there, so caching isn't the issue.

To be clear, there is no issue when 'running' directly from Xcode, builds produced using an Archive step either locally or on CI and then deployed to a device by installing the IPA file have the issue.

With regards to trying the sample app, sure I can try and do that when I have time, likely next week now.

@jaradeprest
Copy link

Hi.
I had the same issue a while back and "fixed" it by reverting to the previous themis version.
Hope this issue is resolved soon!

@vixentael vixentael added bug installation Installation of Themis core and wrapper packages and removed clarification needed question labels Oct 12, 2020
@vixentael
Copy link
Contributor

Hello @lordcodes @jaradeprest! Thank you for pointing out.

If you use Xcode 11, please use themis 0.13.0. If you use Xcode 12, please switch to 0.13.3.

We've published new podspec themis, 0.13.3, which increases iOS deployment target to iOS10, enables bitcode is a new fresh way, and temporary disables arm64-simulator support for Xcode 12 compatibility. (You might need to disable arm64 for Xcode12.)

We tested this podspec with real apps for use cases build in release, archive, distribute, install, no-crash; and it was working.

If you have a chance to try 0.13.3, please do, and let us know if you had any problems.

@vixentael vixentael changed the title iOS 0.13.1 crashing immediately on start-up due to not being able to find 'openssl.dylib' Themis iOS 0.13.1 CocoaPods crashing immediately on start-up due to not being able to find 'openssl.dylib' [RESOLVED: use themis, 0.13.3] Oct 12, 2020
@lordcodes
Copy link
Author

Fantastic, thank you. Sorry I didn't get around to helping after I reported it initially, been super busy. Will give it a try when I can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug installation Installation of Themis core and wrapper packages M-CocoaPods Package manager: CocoaPods, Objective-C and Swift, iOS and macOS O-iOS 📱 Operating system: iOS
Projects
None yet
Development

No branches or pull requests

3 participants