OpenSSL
OpenSSL copied to clipboard
I took same error. I returned the 1.1.1500 version then its fixed.
I took same error. I returned the 1.1.1500 version then its fixed. I think, 1.1.1700 build has a problem. @krzyzanowskim
Originally posted by @burakCokyildirim in https://github.com/krzyzanowskim/OpenSSL/issues/152#issuecomment-1199272835
Most likely because something cached old version for you (Cocoapods? DerivedData? Xcode project?) and do not fetch newer version properly. I'd love to know the problem, but from my investigation there's no setup changes between 1.1.1501 and 1.1.1700 other than updated binaries.
Notice the previous version: 1.1.1501
I see, but i depended openssl-universal from a pod. I didn't add openssl directly to my podfile
I executed these commands;
rm -rf ~/Library/Caches/CocoaPods rm -rf Pods rm Podfile.lock pod install --repo-update
And i got this error at the runtime.
(Library not loaded: @rpath/OpenSSL.framework/OpenSSL ...
)
Then I noticed a difference in podfile.lock. OpenSSL-Universal version was changed.
If i add to OpenSSL-Universal 1.1.1501 version to Podfile, I don't get the error.
note, i have tried the delete derived data and clean project.
try one more
pod deintegrate
pod install
I'd give it a try with new sample project. I wonder if you can reproduce it there.
With 1.1.1700 the app crashes right away, saying OpenSSL cannot be loaded.
With any older version such as pod 'OpenSSL-Universal', '1.1.1501'
everything works fine.
can you reproduce it with a newly created sample project that you may attach here?
Actually with 1.1.1700 the app works on simulator, but on the real device it crashes:
dyld[32675]: Library not loaded: '@rpath/OpenSSL.framework/OpenSSL'
Referenced from: '/private/var/containers/Bundle/Application/xxx/test.app/test'
Reason: tried: '/private/var/containers/Bundle/Application/xxx/test.app/Frameworks/OpenSSL.framework/OpenSSL' (no such file), '/private/var/containers/Bundle/Application/xxx/test.app/Frameworks/OpenSSL.framework/OpenSSL' (no such file), '/System/Library/Frameworks/OpenSSL.framework/OpenSSL' (no such file)
Library not loaded: '@rpath/OpenSSL.framework/OpenSSL'
Referenced from: '/private/var/containers/Bundle/Application/xxx/test.app/test'
Reason: tried: '/private/var/containers/Bundle/Application/xxx/test.app/Frameworks/OpenSSL.framework/OpenSSL' (no such file), '/private/var/containers/Bundle/Application/xxx/test.app/Frameworks/OpenSSL.framework/OpenSSL' (no such file), '/System/Library/Frameworks/OpenSSL.framework/OpenSSL' (no such file)
(lldb)
You can send me over sample project to test.
as I said before. It looks like an Xcode project (maybe Cocoapods) issue where it does not embed framework in the app bundle properly for some reason (??)
But why does it work with the older versions? There has to be some breaking change?
I don't know tbh https://github.com/krzyzanowskim/OpenSSL/issues/154#issuecomment-1199280044
can you send me this test project you created?
It's not the test project, I've just replaced the IDs.
I see 3 commits after 1.1.1501, one of them is definitely breaking things: https://github.com/krzyzanowskim/OpenSSL/commits/master
Maybe to reference a specific commit in Podfile instead of using pod 'OpenSSL-Universal'
?
I see 3 commits after 1.1.1501, one of them is definitely breaking things
not sure what you mean by that, there's a single commit between 1.1.1501 and 1.1.1700 https://github.com/krzyzanowskim/OpenSSL/commit/9429bf89fe0df2d2f25f3a9a51cbf7092e69640f
Doesn't work:
pod 'OpenSSL-Universal', :git => 'https://github.com/krzyzanowskim/OpenSSL.git', :commit => '9429bf89fe0df2d2f25f3a9a51cbf7092e69640f'
Works:
pod 'OpenSSL-Universal', :git => 'https://github.com/krzyzanowskim/OpenSSL.git', :commit => '033fcb41dac96b1b6effa945ca1f9ade002370b2'
Doesn't work on your project. can you reproduce it with a newly created sample project that you may attach here? https://github.com/krzyzanowskim/OpenSSL/issues/154#issuecomment-1212177941
I've created test project and it crashes even in simulator.
Just download it, do pod update
, open Test.xcworkspace and run it.
I cannot reproduce any crash with a Test project you provided. It runs on Simulator and on Device here.
pod --version 1.11.3

pod version 1.11.3 Xcode version 13.4.1 macOS Monterey version 12.5
Are you running the same?
The issue is reproduced on the new empty project on the Mac with M1 chip when the terminal is not running in Rosetta mode. The empty project is built successfully with OpenSSL-Universal 1.1.1700 pod when the terminal is running in Rosetta mode.
getting a similar error with OpenSSL-Universal 1.1.1700, app crash while we tap on the app icon
Termination Description: DYLD, dyld: Using shared cache: EC12EBDC-CAE3-34EC-ACCB-0B6E5ABC73EB | dependent dylib '@rpath/OpenSSL.framework/OpenSSL' not found for '/private/var/containers/Bundle/Application/62AEA174-7CD0-4D1A-9DEA-86183FBFAD2A/mID Verify.app/mID Verify', tried but didn't find: '/usr/lib/swift/OpenSSL.framework/OpenSSL' '/private/var/containers/Bundle/Application/62AEA174-7CD0-4D1A-9DEA-86183FBFAD2A/mID Verify.app/Frameworks/OpenSSL.framework/OpenSSL' '@rpath/OpenSSL.framework/OpenSSL' '/System/Library/Frameworks/OpenSSL.framework/OpenSSL' Highlighted by Thread: 0
Backtrace not available
Unknown thread crashed with ARM Thread State (64-bit): x0: 0x0000000000000006 x1: 0x0000000000000001 x2: 0x000000016fa39ff0 x3: 0x000000000000009f x4: 0x000000016fa39bf0 x5: 0x0000000000000000 x6: 0x0000000000000000 x7: 0x0000000000000000 x8: 0x0000000000000020 x9: 0x0000000000000009 x10: 0x0000000000000001 x11: 0x00000000000000eb x12: 0x00000000000000dc x13: 0x00000000000000ca x14: 0x00000000000000e3 x15: 0x0000000000000034 x16: 0x0000000000000209 x17: 0x00000001008bf488 x18: 0x0000000000000000 x19: 0x0000000000000000 x20: 0x000000016fa39bf0 x21: 0x000000000000009f x22: 0x000000016fa39ff0 x23: 0x0000000000000001 x24: 0x0000000000000006 x25: 0x000000016fa3a8b8 x26: 0x00000001008e8000 x27: 0x00000001008e8000 x28: 0x000000016fa3b924 fp: 0x000000016fa39bc0 lr: 0x00000001008cda88 sp: 0x000000016fa39b80 pc: 0x00000001008c5848 cpsr: 0x00000000 esr: 0x00000000 Address size fault
Binary images description not available
Error Formulating Crash Report: Failed to create CSSymbolicatorRef - corpse still valid ¯_(ツ)_/¯
EOF
I got similar error with @Dhananjay-Fartyal. My mac is intel based. can it be related with that ? What is your mac's chip does all of them intel ?
is it all related to CocoaPods setup for everyone, or do anyone see issues with SwiftPM setup too? I still cannot reproduce it on my end and can't really do anything about it.
I got similar error with @Dhananjay-Fartyal. My mac is intel based. can it be related with that ? What is your mac's chip does all of them intel ?
@mketizmen Yes, My mac is Intel-based, and I don't think it is chip related issue, Somehow OpeSSL 1.1.1700 framework is not embedded in my app which causes crashes, I downgraded it to 1.1.1501, which works for me.
It seems cocoapod issue with this version (maybe architecture), still investigating the exact root cause.
is it all related to CocoaPods setup for everyone, or do anyone see issues with SwiftPM setup too? I still cannot reproduce it on my end and can't really do anything about it.
Hello @krzyzanowskim, my team can reproduce this issue on both Intel and m1 macs using SPM. It doesn't seem cocoapods related
I still cannot reproduce it on my end. Just yesterday integrated 1.1.1700 as SPM in new app and it worked just fine here (Xcode 14)
I'm happy to continue trying to reproduce. send me a project and exact spec so I can be as close as possible and see if I can reproduce
That said, we can setup up a pair debugging session and try to diagnose and solve the problem on your machine. that exceed the free support for this project I can provide.
That said, we can setup up a pair debugging session and try to diagnose and solve the problem on your machine. that exceed the free support for this project I can provide.
Don't worry, we will try to investigate the reason on our side first. Just wanted to mention that it's not specifically cocoapods related as you asked the question :D
Running into this issue when using OpenSSL via SPM, I setup an example project here that hits the issue only on physical devices and when embedding openssl in a sub framework. https://github.com/jacoblange-dev/OpenSSLBugExample
UPDATE After following steps from https://github.com/krzyzanowskim/OpenSSL/issues/159#issuecomment-1336302130
Uninstall ruby gems sudo gem uninstall --all
Remove workspace project, delete Podfile.lock
Deleted the pods directory
Install cocoapods sudo gem install cocoapods
Run pod install
it actually works for me, the diff is gone, and the framework folder now has OpenSSL.framework and content correctly.
It should be a nasty bug from cocoapods core's dependency or code.
I notice on the working macOS, the framework folder contains correct OpenSSL.framework, while on my mac, it's named OpenSSL-Universal and has no content. Not sure if this helps.
On my side, I met similar issue as well, same git branch, same Podfile.lock, nothing touched, once I do pod install, it will have below diff:
but on another macOS, same pod 1.11.3, it will never have this diff.
and in the simulator it will carsh as framework not found.