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

enable new architecture for android PR,Release builds only #20950

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

siddarthkay
Copy link
Contributor

@siddarthkay siddarthkay commented Aug 2, 2024

Summary

In this PR we use unstable_reactLegacyComponentNames to bridge components that are not compatible with Fabric.
We also enable hermes and new architecture for Android but only for PR and Release builds.

Review notes

Pls test local dev environment with this branch

Testing notes

Pls test everything

Platforms

  • Android

status: ready

fixes: #18138

@siddarthkay siddarthkay self-assigned this Aug 2, 2024
@siddarthkay siddarthkay force-pushed the try-to-enable-new-architecture-for-android branch from 23cd279 to 66a694b Compare August 2, 2024 12:52
@siddarthkay siddarthkay requested a review from a team August 2, 2024 12:52
@status-im-auto
Copy link
Member

status-im-auto commented Aug 2, 2024

Jenkins Builds

Click to see older builds (120)
Commit #️⃣ Finished (UTC) Duration Platform Result
2bc249f #3 2024-08-02 12:58:08 ~2 min tests 📄log
✔️ 2bc249f #3 2024-08-02 13:03:08 ~7 min android 🤖apk 📲
✔️ 2bc249f #3 2024-08-02 13:03:22 ~8 min android-e2e 🤖apk 📲
✔️ 2bc249f #3 2024-08-02 13:04:20 ~9 min ios 📱ipa 📲
✔️ 6a054ad #4 2024-08-02 13:11:53 ~4 min tests 📄log
✔️ 6a054ad #4 2024-08-02 13:14:30 ~7 min android-e2e 🤖apk 📲
✔️ 6a054ad #4 2024-08-02 13:15:51 ~8 min android 🤖apk 📲
✔️ 6a054ad #4 2024-08-02 13:16:27 ~8 min ios 📱ipa 📲
✔️ cbc193d #6 2024-08-02 15:36:40 ~4 min tests 📄log
✔️ cbc193d #6 2024-08-02 15:39:53 ~7 min android 🤖apk 📲
✔️ cbc193d #6 2024-08-02 15:40:02 ~7 min android-e2e 🤖apk 📲
✔️ cbc193d #6 2024-08-02 15:41:15 ~9 min ios 📱ipa 📲
✔️ 489a3d8 #7 2024-08-03 03:52:06 ~4 min tests 📄log
✔️ 489a3d8 #7 2024-08-03 03:56:04 ~8 min android-e2e 🤖apk 📲
✔️ 489a3d8 #7 2024-08-03 03:56:14 ~9 min ios 📱ipa 📲
✔️ 489a3d8 #7 2024-08-03 03:56:49 ~9 min android 🤖apk 📲
✔️ a0ad5c8 #8 2024-08-05 13:05:31 ~4 min tests 📄log
✔️ a0ad5c8 #8 2024-08-05 13:09:41 ~9 min android-e2e 🤖apk 📲
✔️ a0ad5c8 #8 2024-08-05 13:10:12 ~9 min android 🤖apk 📲
✔️ a0ad5c8 #8 2024-08-05 13:12:55 ~12 min ios 📱ipa 📲
✔️ 734b022 #9 2024-08-05 17:42:47 ~4 min tests 📄log
✔️ 734b022 #9 2024-08-05 17:46:49 ~8 min android-e2e 🤖apk 📲
✔️ 734b022 #9 2024-08-05 17:47:10 ~9 min android 🤖apk 📲
✔️ 734b022 #9 2024-08-05 17:48:35 ~10 min ios 📱ipa 📲
✔️ c0755ac #10 2024-08-06 14:37:21 ~5 min tests 📄log
✔️ c0755ac #10 2024-08-06 14:39:17 ~7 min android-e2e 🤖apk 📲
✔️ c0755ac #10 2024-08-06 14:41:06 ~9 min android 🤖apk 📲
✔️ c0755ac #10 2024-08-06 14:42:14 ~10 min ios 📱ipa 📲
✔️ 1e0a62b #11 2024-08-07 02:11:54 ~4 min tests 📄log
✔️ 1e0a62b #11 2024-08-07 02:16:08 ~8 min ios 📱ipa 📲
✔️ 1e0a62b #11 2024-08-07 02:16:19 ~9 min android-e2e 🤖apk 📲
✔️ 1e0a62b #11 2024-08-07 02:16:51 ~9 min android 🤖apk 📲
✔️ fe1e3bc #12 2024-08-10 02:50:21 ~4 min tests 📄log
✔️ fe1e3bc #12 2024-08-10 02:52:26 ~6 min android-e2e 🤖apk 📲
✔️ fe1e3bc #12 2024-08-10 02:55:14 ~9 min android 🤖apk 📲
✔️ fe1e3bc #12 2024-08-10 02:55:55 ~10 min ios 📱ipa 📲
✔️ f400776 #13 2024-08-16 08:34:24 ~4 min tests 📄log
✔️ f400776 #13 2024-08-16 08:37:18 ~7 min android 🤖apk 📲
✔️ f400776 #13 2024-08-16 08:37:44 ~7 min android-e2e 🤖apk 📲
✔️ f400776 #13 2024-08-16 08:39:17 ~9 min ios 📱ipa 📲
✔️ fb1f20d #14 2024-08-19 11:39:25 ~4 min tests 📄log
✔️ fb1f20d #14 2024-08-19 11:43:35 ~8 min ios 📱ipa 📲
✔️ fb1f20d #14 2024-08-19 11:43:49 ~9 min android-e2e 🤖apk 📲
✔️ fb1f20d #14 2024-08-19 11:44:32 ~9 min android 🤖apk 📲
✔️ e48ce59 #15 2024-08-20 13:17:31 ~4 min tests 📄log
✔️ e48ce59 #15 2024-08-20 13:21:38 ~9 min ios 📱ipa 📲
✔️ e48ce59 #15 2024-08-20 13:21:46 ~9 min android-e2e 🤖apk 📲
✔️ e48ce59 #15 2024-08-20 13:22:22 ~9 min android 🤖apk 📲
✔️ e8ce59c #17 2024-08-21 14:20:48 ~3 min tests 📄log
✔️ e8ce59c #17 2024-08-21 14:23:42 ~6 min android-e2e 🤖apk 📲
✔️ e8ce59c #17 2024-08-21 14:25:13 ~8 min android 🤖apk 📲
✔️ e8ce59c #17 2024-08-21 14:25:53 ~9 min ios 📱ipa 📲
✔️ 5a1d226 #18 2024-08-23 09:32:37 ~6 min tests 📄log
✔️ 5a1d226 #18 2024-08-23 09:33:52 ~7 min android-e2e 🤖apk 📲
✔️ 5a1d226 #18 2024-08-23 09:35:12 ~9 min android 🤖apk 📲
✔️ 5a1d226 #18 2024-08-23 09:40:11 ~14 min ios 📱ipa 📲
✔️ 6238cfb #19 2024-08-26 10:00:46 ~5 min tests 📄log
✔️ 6238cfb #19 2024-08-26 10:04:14 ~8 min android-e2e 🤖apk 📲
✔️ 6238cfb #19 2024-08-26 10:04:57 ~9 min android 🤖apk 📲
✔️ 6238cfb #19 2024-08-26 10:07:06 ~11 min ios 📱ipa 📲
✔️ d19ad22 #20 2024-08-28 15:15:07 ~5 min tests 📄log
✔️ d19ad22 #20 2024-08-28 15:17:35 ~7 min android-e2e 🤖apk 📲
✔️ d19ad22 #20 2024-08-28 15:19:21 ~9 min android 🤖apk 📲
✔️ d19ad22 #20 2024-08-28 15:31:27 ~21 min ios 📱ipa 📲
f013935 #21 2024-09-04 08:29:00 ~3 min tests 📄log
✔️ f013935 #21 2024-09-04 08:34:44 ~8 min android-e2e 🤖apk 📲
✔️ f013935 #21 2024-09-04 08:35:29 ~9 min android 🤖apk 📲
✔️ f013935 #21 2024-09-04 08:35:43 ~9 min ios 📱ipa 📲
2204d68 #23 2024-09-05 13:04:05 ~3 min tests 📄log
✔️ 83f077b #24 2024-09-05 13:11:18 ~4 min tests 📄log
✔️ 83f077b #24 2024-09-05 13:14:56 ~7 min android-e2e 🤖apk 📲
✔️ 83f077b #24 2024-09-05 13:15:38 ~8 min android 🤖apk 📲
✔️ 83f077b #24 2024-09-05 13:23:03 ~16 min ios 📱ipa 📲
✔️ baa9627 #25 2024-09-06 03:57:09 ~4 min tests 📄log
✔️ baa9627 #25 2024-09-06 04:01:28 ~9 min android-e2e 🤖apk 📲
✔️ baa9627 #25 2024-09-06 04:02:09 ~9 min android 🤖apk 📲
✔️ baa9627 #25 2024-09-06 04:02:24 ~10 min ios 📱ipa 📲
✔️ de25cbf #26 2024-09-14 15:44:40 ~4 min tests 📄log
✔️ de25cbf #26 2024-09-14 15:47:23 ~7 min android 🤖apk 📲
✔️ de25cbf #26 2024-09-14 15:48:16 ~8 min android-e2e 🤖apk 📲
✔️ de25cbf #26 2024-09-14 15:54:21 ~14 min ios 📱ipa 📲
✔️ d826386 #27 2024-09-15 04:35:56 ~5 min tests 📄log
✔️ d826386 #27 2024-09-15 04:40:02 ~10 min android-e2e 🤖apk 📲
✔️ d826386 #27 2024-09-15 04:40:48 ~10 min android 🤖apk 📲
✔️ d826386 #27 2024-09-15 04:46:53 ~16 min ios 📱ipa 📲
d059296 #28 2024-09-15 06:26:41 ~4 min android-e2e 📄log
d059296 #28 2024-09-15 06:26:43 ~4 min android 📄log
✔️ d059296 #28 2024-09-15 06:26:52 ~4 min tests 📄log
✔️ 50163c9 #29 2024-09-15 06:38:50 ~4 min tests 📄log
✔️ 50163c9 #29 2024-09-15 06:42:59 ~9 min android-e2e 🤖apk 📲
✔️ 50163c9 #29 2024-09-15 06:43:44 ~9 min android 🤖apk 📲
✔️ 50163c9 #29 2024-09-15 06:47:01 ~13 min ios 📱ipa 📲
✔️ 5b51e12 #30 2024-09-15 07:27:02 ~4 min tests 📄log
✔️ 5b51e12 #30 2024-09-15 07:31:16 ~9 min android-e2e 🤖apk 📲
✔️ 5b51e12 #30 2024-09-15 07:31:54 ~9 min android 🤖apk 📲
✔️ 5b51e12 #30 2024-09-15 07:36:09 ~14 min ios 📱ipa 📲
dd62fb0 #31 2024-09-15 07:45:00 ~3 min android-e2e 📄log
✔️ dd62fb0 #31 2024-09-15 07:46:10 ~4 min tests 📄log
dd62fb0 #31 2024-09-15 07:46:12 ~4 min android 📄log
✔️ c0ccae3 #32 2024-09-15 07:57:39 ~4 min tests 📄log
✔️ c0ccae3 #32 2024-09-15 08:00:26 ~7 min android 🤖apk 📲
✔️ c0ccae3 #32 2024-09-15 08:01:00 ~8 min android-e2e 🤖apk 📲
✔️ c0ccae3 #32 2024-09-15 08:06:52 ~14 min ios 📱ipa 📲
✔️ 6248a4f #33 2024-09-15 08:48:17 ~4 min tests 📄log
✔️ 6248a4f #33 2024-09-15 08:53:18 ~9 min android-e2e 🤖apk 📲
✔️ 6248a4f #33 2024-09-15 08:54:06 ~10 min android 🤖apk 📲
✔️ 6248a4f #33 2024-09-15 08:58:38 ~14 min ios 📱ipa 📲
✔️ f426fb4 #34 2024-09-15 09:28:03 ~4 min tests 📄log
✔️ f426fb4 #34 2024-09-15 09:30:55 ~7 min android 🤖apk 📲
✔️ f426fb4 #34 2024-09-15 09:31:20 ~8 min android-e2e 🤖apk 📲
✔️ f426fb4 #34 2024-09-15 09:39:28 ~16 min ios 📱ipa 📲
✔️ c13c955 #35 2024-09-15 09:53:12 ~4 min tests 📄log
✔️ 7661360 #36 2024-09-15 10:00:18 ~4 min tests 📄log
✔️ 7661360 #36 2024-09-15 10:03:17 ~7 min android 🤖apk 📲
✔️ 7661360 #36 2024-09-15 10:03:37 ~8 min android-e2e 🤖apk 📲
✔️ 7661360 #36 2024-09-15 10:05:41 ~10 min ios 📱ipa 📲
✔️ 7fb37e4 #37 2024-09-16 09:49:39 ~4 min tests 📄log
✔️ 7fb37e4 #37 2024-09-16 09:52:08 ~6 min android-e2e 🤖apk 📲
✔️ 7fb37e4 #37 2024-09-16 09:53:45 ~8 min android 🤖apk 📲
✔️ 7fb37e4 #37 2024-09-16 10:01:00 ~15 min ios 📱ipa 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 609ce50 #38 2024-09-17 15:19:58 ~4 min tests 📄log
✔️ 609ce50 #38 2024-09-17 15:24:12 ~9 min android-e2e 🤖apk 📲
✔️ 609ce50 #38 2024-09-17 15:24:58 ~9 min android 🤖apk 📲
✔️ 609ce50 #38 2024-09-17 15:28:00 ~13 min ios 📱ipa 📲
✔️ e8dd70b #39 2024-10-03 12:20:56 ~4 min tests 📄log
✔️ e8dd70b #39 2024-10-03 12:25:20 ~9 min android-e2e 🤖apk 📲
✔️ e8dd70b #39 2024-10-03 12:26:14 ~9 min ios 📱ipa 📲
✔️ e8dd70b #39 2024-10-03 12:26:14 ~9 min android 🤖apk 📲

@siddarthkay siddarthkay force-pushed the try-to-enable-new-architecture-for-android branch 2 times, most recently from 6a054ad to 136001c Compare August 2, 2024 15:31
@siddarthkay siddarthkay force-pushed the try-to-enable-new-architecture-for-android branch from 136001c to cbc193d Compare August 2, 2024 15:31
@siddarthkay siddarthkay changed the title enable new architecture for android enable new architecture for android PR,Release builds only Aug 2, 2024
@siddarthkay
Copy link
Contributor Author

@status-im/mobile-qa : This PR enables new architecture in react-native for android builds. It was already enabled for iOS right after montenegro offsite. We don't expect it to cause any platform specific issues on Android but never the less a smoke test should be good enough ( only when you have the time, I know you're busy with release testing ).

@siddarthkay siddarthkay force-pushed the try-to-enable-new-architecture-for-android branch from cbc193d to 489a3d8 Compare August 3, 2024 03:46
@siddarthkay siddarthkay force-pushed the try-to-enable-new-architecture-for-android branch 2 times, most recently from a0ad5c8 to 734b022 Compare August 5, 2024 17:37
@siddarthkay siddarthkay force-pushed the try-to-enable-new-architecture-for-android branch from 734b022 to c0755ac Compare August 6, 2024 14:31
@siddarthkay siddarthkay force-pushed the try-to-enable-new-architecture-for-android branch from c0755ac to 1e0a62b Compare August 7, 2024 02:06
@siddarthkay siddarthkay force-pushed the try-to-enable-new-architecture-for-android branch 2 times, most recently from fe1e3bc to f400776 Compare August 16, 2024 08:29
@siddarthkay
Copy link
Contributor Author

@mariia-skrypnyk : nothing new on this one, I'll ping you when I have more news on this one.
Thanks for checking in.

@siddarthkay siddarthkay force-pushed the try-to-enable-new-architecture-for-android branch from baa9627 to de25cbf Compare September 14, 2024 15:39
@siddarthkay
Copy link
Contributor Author

In debug mode I did notice a bunch of abort signals originating from reanimated library :

node_modules/react-native-reanimated/Common/cpp/NativeModules/NativeReanimatedModule.cpp:603: 
function operator(): assertion failed (family.getSurfaceId() == surfaceId_)

I'll try to see if they're fixed in a newer version of reanimated or try to temporarily patch them out.

@siddarthkay
Copy link
Contributor Author

Finally I'm able to reproduce this issue in debug variant.

This gives us good hints that the bug indeed originates due to hole view library and at his component
quo.components.profile.profile_card.view.profile_card

cc @status-im/mobile : can you please find some alternative approach or a temp fix for this issue?
A good solution would indeed involve getting rid of react-native-hole-view library, however that should be another PR :)

 ERROR  Error: Exception in HostFunction: Loss of precision during arithmetic conversion: 
 (long) 371.42857142857144

This error is located at:
    in RNHoleView (created by RNHoleView)
    in RNHoleView (created by react_native.core.pressable)
    in RCTView (created by View)
    in View (created by Pressable)
    in Pressable (created by Pressable)
    in react_native.core.pressable
    in quo.components.profile.profile_card.view.profile_card
    in status_im.contexts.profile.profiles.view.profile_card
    in RCTView (created by View)
    in View (created by CellRenderer)
    in VirtualizedListCellContextProvider (created by CellRenderer)
    in CellRenderer (created by VirtualizedList)
    in RCTView (created by View)
    in View (created by ScrollView)
    in RCTScrollView (created by ScrollView)
    in ScrollView (created by ScrollView)
    in ScrollView (created by VirtualizedList)
    in VirtualizedListContextProvider (created by VirtualizedList)
    in VirtualizedList (created by FlatList)
    in FlatList (created by react_native.flat_list.flat_list)
    in react_native.flat_list.flat_list
    in RCTView (created by View)
    in View (created by AnimatedComponent(View))
    in AnimatedComponent(View)
    in Unknown (created by react_native.reanimated.view)
    in react_native.reanimated.view
    in status_im.contexts.profile.profiles.view.profiles_section
    in status_im.contexts.profile.profiles.view.view
    in RCTView (created by View)
    in View (created by quo.theme.provider)
    in quo.theme.provider
    in reagent8 (created by gestureHandlerRootHOC(reagent8))
    in RNGestureHandlerRootView (created by GestureHandlerRootView)
    in GestureHandlerRootView (created by gestureHandlerRootHOC(reagent8))
    in gestureHandlerRootHOC(reagent8) (created by WrappedComponent)
    in WrappedComponent
    in RCTView (created by View)
    in View (created by AppContainer)
    in RCTView (created by View)
    in View (created by AppContainer)
    in AppContainer
    in profile.profiles(RootComponent), js engine: hermes

@siddarthkay
Copy link
Contributor Author

The root cause could probably be float to int conversion here -> https://github.com/ibitcy/react-native-hole-view/blob/b4b60b508cb43ce739eeb3f2abede491d21155af/android/src/main/java/com/ibitcy/react_native_hole_view/RNHoleView.kt#L80-L177

A simple fix could be to try-catch the exceptions first and if possible fix it or maybe even mute it.

@siddarthkay siddarthkay force-pushed the try-to-enable-new-architecture-for-android branch 3 times, most recently from 5b51e12 to dd62fb0 Compare September 15, 2024 07:41
@siddarthkay siddarthkay marked this pull request as draft September 15, 2024 07:43
@siddarthkay siddarthkay force-pushed the try-to-enable-new-architecture-for-android branch 3 times, most recently from f426fb4 to c13c955 Compare September 15, 2024 09:48
@siddarthkay siddarthkay marked this pull request as ready for review September 15, 2024 09:48
@siddarthkay
Copy link
Contributor Author

siddarthkay commented Sep 15, 2024

The number 371.42857142857144 was the width of the device and react-native-hole-view was unable to deal with animating floating point numbers. A simpler fix was to round off width on cljs side before passing it to hole-view/hole-view component.

@status-im/mobile-qa : this fixes issue 1
PR is ready for testing.

@siddarthkay siddarthkay force-pushed the try-to-enable-new-architecture-for-android branch from c13c955 to 7661360 Compare September 15, 2024 09:55
@pavloburykh
Copy link
Contributor

@status-im/mobile-qa : this fixes issue 1
PR is ready for testing.

Hey @siddarthkay! Unfortunately ISSUE 1 is still reproducible for me in the latest PR build

Status-debug-logs - 2024-09-16T123354.319.zip

telegram-cloud-document-2-5422360167834475167.mp4

@siddarthkay
Copy link
Contributor Author

Hi @pavloburykh : Thanks for checking! I'll try to reproduce again and fix 🙏🏻

@siddarthkay siddarthkay force-pushed the try-to-enable-new-architecture-for-android branch from 7661360 to 7fb37e4 Compare September 16, 2024 09:44
@pavloburykh
Copy link
Contributor

ISSUE 3 Bottom sheets are closed by itself after being opened within 'Profiles on device' screen

Steps:

  1. Open 'Profiles on device' screen
  2. Tap '+' or '...' buttons
  3. Observe the behaviour of the bottomsheets

Actual result: Bottom sheets are closed by itself after being opened

telegram-cloud-document-2-5422360167834475199.mp4

@pavloburykh
Copy link
Contributor

ISSUE 4 Broken layout of Create Profile screen when creating additional profile from 'Profiles on device' screen

Steps:

  1. Open 'Profiles on device' screen
  2. Create new profile screen
  3. Observe broken layout

Actual result:

photo_2024-09-16 16 55 35

telegram-cloud-document-2-5422360167834475207.mp4

@siddarthkay siddarthkay marked this pull request as draft October 1, 2024 09:15
@pavloburykh
Copy link
Contributor

Hey @siddarthkay ! I have moved PR moved Contributor column. Please feel free to ping me and move PR back to In Testing once issues are resolved. Thank you.

@siddarthkay siddarthkay force-pushed the try-to-enable-new-architecture-for-android branch from 609ce50 to e8dd70b Compare October 3, 2024 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: CONTRIBUTOR
Development

Successfully merging this pull request may close these issues.

research for enabling new architecture in react-native