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

firebase.configure crash in second target in workspace #4776

Closed
MohmmadSawalha-ios opened this issue Jan 30, 2020 · 11 comments
Closed

firebase.configure crash in second target in workspace #4776

MohmmadSawalha-ios opened this issue Jan 30, 2020 · 11 comments

Comments

@MohmmadSawalha-ios
Copy link

MohmmadSawalha-ios commented Jan 30, 2020

[REQUIRED] Step 1: Describe your environment

  • Xcode version: _____ 11.0
  • Firebase SDK version: _____Latest
  • Firebase Component: _____Messaging, instanceID, analytics
  • Component version: _____Latest
  • Installation method: CocoaPods | Carthage | Zip file (CocoaPod)
    pod 'FirebaseInstanceID' pod 'Firebase/Analytics' pod 'Firebase/Messaging'

[REQUIRED] Step 2: Describe the problem

Steps to reproduce:

I have two targets in the workspace, one of my targets that i implemented firebase in first works fine, the crashes giving this log

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[FIRInstanceIDCheckinPreferences preferencesFromKeychainContents:]: unrecognized selector sent to class 0x10f525108'

Inside this function : (FIRInstanceIDCheckinPreferences *)cachedCheckinPreferences
This file: FIRInstanceIDCheckinStore.m

@google-oss-bot

This comment has been minimized.

@rizafran
Copy link
Contributor

Thanks for reporting this issue, @MohmmadSawalha-ios. Have you tried to update your Cocoapods? You may also check out this post which might help you to fix the issue.

@MohmmadSawalha-ios
Copy link
Author

MohmmadSawalha-ios commented Jan 30, 2020

Hey @rizafran thanks for replying, yes i did actually follow every step with no result, i even changed the project on firebase console made separated one same issue .

@MohmmadSawalha-ios
Copy link
Author

I also deleted the app multiple times, clean build, changed devices that i test on .. same issue.

@maksymmalyhin
Copy link
Contributor

maksymmalyhin commented Jan 30, 2020

@MohmmadSawalha-ios The issue looks very similar to #4711 because you also experience a crash with unrecognized selector exception for a method defined in an Objective C category in Firebase SDK.

I would start from verifying -ObjC flag presence in "Other Linker Settings" of the failing target. If that doesn't help, could you please try to follow the troubleshooting steps from #4711 and let us know the result.

@MohmmadSawalha-ios
Copy link
Author

It is i've seen that thread -ObjC flag is there since before, i will troubleshoot this again and give you the results .

@MohmmadSawalha-ios
Copy link
Author

@maksymmalyhin
Same issue i have degenerated pod file with the steps, tried to separate the target pods, updated cocoapods, compared build settings, clean project, deleted derived, legacy build nothing worked.

@rizafran
Copy link
Contributor

Thanks for sharing your findings, @MohmmadSawalha-ios. Is it possible for you to share a simplified project that I can run locally? This way, it would be great for us to debug the issue.

If not possible, you could reproduce it with one of our quickstart samples here and share it to us to identify if it's project specific or not.

@google-oss-bot
Copy link

Hey @MohmmadSawalha-ios. We need more information to resolve this issue but there hasn't been an update in 7 days. I'm marking the issue as stale and if there are no new updates in the next 3 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

@google-oss-bot
Copy link

Since there haven't been any recent updates here, I am going to close this issue.

@MohmmadSawalha-ios if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

@mvpscottjon
Copy link

mvpscottjon commented Feb 25, 2020

I have same problem ,too

My first target is fine ,

But the second target will crash , when load googlePlist
Code:
let filePath = Bundle.main.path(forResource: "GoogleServiceDev-Info", ofType: "plist") guard let fileopts = FirebaseOptions(contentsOfFile: filePath!) else { assert(false, "Couldn't load config file") } FirebaseApp.configure(options: fileopts)

I was use firebase version 6.14.0, second target was fine, but after I update to 6.17.0,
app will crash after launch.

btw, I use auth、 storage 、 analytics、 dynamicLink、 message, etc

after I install 6.14.0, I fount pod remove this two library:
Removing FirebaseInstallations
Removing PromisesObjC

I',m not sure this problem is.

@firebase firebase locked and limited conversation to collaborators Mar 14, 2020
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

6 participants