`addUIBlock` not working in New Architecture.

This issue has been created since 2022-09-22.

Description

When I enable fabric and turbomodule, addUIBlock seems not working because the callback will never be called:

UIManagerModule uiManager = context.getNativeModule(UIManagerModule.class);
        uiManager.addUIBlock(new UIBlock() {
            @Override
            public void execute(NativeViewHierarchyManager nativeViewHierarchyManager) {
                HMapView hMapView;
                try {
                    hMapView = (HMapView) nativeViewHierarchyManager.resolveView(viewTag);
                } catch (Exception e) {
                    QLog.e(e);
                    hMapView = null;
                }
                if(hMapView != null){
                    WritableNativeMap map = hMapView.getLocationParams();
                    callback.invoke(map);
                }
            }
        });

If I understand the new architecture right, uiManager is not get used when fabric is enabled, but the JSIModule. But I didn't find functions which act the same with addUIBlock.

So what is the solution when I want to use addUIBlock when fabric is on?

Version

0.68.1

Output of npx react-native info

System:
OS: macOS 11.6.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 139.06 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.19.3 - ~/.nvm/versions/node/v14.19.3/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.17 - ~/.nvm/versions/node/v14.19.3/bin/npm
Watchman: 2022.01.17.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.0.1, iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0
Android SDK:
Android NDK: 21.1.6352462
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8609683
Xcode: 13.1/13A1030d - /usr/bin/xcodebuild
Languages:
Java: 11.0.15 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: Not Found
react-native: 0.68.1 => 0.68.1
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
info React Native v0.70.1 is now available (your project is running on v0.68.1).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.70.1.
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.68.1.
info To upgrade, run "react-native upgrade".

Steps to reproduce

None.

Snack, code example, screenshot, or link to a repository

UIManagerModule uiManager = context.getNativeModule(UIManagerModule.class);
        uiManager.addUIBlock(new UIBlock() {
            @Override
            public void execute(NativeViewHierarchyManager nativeViewHierarchyManager) {
                Log.i(TAG, "it works");
            }
        });

when fabric is on.

More Details About Repo
Owner Name facebook
Repo Name react-native
Full Name facebook/react-native
Language JavaScript
Created Date 2015-01-09
Updated Date 2022-10-07
Star Count 105180
Watcher Count 3671
Fork Count 22481
Issue Count 2230

YOU MAY BE INTERESTED

Issue Title Created Date Comment Count Updated Date
A bug with "rested xp" in wotlk realm 2 2022-01-21 2022-09-23
[ENH] - add a default panel-serve framework in CDSDashboards 2 2022-05-14 2022-08-17
Undefined variable: phone 2 2021-06-08 2022-09-29
HA crashes after Grocy Add on was updated, Disabling Barcode Buddy stop's HA from Crashing 0 2021-04-27 2022-09-28
When `eslint-plugin-html` is extended, rules from other plugins don't work. 4 2022-04-02 2022-08-26
Add generators feature documentation 0 2022-04-21 2022-05-19
Refactor fastapi-mvc project template into generators submodule 0 2022-04-22 2022-08-09
No more 2 fingers right-click. 1 2022-04-19 2022-09-15
Create new email account not available 2 2022-07-04 2022-07-16
Cannot write into Excel file 10 2021-02-25 2022-09-30
Enum conversion error 0 2021-06-04 2022-09-22
nios ii: operation timed out 5 2021-03-31 2022-09-22
RBAC with domains + Object resource types in Permissions 2 2022-08-07 2022-09-16
Unable to add a new license text for scanner found license by ojo 2 2021-08-20 2022-10-03
latest CONFIGURE_UBUNTU20LTS.bash build issue 5 2022-01-23 2022-09-02
Review approvals should be canceled automatically on any modification to the PR 3 2022-01-23 2022-10-02
Cast-iron dutch oven isn't in any distribution lists 0 2022-05-11 2022-09-22
image_client.py does not get enough responses from server 3 2022-09-14 2022-10-06
Python backend cannot import Tensor 2 2022-09-12 2022-10-06
VST via JUCE, bargraph doesn't display when top of range is 0.0, OK when top is 6.0. 10 2021-06-19 2022-10-01
Color assigning for DB SelectOptions 2 2022-06-04 2022-09-20
chpl__gpu.fatbin not generated 12 2021-12-13 2022-10-06
Support Mangle Properties cache 0 2022-08-03 2022-08-14
intelmqsetup accesses version of intelmq_api wrongly leading to crash 0 2022-06-29 2022-09-22
java.lang.NullPointerException: null value in entry: lastScrollData=null 4 2021-02-03 2022-10-06
Error message about non-robust constraint drop is bugged 0 2021-07-09 2022-09-25
Fast-follow MR4 work items 1 2022-05-06 2022-10-01
Discord link in readme has expired 1 2022-03-31 2022-08-23
Cloud background shows multiple sun/moon in widescreen 0 2022-04-01 2022-08-23
Dead link in Learning Material Section 1 2021-09-01 2022-08-22
[Bug] An error occurred while sending the request Microsoft.Identity.Client.Platforms.net45.Http.DnsSensitiveClientHandler 2 2021-11-17 2022-09-20
sql/pgwire: add encoding for decimal infinities 0 2021-10-25 2022-08-14
codes for authError Errors 2 2021-10-17 2022-08-16
[Notice] FAQ 0 2021-03-26 2022-01-07
Error handling in *beginRenderPass* and *beginComputePass* is underspecified 2 2022-05-12 2022-10-01
Render to 3D texture slices 1 2022-05-12 2022-10-04
textureLoad does not specify bounds for sample_index 0 2022-05-12 2022-10-03
Incorrect execute results while run a big and complex wasm file 0 2022-07-04 2022-09-18
"Syntax error" on getMediaDetailed & getMediaDetailedByShortCode 1 2022-06-07 2022-09-24
Convert shape's stroke into a filled shape 2 2022-04-21 2022-09-19
Select tool should display the vector outline on hover 0 2022-04-21 2022-09-28
Bundled Tomcat 9.0.x Does Not Continue Starting 3 2021-09-27 2022-09-27
[Feature] connector-storage-jdbc sql Basic capabilities 0 2022-09-23 2022-09-26
Why the Chart is sealed? 2 2018-02-01 2022-09-24
BO - Multilanguages - Wishlist - Empty fields when another language is selected 1 2022-01-26 2022-09-25
ipv6 fails to register with timeout 1 2021-06-07 2022-10-06
keras.layer里Embedding的trt实现 8 2021-06-24 2022-10-05
If render_template_as_native_obj=True SimpleHttpOperator converts header values to integer automatically 1 2022-09-05 2022-09-26
tabs 组件点击相同的tab onchange会触发多次 0 2021-11-25 2022-09-22
Bad CPU type in executable 3 2021-10-27 2022-09-05