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

> Task :realm:buildCMakeDebug[arm64-v8a][realm-js-android-binding] FAILED . React native - 0.75.1 #6845

Closed
SrinjoyBarman opened this issue Aug 17, 2024 · 13 comments · Fixed by #6851

Comments

@SrinjoyBarman
Copy link

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.

Task :realm:buildCMakeDebug[arm64-v8a][realm-js-android-binding] FAILED

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

Copy link

sync-by-unito bot commented Aug 17, 2024

➤ PM Bot commented:

Jira ticket: RJS-2888

@SrinjoyBarman
Copy link
Author

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?

@kraenhansen kraenhansen self-assigned this Aug 17, 2024
@nthtrung09it
Copy link

@SrinjoyBarman you can check here to see if it works for you:
#6846 (comment)

@kraenhansen
Copy link
Member

React Native's CallInvoker API changed with facebook/react-native#43375, such that the func callback argument now takes a jsi::Runtime. This was first released as [email protected].

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:

  1. Upstream a fix to RN adding the missing backward compatibility overloads.
  2. Fix the callback we pass to take a jsi::Runtime argument.
  3. Call the backwards compatibility overload that doesn't take a 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.

@SrinjoyBarman
Copy link
Author

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
Copy link
Author

@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:

  • What went wrong:
    Execution failed for task ':realm:configureCMakeDebug[arm64-v8a]'.

[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?

@kraenhansen
Copy link
Member

A fix was release with v12.13.1 - please take it for a spin and let us know how it goes 👍

@SrinjoyBarman
Copy link
Author

Awesome!
Thanks @kraenhansen

@c100k
Copy link

c100k commented Aug 22, 2024

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.

@shadhussain-crgl
Copy link

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?

@kraenhansen
Copy link
Member

@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.

@saloni1711
Copy link

saloni1711 commented Oct 5, 2024

Task :realm:buildCMakeRelease[arm64-v8a][realm-js-android-binding] FAILED

Still facing same issue with new version, Trying to build release build on android.
"@realm/react": "^0.10.1",
"react-native": "0.73.6",
"realm": "^12.13.1",

@kraenhansen
Copy link
Member

kraenhansen commented Oct 7, 2024

@saloni1711 Please create your own issue with the entire stacktrace and detailed steps to reproduce it, the lines you've pasted just says the build failed, not why it failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment