Closed gbejarano01 closed 4 years ago
Are you able to work around this by changing one of the frameworks' bundle identifiers to something else?
By default, neither of those frameworks should have the bundle ID com.firebase.Firebase
. Something strange must be going on in the dependency installation process. @paulb777 do you know of anything in CocoaPods that could cause this?
just tried now @morganchen12 but I'm getting another issue, I think unrelated to this. I'll keep you updated. Thanks!
@morganchen12 I modified the bundle ID manually and I fixed the other issue I had (not related to Firebase) and now I'm getting this:
2020-04-06 17:43:59.601651-0400 project1819[49437:30859439] -[FIRInstallationsItem registeredInstallationWithJSONData:date:error:]: unrecognized selector sent to instance 0x600000e83ec0 2020-04-06 17:43:59.614022-0400 project1819[49437:30859439] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[FIRInstallationsItem registeredInstallationWithJSONData:date:error:]: unrecognized selector sent to instance 0x600000e83ec0' *** First throw call stack: ( 0 CoreFoundation 0x00007fff23e3dcce __exceptionPreprocess + 350 1 libobjc.A.dylib 0x00007fff50b3b9b2 objc_exception_throw + 48 2 CoreFoundation 0x00007fff23e5e9f4 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132 3 CoreFoundation 0x00007fff23e426cc ___forwarding___ + 1436 4 CoreFoundation 0x00007fff23e449b8 _CF_forwarding_prep_0 + 120 5 project1819 0x0000000103bdaf4c __84-[FIRInstallationsAPIService registeredInstallationWithInstallation:serverResponse:]_block_invoke + 240 6 FBLPromises 0x000000010629ac12 __38+[FBLPromise(DoAdditions) onQueue:do:]_block_invoke + 27 7 libdispatch.dylib 0x0000000107234f11 _dispatch_call_block_and_release + 12 8 libdispatch.dylib 0x0000000107235e8e _dispatch_client_callout + 8 9 libdispatch.dylib 0x0000000107243e67 _dispatch_main_queue_callback_4CF + 1357 10 CoreFoundation 0x00007fff23da1849 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9 11 CoreFoundation 0x00007fff23d9c399 __CFRunLoopRun + 2041 12 CoreFoundation 0x00007fff23d9b884 CFRunLoopRunSpecific + 404 13 GraphicsServices 0x00007fff38b5ac1a GSEventRunModal + 139 14 UIKitCore 0x00007fff48c19220 UIApplicationMain + 1605 15 project1819 0x00000001034ba49b main + 75 16 libdyld.dylib 0x00007fff519b910d start + 1 17 ??? 0x0000000000000002 0x0 + 2 )
Which is weird, it looks like some lib is not finding the right methods or so...
I'm following this other ticket cause it's addressing the same issue but I can't quite seem to find that helpful as I'm not using cocoapods: https://github.com/firebase/firebase-ios-sdk/issues/4711
That method is defined in a category, so you're likely missing the -ObjC
linker flag.
Thanks @morganchen12, is this what you mean? It's set correctly and still not working if so:
The Firebase Carthage frameworks should be linked at build time and not installed at load time.
Make sure this step in the Carthage README is followed:
Please note that you shouldn't add any of the Firebase frameworks to the Carthage build phase (copy-frameworks). The frameworks contain static libraries that are linked at build time.
Thanks @paulb777 I just tried the whole configuration again, and I'm still getting the unrecognized selector
issue
Also, remember I had to rename the bundle id so this can work.
Not sure what else to try.
The most likely cause for both problems is lingering references in the Xcode project. Make sure that there are no Firebase references left before starting the configuration.
Re: bundle IDs, I think #5302 should address it.
Thanks everyone for helping, I deleted everything and re-added all the libraries, now I'm getting another issue related to another info plist when trying to run it, all builds ok
Details
This app could not be installed at this time.
Domain: IXUserPresentableErrorDomain
Code: 1
Failure Reason: Could not install at this time.
Recovery Suggestion: Failed to load Info.plist from bundle at path /Users/user/Library/Developer/CoreSimulator/Devices/5D70DC5C-613F-40C2-A963-DE324243E051/data/Library/Caches/com.apple.mobile.installd.staging/temp.KiaLDG/extracted/Payload/project1819.app/Frameworks/FirebaseAnalytics.framework; Extra info about plist: ACL=
Failed to load Info.plist from bundle at path /Users/user/Library/Developer/CoreSimulator/Devices/5D70DC5C-613F-40C2-A963-DE324243E051/data/Library/Caches/com.apple.mobile.installd.staging/temp.KiaLDG/extracted/Payload/project1819.app/Frameworks/FirebaseAnalytics.framework; Extra info about plist: ACL=
macOS Version 10.15.3 (Build 19D76) Xcode 11.4 (16134)
It looks something changed and the Info.plist is not there now:
Old Version
New Version
It looks like there is still a problem with the Xcode configuration. FirebaseAnalytics.framework
should not be added into the bundle - /Users/user/Library/Developer/CoreSimulator/Devices/5D70DC5C-613F-40C2-A963-DE324243E051/data/Library/Caches/com.apple.mobile.installd.staging/temp.KiaLDG/extracted/Payload/project1819.app/Frameworks/FirebaseAnalytics.framework
@paulb777 removed now seeing this when tried running.
Yep, FirebaseAnalytics still needs to be linked statically. It just shouldn't be added to the bundle. In Carthage, that typically means making sure it is not included in the copy-frameworks
build phase.
Yes @paulb777 is not included in the copy-frameworks
.
Maybe something that I haven't explained, we went through the initial setup while ago, we were just running Carthage to get the latest framework version, so not sure what could be wrong if we haven't changed anything in the config nor started from scratch
The only other thing I can think of would be something about Xcode 11.4 is causing it. However, if that were the case, I would expect to see other similar reports.
OK, thanks @paulb777 I'm still getting ld: warning: Could not find or use auto-linked library 'stdc++'
I seem not to find anything about this
@gbejarano01 can you share your project?
sorry @morganchen12 I don't think I can, I can send you logs and other things if you want.
May need to explicitly add libc++ to the Link Binary With Libraries
Buiild Phase:
Note that you can also accidentally add Carthage artifacts to your bundle if they're in the "Copy Bundle Resources" build phase.
@paulb777
Still getting this
Thanks @morganchen12 there is no Carthage artifact on the Copy Bundle Resources
phase
Ah, the difference between libstdc++ and libc++.
Is there more context around the warning message describing where the reference comes from or what the undefined symbols are?
The warning may be ok with the real issue being the undefined symbols.
@paulb777 That's what I thought, but since I'm not familiar with those libraries, I was unsure.
Please note that now it seems to be referenced from Vision Framework, but before was from a different framework, we had Vision removed, but since you suggested to follow the config from scratch now I added all the Firebase frameworks.
Still we got the same error, before from Analytics: https://github.com/firebase/firebase-ios-sdk/issues/5299#issuecomment-610571991
@gbejarano01 That error would come from linking FirebaseMLVision.framework without also linking GoogleAPIClientForREST.xcframework. You can find where symbols are defined and undefined with the nm
utility like
$ nm FirebaseMLVision.framework/FirebaseMLVision | grep DetectedBreak_Type_LineBreak
U _kGTLRVision_DetectedBreak_Type_LineBreak
U _kGTLRVision_DetectedBreak_Type_LineBreak
$ nm GoogleAPIClientForREST.xcframework/ios-armv7_arm64/GoogleAPIClientForREST.framework/GoogleAPIClientForREST | grep DetectedBreak_Type_LineBreak
-------- S _kGTLRVision_DetectedBreak_Type_LineBreak
-------- S _kGTLRVision_GoogleCloudVisionV1p1beta1TextAnnotationDetectedBreak_Type_LineBreak
-------- S _kGTLRVision_GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak_Type_LineBreak
-------- S _kGTLRVision_GoogleCloudVisionV1p3beta1TextAnnotationDetectedBreak_Type_LineBreak
-------- S _kGTLRVision_GoogleCloudVisionV1p4beta1TextAnnotationDetectedBreak_Type_LineBreak
OK, @paulb777 I got it working.
I basically created an empty project and followed the configuration again, I had to do some additional things that are not described in the readme but I ended up having it working.
So then, I went into my project, removed all the references to any Firebase framework or dependencies and did exactly what I did with the empty project.
And that made it work.
Only one thing that might help others, after that configuration I got the following that basically was fixed by wiping DerivedData
:
`warning: Swift error in fallback scratch context: error:
^
@gbejarano01 Glad you got it working! Thanks for the feedback about the instructions. We'll consider how to improve them.
Environment
Carthage
The problem
Steps to reproduce:
After upgrading to the latest version of Firebase and after adding additional frameworks based on research as in the doc is not clear what to do the app compiles just fine, but when trying to run it I get this:
It seems like the GTMAppAuth.framework and abseil.framework frameworks are both sharing the same app id in the Info.plist
However I'm not sure if it's me doing something wrong or what.
Please see the 2 attachments below that shows the same id:
Thank you!