Closed SrinjoyBarman closed 1 month ago
➤ PM Bot commented:
Jira ticket: RJS-2888
I think react-native's class CallInvoker { public: virtual void invokeAsync(CallFunc&& func) noexcept = 0;
has added noexcept keyword. That is why this is failing in recent versions. When can we expect a patch to this please?
@SrinjoyBarman you can check here to see if it works for you: https://github.com/realm/realm-js/issues/6846#issuecomment-2294865629
React Native's CallInvoker API changed with https://github.com/facebook/react-native/pull/43375, such that the func
callback argument now takes a jsi::Runtime
. This was first released as react-native@0.75.0
.
Care was made in that PR to provide signatures for backward compatibility, but these were only added for overload that doesn't take a SchedulerPriority
as first argument (which we depend on). As I see it, we have a few ways forward:
jsi::Runtime
argument.SchedulerPriority
(without a jsi::Runtime
in the func
).Option 1 will leave realm
broken for 0.75.0
and 0.75.1
forever and depends on the grace and a hotfix from the React Native team to be immediately effective. Option 2 will make the coming release of realm
backwards incompatible with react-native
prior to 0.75.0
which would be very unfortunate and could potentially require a major version bump on our side. I believe our best option now is 3, as that will alleviate the immediate issue fast and good compatibility, although we'll be providing less context when calling into the call invoker.
This is a topmost priority of mine.
Got it @kraenhansen. Can you advise any patch for this so that i could edit the package itself as we need to get through this asap due to blocked deliverables. Or else, when can we expect the backwards compatibility?
@SrinjoyBarman you can check here to see if it works for you: #6846 (comment)
@nthtrung09it , your solution did work but encountered a new issue as follows:
[CXX1420]/node_modules/realm/binding/android/CMakeLists.txt debug|arm64-v8a : Could not read '/realm/binding/android/.cxx/Debug/4b4ho4y1/arm64-v8a/configure_fingerprint.bin': While parsing a protocol message, the input ended unexpectedly in the middle of a field. This could mean either that the input has been truncated or that an embedded message misreported its own length. @kraenhansen , do you want me to raise a new issue for this?
A fix was release with v12.13.1 - please take it for a spin and let us know how it goes 👍
Awesome! Thanks @kraenhansen
Thanks @kraenhansen for fixing and releasing so quickly. I can confirm that it fixes the build issue on my app, freshly upgraded to React Native 0.75.2
.
I am having this issue when trying to run on Android: Execution failed for task ':realm:buildCMakeDebug[arm64-v8a][realm-js-android-binding]'.
as well.
For it to work on iOS, I need the versions to be as such, otherwise pod install
fails:
@realm/react: "^0.5.0",
react-native: "^0.71.4",
realm: "12.13.1"
Upgrading the RN version seems to make it not work on iOS. Is there a known fix that will support both iOS and Android?
@shadhussain-crgl please open your own issue tracking this. We need the full stacktrace to debug it as this is just an indication that the gradle task failed - it doesn't reveal the underlying cause.
How frequently does the bug occur?
Always
Description
si/react_scheduler.cpp:61:65)' to 'CallFunc' (aka 'function<void (jsi::Runtime &)>') for 2nd argument C/C++: virtual void invokeAsync( C/C++: ^ C/C++: /Users/satyaretail01/Documents/service-app-mobile/node_modules/react-native/ReactCommon/callinvoker/ReactCommon/CallInvoker.h:29:16: note: candidate function not viable: requires single argument 'func', but 2 arguments were provided C/C++: virtual void invokeAsync(CallFunc&& func) noexcept = 0; C/C++: ^ C/C++: /Users/satyaretail01/Documents/service-app-mobile/node_modules/react-native/ReactCommon/callinvoker/ReactCommon/CallInvoker.h:40:16: note: candidate function not viable: requires single argument 'func', but 2 arguments were provided C/C++: virtual void invokeAsync(std::function<void()>&& func) noexcept { C/C++: ^ C/C++: 1 error generated.
Stacktrace & log output
No response
Can you reproduce the bug?
Always
Reproduction Steps
run yarn android
Version
latest - 12.13.0
What services are you using?
Atlas Device Sync
Are you using encryption?
Yes
Platform OS and version(s)
react native 0.75.1
Build environment
Which debugger for React Native: ..
Cocoapods version
No response