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

[In App Messaging] FirebaseInAppMessagingDisplay doesn't notify image download failure

Open Ethan1983 opened this issue 2 years ago • 2 comments

Environment

  • Android Studio version: Android Studio Flamingo | 2022.2.1 Patch 1
  • Firebase Component: In App Messaging - Display & In App Messaging
  • Component version: 20.3.2

Problem

InAppMessagingErrorReason#IMAGE_FETCH_ERROR isn't notified when FirebaseInAppMessagingDisplay fails to download the image.

Steps to reproduce:

  • Image download could fail for various reasons like network policy etc.
  • In such cases, the default display component FirebaseInAppMessagingDisplay silently ignores these failures and in app message is ignored.
  • Application registered listener via addDisplayErrorListener isn't notified of InAppMessagingErrorReason#IMAGE_FETCH_ERROR

Relevant Code:

         @Override
          public void onError(Exception e) {
            Logging.loge("Image download failure ");
            if (layoutListener != null) {
              bindingWrapper
                  .getImageView()
                  .getViewTreeObserver()
                  .removeGlobalOnLayoutListener(layoutListener);
            }
            cancelTimers(); // Not strictly necessary.
            inAppMessage = null;
            callbacks = null;
          }

Ethan1983 avatar May 16 '23 00:05 Ethan1983

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

google-oss-bot avatar May 16 '23 00:05 google-oss-bot

My app wasn't notified by FirebaseInAppMessaging after registering the listener via addDisplayErrorListener when there was an error in displaying in-app messaging. Is there any update about this issue?

ione0213 avatar Jan 08 '24 03:01 ione0213

Hi @Ethan1983, apologies for the late response on the issue. Our engineers have address the issue and released the version In-App Messaging version 20.4.1 included in BOM version 33.0.0 for the fix.

With that, I'll be closing this issue now. Let me know if there's any misunderstanding and/or we need to reopen the issue for further investigation. Thanks!

lehcar09 avatar May 10 '24 11:05 lehcar09