firebase-android-sdk icon indicating copy to clipboard operation
firebase-android-sdk copied to clipboard

AppCompat Widget Error in Firebase In-App Messaging SDK

Open MoatzAtteya opened this issue 1 year ago • 7 comments

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:

  1. Integrate Firebase In-App Messaging into an Android project.
  2. Use a Theme.MaterialComponents or a non-AppCompat theme in the app.
  3. Configure and send an in-app message with an image via the Firebase Console.
  4. 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

MoatzAtteya avatar Oct 08 '24 08:10 MoatzAtteya

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

google-oss-bot avatar Oct 08 '24 08:10 google-oss-bot

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?

lehcar09 avatar Oct 08 '24 15:10 lehcar09

Hi @lehcar09 , thank your fer replying. No the image is not displayed.

MoatzAtteya avatar Oct 08 '24 15:10 MoatzAtteya

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.

lehcar09 avatar Oct 08 '24 18:10 lehcar09

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!

google-oss-bot avatar Oct 15 '24 01:10 google-oss-bot

I have tried your sample app an it works fine and the error message doesn't appear.

MoatzAtteya avatar Oct 15 '24 13:10 MoatzAtteya

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!

lehcar09 avatar Oct 15 '24 17:10 lehcar09