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

Realm does not build on iOS with use_frameworks! :linkage => :static as of version 12.12.0 #6808

Closed
gvanderclay opened this issue Jul 23, 2024 · 11 comments · Fixed by #6812
Closed

Comments

@gvanderclay
Copy link

gvanderclay commented Jul 23, 2024

How frequently does the bug occur?

Always

Description

Our React Native app fails to build when use_frameworks! :linkage => :static is set in the Podfile. This issue started occurring after upgrading to Realm JS v12.12.0. Given that this configuration was working in previous versions, we expected it to continue working after a minor version upgrade.

I believe the issue was introduced by #6791.

This issue is critical for our project as we rely on react-native-firebase, which requires the use_frameworks! :linkage => :static configuration.

Stacktrace & log output

❌  (/Users/gvanderclay/workspace/my-app/node_modules/realm/binding/apple/RealmReactModule.mm:24:9)

  22 | #import <React/RCTInvalidating.h>
  23 | #import <ReactCommon/CallInvoker.h>
> 24 | #import <React-featureflags/react/featureflags/ReactNativeFeatureFlags.h>
     |         ^ 'React-featureflags/react/featureflags/ReactNativeFeatureFlags.h' file not found
  25 | #import <jsi/jsi.h>
  26 |
  27 | #import <arpa/inet.h>

Can you reproduce the bug?

Always

Reproduction Steps

I have created a minimal reproducible example to demonstrate the issue. The repository is available here, and it includes detailed instructions on how to reproduce the build failure.

Note: The example uses Expo with expo-build-properties to set use_frameworks!, but the issue persists regardless of this context.

Version

12.12.0

What services are you using?

Local Database only

Are you using encryption?

Yes

Platform OS and version(s)

iOS only

Build environment

No response

Cocoapods version

1.15.2

Copy link

sync-by-unito bot commented Jul 23, 2024

➤ PM Bot commented:

Jira ticket: RJS-2870

@kraenhansen
Copy link
Member

Thanks for reaching out and for the detailed reproduction!

I believe the issue was introduced by #6791.

Git blame suggests it's more likely that this is caused by changes introduced in #6737. We actually ended up not relying on those feature flags anyway - what happens if you simply delete that import?

@kraenhansen kraenhansen added the Waiting-For-Reporter Waiting for more information from the reporter before we can proceed label Jul 24, 2024
@kraenhansen kraenhansen self-assigned this Jul 24, 2024
@sunrise1002
Copy link

I have the same issue with
"realm": "^12.3.1"
"@realm/react": "^0.6.2"

@TirumalReddy
Copy link

I have the same issue with
"realm": "^12.6.2"

@AlienDev66
Copy link

I have the same issue with
"realm": "^12.9.0",

@gvanderclay
Copy link
Author

gvanderclay commented Jul 24, 2024

Thanks for reaching out and for the detailed reproduction!

I believe the issue was introduced by #6791.

Git blame suggests it's more likely that this is caused by changes introduced in #6737. We actually ended up not relying on those feature flags anyway - what happens if you simply delete that import?

Thanks for the quick response!

I tested the build after deleting the import as you suggested, and the app successfully built and compiled.

In the meantime, we've downgraded to v12.11.1, which is working for us.

@github-actions github-actions bot added Needs-Attention Reporter has responded. Review comment. and removed Waiting-For-Reporter Waiting for more information from the reporter before we can proceed labels Jul 24, 2024
@juanbalofredo
Copy link

I have the same issue with
"realm": "^12.9.0",
im going to try now with v12.11.1

@AlienDev66
Copy link

I have the same issue with "realm": "^12.9.0", im going to try now with v12.11.1

I tried, but the error persists. I'm still trying to resolve it.

@sync-by-unito sync-by-unito bot removed the Needs-Attention Reporter has responded. Review comment. label Jul 24, 2024
@kraenhansen kraenhansen reopened this Jul 24, 2024
kraenhansen added a commit that referenced this issue Jul 25, 2024
… Android binding (#6812)

* Update RealmReactModule.mm to avoid including an unused header

This fixes #6808

* Update RealmReactModule.java to avoid importing an unused class

* Adding a note to the changelog
@kraenhansen
Copy link
Member

kraenhansen commented Jul 25, 2024

A fix was released with v12.12.1 - please take it for a spin a report back if the issue persists 👍

@rkz98
Copy link

rkz98 commented Jul 31, 2024

For me, the issue persists on v12.12.1 (v12.11.1 is working). react-native 0.71.5

@gvanderclay
Copy link
Author

@kraenhansen Just validated that this fixed it for me! Thanks for the quick turnaround!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.