Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Migrate to Expo-Modules for Expo SDK 43 and newer #65

Open
Termtime opened this issue Mar 16, 2022 · 8 comments
Open

Migrate to Expo-Modules for Expo SDK 43 and newer #65

Termtime opened this issue Mar 16, 2022 · 8 comments

Comments

@Termtime
Copy link

Using React : 17.0.2
react-native: 0.67.0
Expo SDK: 44 (Bare)

We are using this library due to the webcrypto polyfill.

This library is using expo unimodules, which causes a duplicate symbol issue on iOS, UMReactNativeAdapter belongs to expo unimodules. Could we get a version in which we don't depend on unimodules please? I would contribute but I currently have no idea how you have it set up for react-native support. No issues on Android

linking ProjectName

❌  duplicate symbol '_EXCanAskAgain' in
> libExpoModulesCore.a(EXPermissionsService.o)
> UMReactNativeAdapter(EXPermissionsService.o)


❌  duplicate symbol '_EXExpiresKey' in
> libExpoModulesCore.a(EXPermissionsService.o)
> UMReactNativeAdapter(EXPermissionsService.o)


❌  duplicate symbol '_EXGrantedKey' in
> libExpoModulesCore.a(EXPermissionsService.o)
> UMReactNativeAdapter(EXPermissionsService.o)


❌  duplicate symbol '_EXPermissionExpiresNever' in
> libExpoModulesCore.a(EXPermissionsService.o)
> UMReactNativeAdapter(EXPermissionsService.o)


❌  duplicate symbol '_EXStatusKey' in
> libExpoModulesCore.a(EXPermissionsService.o)
> UMReactNativeAdapter(EXPermissionsService.o)


❌  duplicate symbol '_OBJC_CLASS_$_EXPermissionsService' in
> libExpoModulesCore.a(EXPermissionsService.o)
> UMReactNativeAdapter(EXPermissionsService.o)


❌  duplicate symbol '_OBJC_IVAR_$_EXPermissionsService._moduleRegistry' in
> libExpoModulesCore.a(EXPermissionsService.o)
> UMReactNativeAdapter(EXPermissionsService.o)


❌  duplicate symbol '_OBJC_IVAR_$_EXPermissionsService._requesters' in
> libExpoModulesCore.a(EXPermissionsService.o)
> UMReactNativeAdapter(EXPermissionsService.o)


❌  duplicate symbol '_OBJC_IVAR_$_EXPermissionsService._requestersByClass' in
> libExpoModulesCore.a(EXPermissionsService.o)
> UMReactNativeAdapter(EXPermissionsService.o)


❌  duplicate symbol '_OBJC_METACLASS_$_EXPermissionsService' in
> libExpoModulesCore.a(EXPermissionsService.o)
> UMReactNativeAdapter(EXPermissionsService.o)


❌  duplicate symbol '_OBJC_CLASS_$_EXReactNativeUserNotificationCenterProxy' in
> libExpoModulesCore.a(EXReactNativeUserNotificationCenterProxy.o)
> UMReactNativeAdapter(EXReactNativeUserNotificationCenterProxy.o)


❌  duplicate symbol '_OBJC_METACLASS_$_EXReactNativeUserNotificationCenterProxy' in
> libExpoModulesCore.a(EXReactNativeUserNotificationCenterProxy.o)
> UMReactNativeAdapter(EXReactNativeUserNotificationCenterProxy.o)


❌  ld: 12 duplicate symbols for architecture x86_64



❌  clang: error: linker command failed with exit code 1 (use -v to see invocation)


error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening ProjectName.xcworkspace.
info Run CLI with --verbose flag for more details.
@olivierpascal
Copy link

+1

@marcato15
Copy link

+1

1 similar comment
@charlestbell
Copy link

+1

@charlestbell
Copy link

I found a temporary workaround, which is to use Expo's classic build service, instead of their newer EAS build service. Unfortunately, the classic build service is deprecated and goes offline in about 160 days. So I'm reaching out to them and see if they can get EAS build to work like classic in this regard, or hold off on deprecating classic.

@charlestbell
Copy link

Update: The EAS guys gave a kind of "not my problem" response.
I also reached out to the guys in charge of microsoft's @azure/cosmos package and they're investigating finding a replacement for this package.

@TimoGlastra
Copy link

TimoGlastra commented Jan 3, 2023

For yarn I found the following resolutions 'hack' to be working:

{
  // ... other package.json options ...
  "resolutions": {
    "@unimodules/react-native-adapter": "./node_modules/expo"
  }
}

@TimoGlastra
Copy link

I think this should be fixable by removing the dependency on the unimodules and instead updating to the expo modules. Not sure why it is needed to depend on the unimodules in the first place, couldn't we directly depend on expo-random?

@kevlened would you accept a PR for this change?

@czy0729
Copy link

czy0729 commented Jan 4, 2023

@TimoGlastra
i solve the problem right now.
I've been trying to fix this for 50 hours, any solution that can be found is invalid.
at last i just remove @unimodules/core and @unimodules/react-native-adapter in package.json which tell you to migrating expo under 44 to expo modules at first https://github.com/expo/fyi/blob/master/expo-modules-migration.md#migrating-to-expo-modules.
then the build pass oh god.

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

No branches or pull requests

6 participants