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

Build fail on Xcode 12.5 with OpenSSL 1.1.x #3146

Closed
bingluen opened this issue May 19, 2021 · 19 comments
Closed

Build fail on Xcode 12.5 with OpenSSL 1.1.x #3146

bingluen opened this issue May 19, 2021 · 19 comments
Assignees

Comments

@bingluen
Copy link

bingluen commented May 19, 2021

In order to support Xcode 12.5, flipper have to upgrade to new version. [1][2][3]

Unfortunately, the version 1.1.x of OpenSSL is need by the new versions of flipper (such as 0.87.0) that support Xcode 12.5. [4]

react-native-simple-crypto[5], dependency of Rocket.Chat.ReactNative, using OpenSSL 1.0.x APIs, but there are some breaking change between 1.0.x and 1.1.x. [6]

image

image

Ref:
[1] facebook/flipper#2215
[2] facebook/folly#1527
[3] https://stackoverflow.com/questions/66019068/event2-event-config-h-file-not-found
[4] https://github.com/facebook/flipper/blob/v0.87.0/iOS/Podspecs/Flipper-Folly.podspec#L19
[5] https://github.com/RocketChat/react-native-simple-crypto/blob/master/ios/RCTCrypto/RCTRsaUtils.swift
[6] https://wiki.openssl.org/index.php/OpenSSL_1.1.0_Changes#Compatibility_Layer

@diegolmello
Copy link
Member

#3106 (comment)

@diegolmello
Copy link
Member

@bingluen It's a known issue on React Native with Xcode 12.5.
Can you contribute with a fix based on the comment above?

@bingluen
Copy link
Author

@diegolmello
I am not familiar with developing cocoapod.
But I will try my best to do this.

@brijpatel6080
Copy link

Screenshot 2021-05-21 at 2 24 21 PM

I face this error until last 6 to 7 days any one help me out for the successfully done this project

@rajesh-puranik
Copy link

rajesh-puranik commented May 27, 2021

Same issue in Xcode: 12.4 after pod deintegrate and pod install

@rajesh-puranik
Copy link

I found solution by changing this line it works => use_flipper!({ 'Flipper-Folly' => '2.2.0' }) because it need OpenSSL-Universal (1.0.2.19). Tested on Xcode 12.4

@diegolmello
Copy link
Member

@rajesh-puranik Can you contribute back with a PR?

@rajesh-puranik
Copy link

@diegolmello created PR #3163

@salmankhadim36
Copy link

118815385-c78e2280-b8e3-11eb-823e-08dfdcc0c072-2

Build fail on Xcode 12.5

@uluzox
Copy link

uluzox commented Jun 28, 2021

I found solution by changing this line it works => use_flipper!({ 'Flipper-Folly' => '2.2.0' }) because it need OpenSSL-Universal (1.0.2.19). Tested on Xcode 12.4

This did not work for me. I am seeing

react-native/Libraries/LinkingIOS/RCTLinkingManager.mm:102:27: error: 'openURL:options:completionHandler:' is unavailable: not available on iOS (App Extension)
  [RCTSharedApplication() openURL:URL options:@{} completionHandler:^(BOOL success) {

@ferkawi
Copy link

ferkawi commented Jun 29, 2021

Same here! Xcode 12.5 and M1:
_warning: GLKit is deprecated. Consider migrating to MetalKit instead. (in target 'RocketChatRN' from project 'RocketChatRN')
error: Application extensions and any libraries they link to must be built with the APPLICATION_EXTENSION_API_ONLY build setting set to YES. (in target 'ShareRocketChatRN' from project 'RocketChatRN')

objc[52013]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x20ca22c10) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x119db82b8). One of the two will be used. Which one is undefined.
objc[52013]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x20ca22c60) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x119db8308). One of the two will be used. Which one is undefined.
** BUILD FAILED **_

@diegolmello
Copy link
Member

I don't recommend using Xcode 12.5 (you can download 12.4) or new Flipper versions yet (I'm running v0.57 fine here).
I've been working updating all libs and noted this as an issue.
OpenSSL 1.1 changed a lot and we'll have to tweak react-native-simple-crypto to make it work.
I might have a fix in a few weeks (or sooner 🤞 ).

@diegolmello diegolmello self-assigned this Jun 29, 2021
@ferkawi
Copy link

ferkawi commented Jun 29, 2021

I will give a try! thank you @diegolmello !

@ferkawi
Copy link

ferkawi commented Jun 30, 2021

So after a lot of tries, is working now, after a fresh clone - without change Flipper. Xcode 12.4 Mac Mini M1.

All the Problems are because of the M1... The Solution...Cocoapods doesnt work with M1 so we should install it with a Rosetta Terminal and exclude arm64 architectur for the project. I excluded it an all Targets and Pod file. Here more:

https://narlei.com/development/apple-m1-xcode-error-when-build-in-simulator/
https://narlei.com/development/apple-m1-install-cocoapods/

After that, I can build without problems in Rosetta Terminal and Rosetta Xcode

@diegolmello
Copy link
Member

Fixed by #3245

@uluzox
Copy link

uluzox commented Jul 27, 2021

This fix is not part of the single-server branch yet, is it?
When will it be merged to the single-server branch?

@diegolmello
Copy link
Member

No, it's not released yet.
We still need to battle test everything because it was a huge change and the release is going to happen ~Aug 23.
That's when we merge develop into main and we update single-server and whitelabel docs.

@uluzox
Copy link

uluzox commented Sep 9, 2021

Will there be any announcement of this being merged into single-server?

@diegolmello
Copy link
Member

We update single-server branch to match master every release.
https://rocket.chat/blog/product/mobile-app-4-19/

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

7 participants