-
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
Duplicate messages can occur when two campaigns are triggered by different events in In-App Messaging #9070
Comments
I found a few problems with this issue:
|
Sorry for the late reply, @kouki-dan. I was able to reproduce the same behavior. Let me check with the team if it's intended or a bug. Thanks. |
@kouki-dan, our engineers have been notified and will look into this. This is internally tracked in b/211895119. Thanks. |
… by different events in In-App Messaging (#9070).
This issue should be fixed in PR : #9138 |
Closing this issue since fix is merged. You can expect to see the fix in next release of SDK. |
Thank you! |
[REQUIRED] Step 1: Describe your environment
Swift Package Manager
iOS
[REQUIRED] Step 2: Describe the problem
Duplicate messages can occur when two campaigns are triggered by different events. (The first message must have an image to reproduce it.)
Setup like this in the console.
And trigger events consecutively like this code.
It shows multiple dialogs in a row.
2021-12-09.23.03.34.mov
It seems FIRIAMDisplayExecutor checks message is displayed or not in this code.
firebase-ios-sdk/FirebaseInAppMessaging/Sources/Flows/FIRIAMDisplayExecutor.m
Lines 422 to 428 in c7f80c1
However,
isMsgBeingDisplayed
becomes true only after the image has finished loading.firebase-ios-sdk/FirebaseInAppMessaging/Sources/Flows/FIRIAMDisplayExecutor.m
Line 665 in c7f80c1
I think if another event is triggered while loading the image in a first event, two dialogs are shown in the order in which the images were loaded.
And
_currentMsgBeingDisplayed
is set as last calleddisplayForMessage
. The last event(In this video, second event) may be treated as displayed.firebase-ios-sdk/FirebaseInAppMessaging/Sources/Flows/FIRIAMDisplayExecutor.m
Lines 317 to 336 in c7f80c1
Therefore, on the second tap in this video, it shows the first event.
I think the first tap will give me a first event message, and the second tap will give me a second event message.
Steps to reproduce:
Minimum reproduce project is here: https://github.com/kouki-dan/InAppMessaging-Duplicate
The text was updated successfully, but these errors were encountered: