-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
-[FIRInstanceIDTokenInfo isFreshWithIID:]: unrecognized selector sent to instance #5152
Comments
This comment has been minimized.
This comment has been minimized.
@AndreasLS The issue looks very similar to #4776 and #4711. Most likely you have two copy of Firebase in you project - one in a module defined in a dynamic framework (one of your app dependencies) and another one in you app target. Also, probably the versions of Firebase are different which triggers the crash. Could you please follow troubleshooting steps from the issue above to identify what exactly issue you have and let us know? |
@maksymmalyhin I checked my dynamic frameworks, there is not any embbeded frameworks. I just got one Target in my project. I tried to deintegrate pod and install it again. It still not working. The versions described in Podfile.lock related to Firebase are those:
|
I managed to solve the problem with the follow code:
|
@AndreasLS Thank you for additional details. The posted workaround indicates that there are two different versions of |
@maksymmalyhin You were right! I double checked the debug log and there they are: the logs saying that I have two different definitions of the same class. I found out that one of our dynamic libs had a reference to Firebase libs and based in your answer there #4315 (comment) about Firebase libs being a static library, I removed any reference from our dynamic lib and it worked, no more crashs! |
[REQUIRED] Step 1: Describe your environment
[REQUIRED] Step 2: Describe the problem
Steps to reproduce:
After updating from 6.11 to 6.20, it started to crash and reported the error:
-[FIRInstanceIDTokenInfo isFreshWithIID:]: unrecognized selector sent to instance
I did some search and find out that in version 6.12, the method isFreshWithIID: came as replacement to the previous isFresh.
I put some breakpoint at the crash point and printed the object to check if it responds to the new selector and old selector, then I found this:
(lldb) po [tokenInfo respondsToSelector:@selector(isFresh)]
YES
(lldb) po [tokenInfo respondsToSelector:@selector(isFreshWithIID)]
NO
It seems that the object archived in keychain is an old version of the object, that doesn't have the new method. Since its use the NSKeyedUnarchiver to unarchive the object, it remains the object that was saved before, crashing when trying to access the new method.
Relevant Code:
The text was updated successfully, but these errors were encountered: