AppCompat Widget Error in Firebase In-App Messaging SDK
I'm encountering an error when attempting to display in-app messages with images using the Firebase In-App Messaging SDK. The error message is:
View class com.google.firebase.inappmessaging.display.internal.ResizableImageView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
The app currently uses a Material Design theme (Theme.MaterialComponents), and this error occurs when Firebase In-App Messaging attempts to display an image-based message, I have also tried to set the theme to AppCompat and nothing different.
Steps to reproduce the behavior:
- Integrate Firebase In-App Messaging into an Android project.
- Use a Theme.MaterialComponents or a non-AppCompat theme in the app.
- Configure and send an in-app message with an image via the Firebase Console.
- Observe the error in logcat.
Environment:
- Firebase BOM version: 33.4.0
- Android Studio version: [Android Studio Koala | 2024.1.1 Patch 2]
- Android device/emulator: Poco F3 android 13
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Hi @MoatzAtteya, thank you for reaching out and reporting the issue. I was able to reproduce the issue. However, even with this error the In-App message - Image is still displayed. Can you confirm if the image displays in your case as well?
Hi @lehcar09 , thank your fer replying. No the image is not displayed.
I tried using similar API version in an Android emulator and the in-app message is displayed. Can you try running our quickstart app to see if the image will display? Aside from that, could you also try using another device/ version? This will help us remove possible implementation and device issue on in-app image display.
Hey @MoatzAtteya. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 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!
I have tried your sample app an it works fine and the error message doesn't appear.
Thank you for checking @MoatzAtteya. I'll raise this to our engineers and see what we can do here. However, because the issue doesn't affect/ block any functionality, I can't provide any timeline for this but we'll definitely keep this under our radar. Thanks!