-
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
Exception and crash due to forwarding class AndroidConfigFetchProto which is neither defined, nor implemented #4334
Comments
This comment has been minimized.
This comment has been minimized.
@dmandar looks like we have a few references to AndroidConfigFetchProto. The stack trace doesn't show any symbols from the quickstart sample.
|
@dmandar can you investigate why the class is being loaded into the runtime despite it not having a definition? @elena-krakhmalova in the meantime you can work around this bug by skipping the generated Protobuf classes when enumerating classes in the runtime. |
@morganchen12 thanks for looking into the issue! |
I am experiencing this crash as well, when I enumerate all classes using the objc/runtime. I have tried the suggested workaround of skipping enumeration of the offending class, but that doesn't seem to work unless I'm missing something about how to skip them. Here is what I'm trying:
Unfortunately, it now crashes on this line:
for the missing class. What is the suggested way to work around this issue without being able to check the name of the offending class? |
@BennettSmith I haven't tested this solution, but you should be able to test for the missing class with if (class != nil) {
NSString *name = NSStringFromClass(class);
// ...
} Adding an empty stub implementation should work as well. |
Yeah, as I mention, when you try NSStringFromClass it causes the runtime crash too. So, it seems the Objective-C runtime is asserting that since the class doesn't exist, it won't even return the name of it. :-( I'll give the stub approach a try. What is the likelihood of this being resolve within the library? Is there a suggested earlier version of the pod that could be used to work around the issue? |
This will definitely be resolved in the library; missing implementations at runtime is a bug. I'm not sure if earlier versions of RemoteConfig will fix this issue since that class has existed for a long time. |
Thanks for the additional info. Using the stub approach I am able to enumerate classes again. Oddly, until the most recent |
|
Hi @BennettSmith it's interesting that with Xcode v11.2 (11B52) your code is not crashing at @morganchen12 thanks for your response! |
I misspoke - meant Firebase Performance, not Analytics. |
@elena-krakhmalova Android is not relevant in iOS, iirc when the service was originally written we put Android in some of the proto names and then re-used them on iOS. |
Thanks @morganchen12 for your answer. |
Investigating. |
Hi @morganchen12 , @dmandar! any updates about this issue? |
Having the exact same issue |
@paulb777 Could you please tell me in which version of FirebaseRemoteConfig is this issue fixed? Is it already released or when is it planned to be released? |
@elena-krakhmalova YW! It was released in Firebase 6.26.0. (You can see from the milestone field on this issue.) |
@paulb777 if I'm using |
@elena-krakhmalova Correct. 4.5.0 has the fix. That should also show up if you do a |
@paulb777 I see, thanks a lot! |
[READ] Step 1: Are you in the right place?
Yes, seems to me in the right place.
[REQUIRED] Step 2: Describe your environment
Environment
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:
Please note in this example app crashes for simulator, but the same will happen for device as well. The real problem is that AndroidConfigFetchProto class is neither defined, nor implemented but referenced in Config.pbobjc.h and Config.pbobjc.m in FirebaseRemoteConfig pod.
Relevant Code:
xcode_log_crash.txt
AppDelegate.txt
The text was updated successfully, but these errors were encountered: