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

ARCore and Firebase Messaging compatibility issue #305

Closed
Arnoho opened this issue Jul 11, 2018 · 12 comments
Closed

ARCore and Firebase Messaging compatibility issue #305

Arnoho opened this issue Jul 11, 2018 · 12 comments

Comments

@Arnoho
Copy link

Arnoho commented Jul 11, 2018

I tried to add Firebase Messaging to my project that have ARCore (and ARKit). Unity build just fine but once I tried to build project for my device with xcode (9.3) I got error: Apple Mach-O Linker (ld) Error - linker command failed with exit code 1 (use -v to see invocation) and before that there is 551 duplicate symbols for architecture arm64.

I am trying to figure out what is the issue here. Removing either ARCore or Firebase Messaging and all problems are gone. I am also using Firebase realtime database but that doesn't seems to cause any trouble.

I am using ARCore v. 1.3.0 and I tried first with Firebase v. 4.5.2 and then upgrade to 5.1.1 but that didn't help.

I won't paste whole list of 551 duplicate symbols but they all seems to be part of "Protobuf/libProtobuf.a". I can find it on my project but what can I do?

Here is the snippet:

duplicate symbol _OBJC_METACLASS_$_GPBUInt32Value in:
    /Users/arnora/Library/Developer/Xcode/DerivedData/Unity-iPhone-eeiookellmkkvdbzucboowoqjcno/Build/Products/ReleaseForRunning-iphoneos/Protobuf/libProtobuf.a(Wrappers.pbobjc.o)
    /Users/arnora/Projects/COMPANY/XXX/Build/iOS/XXX/Pods/ARCore/Frameworks/ARCore.framework/ARCore(Wrappers.pbobjc_8940b06ba7205568da36560b58225827.o)
duplicate symbol _OBJC_CLASS_$_GPBInt32Value in:
    /Users/arnora/Library/Developer/Xcode/DerivedData/Unity-iPhone-eeiookellmkkvdbzucboowoqjcno/Build/Products/ReleaseForRunning-iphoneos/Protobuf/libProtobuf.a(Wrappers.pbobjc.o)
    /Users/arnora/Projects/COMPANY/XXX/Build/iOS/XXX/Pods/ARCore/Frameworks/ARCore.framework/ARCore(Wrappers.pbobjc_8940b06ba7205568da36560b58225827.o)
duplicate symbol _OBJC_METACLASS_$_GPBInt32Value in:
    /Users/arnora/Library/Developer/Xcode/DerivedData/Unity-iPhone-eeiookellmkkvdbzucboowoqjcno/Build/Products/ReleaseForRunning-iphoneos/Protobuf/libProtobuf.a(Wrappers.pbobjc.o)
    /Users/arnora/Projects/COMPANY/XXX/Build/iOS/XXX/Pods/ARCore/Frameworks/ARCore.framework/ARCore(Wrappers.pbobjc_8940b06ba7205568da36560b58225827.o)
ld: 551 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
@Arnoho
Copy link
Author

Arnoho commented Jul 18, 2018

Anyone, any ideas? I am still stuck with this issue. I had to remove Firebase Messaging to be able to work with ARCore but that's not really solution.

@Kadmish
Copy link

Kadmish commented Jul 21, 2018

We have the same problem, we uninstall the Firebase messaging but this is not a solution - as you said. waiting for solution
Thanks!

@omrip2
Copy link

omrip2 commented Jul 22, 2018

+1

@pablisho
Copy link
Contributor

Hi, thanks for the report. I added it to our internal tracker to fix it for next releases. As a workaround, if you are not using CloudAnchors see #261. Disabling ARCore for iOS should fix this. Let me know if that helped.

@bopangzz
Copy link

Hi, can you guys point to me how the Firebase Messaging is setup in Unity? Does it use cocoapod to manage its dependencies?

@Arnoho
Copy link
Author

Arnoho commented Jul 24, 2018

@pablisho Thanks for the tip! Sadly we are using CloudAnchors in one part of our project so we might need to wait for the fix.

@bopangzz
Firebase Cloud Messaging is unitypackage file that can be downloaded here. It is adding Podfile:

pod 'Firebase/Core', '5.3.0'
pod 'Firebase/Messaging', '5.3.0'

But I don't know if there is more special going on since all the imported files are dll.

@pablisho
Copy link
Contributor

pablisho commented Aug 2, 2018

Hi, ARCore SDK for Unity v1.4.0 has been released and this issue has been fixed. Feel free to comment if you still experience it.

@Arnoho
Copy link
Author

Arnoho commented Nov 20, 2018

Sorry @pablisho that took so long to have time to test this out. I tried this with ARCore 1.4.0 and 1.5.0 and updating Firebase SDK to latest 5.4.2 (https://firebase.google.com/support/release-notes/unity) but same issue still exists.

I realise that we are using .net 3.5, not the latest 4.x. Could this be issue here? Hope not, since I won't be able to use .net 4.5 since unity/firebase has this websocket issue (firebase/quickstart-unity#162).

@cruxdavid
Copy link

Hello, did someone managed to solve this issue?
I updated to ARCore SDK for Unity v1.6.0 and Firebase Unity SDK 5.4.3. I do have iOS support disabled on Unity ARCore Project Settings, however I'm having the same "551 duplicate symbols" as @Arnoho

@Arnoho
Copy link
Author

Arnoho commented Jan 24, 2019

@cruxdavid Sadly but no I have not found real solution. Only way to build project was remove Firebase Messaging. We don't have push notifications support but at least we can build project.

@Armando113
Copy link

Armando113 commented Jul 15, 2019

Hello there!
I currently use the latest ARCore (v1.10.0) and Firebase SDK (6.2.1) and I still get the 551 duplicate symbols error. I've made sure I disabled ARCore and iOS support of it, but no luck.
Has anyone been able to solve this issue without removing the FirebaseMessaging from Unity?
Thanks your time and help in advance!

@Arnoho
Copy link
Author

Arnoho commented Jul 17, 2019

@Armando113 I haven't tested for while but last time the only solution for this problem was to remove completely FirebaseMessaging package. I am still hoping to find solution to have both ARCore and Firebase Messaging installed. I will let you know if I can find solution.

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

No branches or pull requests

8 participants