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

Getting duplicates symbols after installing expo-notifications in a bare project (ios) #8745

Closed
Speedy1991 opened this issue Jun 9, 2020 · 12 comments · Fixed by #8753
Closed
Assignees

Comments

@Speedy1991
Copy link

Getting duplicates symbols after installing expo-notifications in a bare project

yarn add expo-notifications && cd ios && pod install

Deploying the app with xcode to a local device leads to duplicate symbols.

I already checked if there is some manual linking going on, but Libraries are clean. Linking is only against pods.

duplicate symbol '_OBJC_IVAR_$_EXRemoteNotificationPermissionRequester._reject' in:
  /Users/AB/Library/Developer/Xcode/DerivedData/kinikana-gwnqyjnevydhebahxkjqtmrmushg/Build/Products/Debug-iphoneos/EXNotifications/libEXNotifications.a(EXRemoteNotificationPermissionRequester.o)
  /Users/AB/Library/Developer/Xcode/DerivedData/kinikana-gwnqyjnevydhebahxkjqtmrmushg/Build/Products/Debug-iphoneos/EXPermissions/libEXPermissions.a(EXRemoteNotificationPermissionRequester.o)
duplicate symbol '_OBJC_IVAR_$_EXRemoteNotificationPermissionRequester._userNotificationPermissionRequester' in:
  /Users/AB/Library/Developer/Xcode/DerivedData/kinikana-gwnqyjnevydhebahxkjqtmrmushg/Build/Products/Debug-iphoneos/EXNotifications/libEXNotifications.a(EXRemoteNotificationPermissionRequester.o)
  /Users/AB/Library/Developer/Xcode/DerivedData/kinikana-gwnqyjnevydhebahxkjqtmrmushg/Build/Products/Debug-iphoneos/EXPermissions/libEXPermissions.a(EXRemoteNotificationPermissionRequester.o)
duplicate symbol '_OBJC_CLASS_$_EXRemoteNotificationPermissionRequester' in:
  /Users/AB/Library/Developer/Xcode/DerivedData/kinikana-gwnqyjnevydhebahxkjqtmrmushg/Build/Products/Debug-iphoneos/EXNotifications/libEXNotifications.a(EXRemoteNotificationPermissionRequester.o)
  /Users/AB/Library/Developer/Xcode/DerivedData/kinikana-gwnqyjnevydhebahxkjqtmrmushg/Build/Products/Debug-iphoneos/EXPermissions/libEXPermissions.a(EXRemoteNotificationPermissionRequester.o)
duplicate symbol '_OBJC_METACLASS_$_EXRemoteNotificationPermissionRequester' in:
  /Users/AB/Library/Developer/Xcode/DerivedData/kinikana-gwnqyjnevydhebahxkjqtmrmushg/Build/Products/Debug-iphoneos/EXNotifications/libEXNotifications.a(EXRemoteNotificationPermissionRequester.o)
  /Users/AB/Library/Developer/Xcode/DerivedData/kinikana-gwnqyjnevydhebahxkjqtmrmushg/Build/Products/Debug-iphoneos/EXPermissions/libEXPermissions.a(EXRemoteNotificationPermissionRequester.o)
duplicate symbol '_OBJC_IVAR_$_EXRemoteNotificationPermissionRequester._remoteNotificationsRegistrationIsPending' in:
  /Users/AB/Library/Developer/Xcode/DerivedData/kinikana-gwnqyjnevydhebahxkjqtmrmushg/Build/Products/Debug-iphoneos/EXNotifications/libEXNotifications.a(EXRemoteNotificationPermissionRequester.o)
  /Users/AB/Library/Developer/Xcode/DerivedData/kinikana-gwnqyjnevydhebahxkjqtmrmushg/Build/Products/Debug-iphoneos/EXPermissions/libEXPermissions.a(EXRemoteNotificationPermissionRequester.o)
duplicate symbol '_OBJC_IVAR_$_EXRemoteNotificationPermissionRequester._resolve' in:
  /Users/AB/Library/Developer/Xcode/DerivedData/kinikana-gwnqyjnevydhebahxkjqtmrmushg/Build/Products/Debug-iphoneos/EXNotifications/libEXNotifications.a(EXRemoteNotificationPermissionRequester.o)
  /Users/AB/Library/Developer/Xcode/DerivedData/kinikana-gwnqyjnevydhebahxkjqtmrmushg/Build/Products/Debug-iphoneos/EXPermissions/libEXPermissions.a(EXRemoteNotificationPermissionRequester.o)
duplicate symbol '_OBJC_IVAR_$_EXRemoteNotificationPermissionRequester._methodQueue' in:
  /Users/AB/Library/Developer/Xcode/DerivedData/kinikana-gwnqyjnevydhebahxkjqtmrmushg/Build/Products/Debug-iphoneos/EXNotifications/libEXNotifications.a(EXRemoteNotificationPermissionRequester.o)
  /Users/AB/Library/Developer/Xcode/DerivedData/kinikana-gwnqyjnevydhebahxkjqtmrmushg/Build/Products/Debug-iphoneos/EXPermissions/libEXPermissions.a(EXRemoteNotificationPermissionRequester.o)

Targets:

  • IOS
  • Android (runs fine)

Versions:

"expo-notifications": "0.3.1",
"expo-permissions": "8.1.0",
"react-native-unimodules": "0.9.1",

I don't know how, but it looks like libEXNotifications is colliding with libEXPermissions?

@Speedy1991 Speedy1991 changed the title Getting duplicates symbols after installing expo-notifications in a bare project Getting duplicates symbols after installing expo-notifications in a bare project (ios) Jun 9, 2020
@andyhmltn
Copy link

Also experiencing the same error:

duplicate symbol '_OBJC_IVAR_$_EXRemoteNotificationPermissionRequester._reject' in:
    /Users/andy/Library/Developer/Xcode/DerivedData/Estuary-gbtnkqqbmgycdugwuqbavfzcieka/Build/Products/Debug-iphoneos/EXNotifications/libEXNotifications.a(EXRemoteNotificationPermissionRequester.o)
    /Users/andy/Library/Developer/Xcode/DerivedData/Estuary-gbtnkqqbmgycdugwuqbavfzcieka/Build/Products/Debug-iphoneos/EXPermissions/libEXPermissions.a(EXRemoteNotificationPermissionRequester.o)
duplicate symbol '_OBJC_IVAR_$_EXRemoteNotificationPermissionRequester._userNotificationPermissionRequester' in:
    /Users/andy/Library/Developer/Xcode/DerivedData/Estuary-gbtnkqqbmgycdugwuqbavfzcieka/Build/Products/Debug-iphoneos/EXNotifications/libEXNotifications.a(EXRemoteNotificationPermissionRequester.o)
    /Users/andy/Library/Developer/Xcode/DerivedData/Estuary-gbtnkqqbmgycdugwuqbavfzcieka/Build/Products/Debug-iphoneos/EXPermissions/libEXPermissions.a(EXRemoteNotificationPermissionRequester.o)
duplicate symbol '_OBJC_CLASS_$_EXRemoteNotificationPermissionRequester' in:
    /Users/andy/Library/Developer/Xcode/DerivedData/Estuary-gbtnkqqbmgycdugwuqbavfzcieka/Build/Products/Debug-iphoneos/EXNotifications/libEXNotifications.a(EXRemoteNotificationPermissionRequester.o)
    /Users/andy/Library/Developer/Xcode/DerivedData/Estuary-gbtnkqqbmgycdugwuqbavfzcieka/Build/Products/Debug-iphoneos/EXPermissions/libEXPermissions.a(EXRemoteNotificationPermissionRequester.o)
duplicate symbol '_OBJC_METACLASS_$_EXRemoteNotificationPermissionRequester' in:
    /Users/andy/Library/Developer/Xcode/DerivedData/Estuary-gbtnkqqbmgycdugwuqbavfzcieka/Build/Products/Debug-iphoneos/EXNotifications/libEXNotifications.a(EXRemoteNotificationPermissionRequester.o)
    /Users/andy/Library/Developer/Xcode/DerivedData/Estuary-gbtnkqqbmgycdugwuqbavfzcieka/Build/Products/Debug-iphoneos/EXPermissions/libEXPermissions.a(EXRemoteNotificationPermissionRequester.o)
duplicate symbol '_OBJC_IVAR_$_EXRemoteNotificationPermissionRequester._remoteNotificationsRegistrationIsPending' in:
    /Users/andy/Library/Developer/Xcode/DerivedData/Estuary-gbtnkqqbmgycdugwuqbavfzcieka/Build/Products/Debug-iphoneos/EXNotifications/libEXNotifications.a(EXRemoteNotificationPermissionRequester.o)
    /Users/andy/Library/Developer/Xcode/DerivedData/Estuary-gbtnkqqbmgycdugwuqbavfzcieka/Build/Products/Debug-iphoneos/EXPermissions/libEXPermissions.a(EXRemoteNotificationPermissionRequester.o)
duplicate symbol '_OBJC_IVAR_$_EXRemoteNotificationPermissionRequester._resolve' in:
    /Users/andy/Library/Developer/Xcode/DerivedData/Estuary-gbtnkqqbmgycdugwuqbavfzcieka/Build/Products/Debug-iphoneos/EXNotifications/libEXNotifications.a(EXRemoteNotificationPermissionRequester.o)
    /Users/andy/Library/Developer/Xcode/DerivedData/Estuary-gbtnkqqbmgycdugwuqbavfzcieka/Build/Products/Debug-iphoneos/EXPermissions/libEXPermissions.a(EXRemoteNotificationPermissionRequester.o)
duplicate symbol '_OBJC_IVAR_$_EXRemoteNotificationPermissionRequester._methodQueue' in:
    /Users/andy/Library/Developer/Xcode/DerivedData/Estuary-gbtnkqqbmgycdugwuqbavfzcieka/Build/Products/Debug-iphoneos/EXNotifications/libEXNotifications.a(EXRemoteNotificationPermissionRequester.o)
    /Users/andy/Library/Developer/Xcode/DerivedData/Estuary-gbtnkqqbmgycdugwuqbavfzcieka/Build/Products/Debug-iphoneos/EXPermissions/libEXPermissions.a(EXRemoteNotificationPermissionRequester.o)
ld: 7 duplicate symbols for architecture arm64

@andyhmltn
Copy link

FYI @Speedy1991 - I was able to successfully build without this error by downgrading to 0.1.4

@EQuimper
Copy link

EQuimper commented Jun 9, 2020

@Speedy1991 look like you are right. Did get the same issue and decide to exclude expo-permissions and I was able to build. For now I will use react-native-permissions

@Andrea-Arguello
Copy link

Andrea-Arguello commented Jun 10, 2020

Getting this same issue, only on iOS as well.

duplicate symbol '_OBJC_IVAR_$_EXRemoteNotificationPermissionRequester._reject' in:
    /Users/nahualventures/Library/Developer/Xcode/DerivedData/exeboard-gnqttragcfobujafnrngqjkzdhuw/Build/Products/Debug-iphonesimulator/EXNotifications/libEXNotifications.a(EXRemoteNotificationPermissionRequester.o)
    /Users/nahualventures/Library/Developer/Xcode/DerivedData/exeboard-gnqttragcfobujafnrngqjkzdhuw/Build/Products/Debug-iphonesimulator/EXPermissions/libEXPermissions.a(EXRemoteNotificationPermissionRequester.o)
duplicate symbol '_OBJC_IVAR_$_EXRemoteNotificationPermissionRequester._userNotificationPermissionRequester' in:
    /Users/nahualventures/Library/Developer/Xcode/DerivedData/exeboard-gnqttragcfobujafnrngqjkzdhuw/Build/Products/Debug-iphonesimulator/EXNotifications/libEXNotifications.a(EXRemoteNotificationPermissionRequester.o)
    /Users/nahualventures/Library/Developer/Xcode/DerivedData/exeboard-gnqttragcfobujafnrngqjkzdhuw/Build/Products/Debug-iphonesimulator/EXPermissions/libEXPermissions.a(EXRemoteNotificationPermissionRequester.o)
duplicate symbol '_OBJC_CLASS_$_EXRemoteNotificationPermissionRequester' in:
    /Users/nahualventures/Library/Developer/Xcode/DerivedData/exeboard-gnqttragcfobujafnrngqjkzdhuw/Build/Products/Debug-iphonesimulator/EXNotifications/libEXNotifications.a(EXRemoteNotificationPermissionRequester.o)
    /Users/nahualventures/Library/Developer/Xcode/DerivedData/exeboard-gnqttragcfobujafnrngqjkzdhuw/Build/Products/Debug-iphonesimulator/EXPermissions/libEXPermissions.a(EXRemoteNotificationPermissionRequester.o)
duplicate symbol '_OBJC_METACLASS_$_EXRemoteNotificationPermissionRequester' in:
    /Users/nahualventures/Library/Developer/Xcode/DerivedData/exeboard-gnqttragcfobujafnrngqjkzdhuw/Build/Products/Debug-iphonesimulator/EXNotifications/libEXNotifications.a(EXRemoteNotificationPermissionRequester.o)
    /Users/nahualventures/Library/Developer/Xcode/DerivedData/exeboard-gnqttragcfobujafnrngqjkzdhuw/Build/Products/Debug-iphonesimulator/EXPermissions/libEXPermissions.a(EXRemoteNotificationPermissionRequester.o)
duplicate symbol '_OBJC_IVAR_$_EXRemoteNotificationPermissionRequester._remoteNotificationsRegistrationIsPending' in:
    /Users/nahualventures/Library/Developer/Xcode/DerivedData/exeboard-gnqttragcfobujafnrngqjkzdhuw/Build/Products/Debug-iphonesimulator/EXNotifications/libEXNotifications.a(EXRemoteNotificationPermissionRequester.o)
    /Users/nahualventures/Library/Developer/Xcode/DerivedData/exeboard-gnqttragcfobujafnrngqjkzdhuw/Build/Products/Debug-iphonesimulator/EXPermissions/libEXPermissions.a(EXRemoteNotificationPermissionRequester.o)
duplicate symbol '_OBJC_IVAR_$_EXRemoteNotificationPermissionRequester._resolve' in:
    /Users/nahualventures/Library/Developer/Xcode/DerivedData/exeboard-gnqttragcfobujafnrngqjkzdhuw/Build/Products/Debug-iphonesimulator/EXNotifications/libEXNotifications.a(EXRemoteNotificationPermissionRequester.o)
    /Users/nahualventures/Library/Developer/Xcode/DerivedData/exeboard-gnqttragcfobujafnrngqjkzdhuw/Build/Products/Debug-iphonesimulator/EXPermissions/libEXPermissions.a(EXRemoteNotificationPermissionRequester.o)
duplicate symbol '_OBJC_IVAR_$_EXRemoteNotificationPermissionRequester._methodQueue' in:
    /Users/nahualventures/Library/Developer/Xcode/DerivedData/exeboard-gnqttragcfobujafnrngqjkzdhuw/Build/Products/Debug-iphonesimulator/EXNotifications/libEXNotifications.a(EXRemoteNotificationPermissionRequester.o)
    /Users/nahualventures/Library/Developer/Xcode/DerivedData/exeboard-gnqttragcfobujafnrngqjkzdhuw/Build/Products/Debug-iphonesimulator/EXPermissions/libEXPermissions.a(EXRemoteNotificationPermissionRequester.o)
ld: 7 duplicate symbols for architecture x86_64

Will try @andyhmltn's and @EQuimper's solutions.

@brentvatne
Copy link
Member

can you show me the output of running pod install in the ios directory?

@andyhmltn
Copy link

For my solution, I also removed expo-permission. It seems as if expo-notifications has some methods for requesting permissions so this worked for me

@Speedy1991
Copy link
Author

Speedy1991 commented Jun 10, 2020

can you show me the output of running pod install in the ios directory?

pod install
Adding a custom script phase for Pod RNFBApp: [RNFB] Core Configuration
Detected React Native module pods for RNCAsyncStorage, RNCMaskedView, RNDateTimePicker, RNDeviceInfo, RNFBAnalytics, RNFBApp, RNFBInAppMessaging, RNFBPerf, RNGestureHandler, RNReanimated, RNSVG, RNScreens, RNSentry, react-native-safe-area-context, and rn-fetch-blob
Installing unimodules:
 expo-application@2.1.1 from ../node_modules/expo-application/ios
 expo-av@8.1.0 from ../node_modules/expo-av/ios
 expo-constants@9.0.0 from ../node_modules/expo-constants/ios
 expo-file-system@8.1.0 from ../node_modules/expo-file-system/ios
 expo-font@7.0.0 from ../node_modules/expo-font/ios
 expo-image-loader@1.0.1 from ../node_modules/expo-image-loader/ios
 expo-in-app-purchases@8.1.0 from ../node_modules/expo-in-app-purchases/ios
 expo-keep-awake@8.1.0 from ../node_modules/expo-keep-awake/ios
 expo-linear-gradient@7.0.0 from ../node_modules/expo-linear-gradient/ios
 expo-localization@8.1.0 from ../node_modules/expo-localization/ios
 expo-notifications@0.1.7 from ../node_modules/expo-notifications/ios
 expo-permissions@8.1.0 from ../node_modules/expo-permissions/ios
 expo-web-browser@8.2.0 from ../node_modules/expo-web-browser/ios
 unimodules-app-loader@1.0.2 from ../node_modules/unimodules-app-loader/ios
 unimodules-barcode-scanner-interface@5.1.0 from ../node_modules/unimodules-barcode-scanner-interface/ios
 unimodules-camera-interface@5.1.0 from ../node_modules/unimodules-camera-interface/ios
 unimodules-constants-interface@5.1.0 from ../node_modules/unimodules-constants-interface/ios
 unimodules-core@5.1.2 from ../node_modules/@unimodules/core/ios
 unimodules-face-detector-interface@5.1.0 from ../node_modules/unimodules-face-detector-interface/ios
 unimodules-file-system-interface@5.1.0 from ../node_modules/unimodules-file-system-interface/ios
 unimodules-font-interface@5.1.0 from ../node_modules/unimodules-font-interface/ios
 unimodules-image-loader-interface@5.1.0 from ../node_modules/unimodules-image-loader-interface/ios
 unimodules-permissions-interface@5.1.0 from ../node_modules/unimodules-permissions-interface/ios
 unimodules-react-native-adapter@5.2.0 from ../node_modules/@unimodules/react-native-adapter/ios
 unimodules-sensors-interface@5.1.0 from ../node_modules/unimodules-sensors-interface/ios
 unimodules-task-manager-interface@5.1.0 from ../node_modules/unimodules-task-manager-interface/ios
Analyzing dependencies
Downloading dependencies
Generating Pods project
Integrating client project
Pod installation complete! There are 71 dependencies from the Podfile and 94 total pods installed.

I can confirm: Removing expo-permissions is working, but not really a fix IMO
€dit: Forgot to upgrade back from 0.1.7 to 0.3.1
Even with removed expo-permissions i got the same error - maybe a peer dependency?

@Speedy1991
Copy link
Author

Downgrading to 0.1.7 causes an other problem: #8084 (comment)

@EQuimper
Copy link

@Speedy1991 make sure to clear your pods. When i did remove it I did make sure to delete my pods folder and Podfile.lock

sjchmiela added a commit that referenced this issue Jun 10, 2020
# Why

Fixes #8745 — the _duplicate symbols_ problem occurring due to the fact that recently the requester has been moved to `expo-notifications` without changing the name. This makes it so that two separate packages have class of the same name which is bad.

# How

`expo-notifications@>0.3.0` were breaking iOS builds when bundled alongside `expo-permissions@<9.0.0`.

# Test Plan

I have verified manually in a separate project that the suggested changes fix the issue.
@sjchmiela
Copy link
Contributor

Hey all, sorry for introducing this bug. For those interested, it has been introduced in #8486 (you can read the discussion underneath merge event).

Good news is the fix has just landed on master and I also published it as expo-notifications@0.3.2, so go get the upgrade while it's hot!

@Speedy1991
Copy link
Author

@sjchmiela thanks for the quick fix
I can confirm: The linking error is gone

tsapeta pushed a commit that referenced this issue Jun 24, 2020
Fixes #8745 — the _duplicate symbols_ problem occurring due to the fact that recently the requester has been moved to `expo-notifications` without changing the name. This makes it so that two separate packages have class of the same name which is bad.

`expo-notifications@>0.3.0` were breaking iOS builds when bundled alongside `expo-permissions@<9.0.0`.

I have verified manually in a separate project that the suggested changes fix the issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants
@brentvatne @andyhmltn @sjchmiela @EQuimper @Speedy1991 @Andrea-Arguello and others