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

Not building in Android and iOS for React Native 76.0 new arch enabled project #314

Open
Gautham495 opened this issue Oct 26, 2024 · 15 comments

Comments

@Gautham495
Copy link

Current behavior

Does not build in android and ios for new arch.

Works well in old arch

Expected behavior

Should build properly without showing 5 duplicate symbols error in ios.

Platform

  • Android
  • iOS

React Native Version

76.0

React Native Compressor Version

Latest Version.

@numandev1 - Check it out when you have free time please.

Copy link

👋 @Gautham495
Thanks for opening your issue here! If you find this package useful hit the star🌟!

@gelodgreat
Copy link

up for this

@gontovnik
Copy link

Facing the same problem. The team has shared that even the old architecture but 76.0 is not building

@vbylen
Copy link

vbylen commented Oct 31, 2024

Can confirm react-native-compressor is making builds fail on 0.76 new arch

@xiaoyaotan12345
Copy link

Me too, the build failed with a rate of 0.76.

@AhmadAltomy
Copy link

diff --git a/node_modules/react-native-compressor/package.json b/node_modules/react-native-compressor/package.json
index 8adf7dc..8dd43a6 100644
--- a/node_modules/react-native-compressor/package.json
+++ b/node_modules/react-native-compressor/package.json
@@ -197,11 +197,6 @@
         "name": "RNCompressorSpec",
         "type": "modules",
         "jsSrcsDir": "src"
-      },
-      {
-        "name": "RNVideoCompressorSpec",
-        "type": "modules",
-        "jsSrcsDir": "src"
       }
     ]
   }

This changes fixes the build for me

@Gautham495
Copy link
Author

@AhmadAltomy

This fixes it for android. Thanks.

@Akyna
Copy link

Akyna commented Nov 6, 2024

Facing the same problem

    "react-native": "0.76.1",
    "react-native-compressor": "^1.9.0",

for IOS

...
duplicate symbol '_OBJC_IVAR_$_NativeCompressorSpecBase._eventEmitterCallback' in:
    /Users/......../ReactCodegen/libReactCodegen.a[60](RNVideoCompressorSpec-generated.o)
    /Users/......./ReactCodegen/libReactCodegen.a[38](RNCompressorSpec-generated.o)
ld: 5 duplicate symbols
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

@sincerely-manny
Copy link

diff --git a/node_modules/react-native-compressor/package.json b/node_modules/react-native-compressor/package.json
index 8adf7dc..8dd43a6 100644
--- a/node_modules/react-native-compressor/package.json
+++ b/node_modules/react-native-compressor/package.json
@@ -197,11 +197,6 @@
         "name": "RNCompressorSpec",
         "type": "modules",
         "jsSrcsDir": "src"
-      },
-      {
-        "name": "RNVideoCompressorSpec",
-        "type": "modules",
-        "jsSrcsDir": "src"
       }
     ]
   }

This changes fixes the build for me

confirmed for ios, thanks!

@andresribeiro
Copy link

+1

diff --git a/node_modules/react-native-compressor/package.json b/node_modules/react-native-compressor/package.json
index 8adf7dc..8dd43a6 100644
--- a/node_modules/react-native-compressor/package.json
+++ b/node_modules/react-native-compressor/package.json
@@ -197,11 +197,6 @@
         "name": "RNCompressorSpec",
         "type": "modules",
         "jsSrcsDir": "src"
-      },
-      {
-        "name": "RNVideoCompressorSpec",
-        "type": "modules",
-        "jsSrcsDir": "src"
       }
     ]
   }

This changes fixes the build for me

thank you. a patch fixed the build

@ajkraus04
Copy link

Can someone explain how to create a patch or use this solution in my app?

@andresribeiro
Copy link

@ajkraus04 for npm, use patch-package
yarn path for yarn
bun patch for bun
pnpm patch for pnpm

@Faivv
Copy link

Faivv commented Nov 15, 2024

Build was successful for Android but not for IOS. Eventually, for IOS, downgrade to react-native 0.75.2 solved the problem for me.

@niki-bri
Copy link

Any updates? According to the react native directory, react-native-compressor supports the new architecture.

@Shaninnik
Copy link

For us it does not build even with old arch and Expo 52/react-native 0.76.2 on iOS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests