Closed KevinToala closed 1 year ago
@KevinToala, thank you for opening this issue. We're looking into this and reviewing the root cause of the duplicated calls and events. I'll update this issue as soon as we have additional information or progress!
@KevinToala,
We have reverted the change that introduced this issue and have done some verification on our side. Can you confirm that with the latest release your issue has been fixed?
Hi @stocaaro
I can confirm that with version 5.3.10 there are no duplicate events 👍
@KevinToala, thank you for the confirmation! We'll close this issue then for now, but if you see it happen again let us know. Thanks!
Before opening, please confirm:
JavaScript Framework
Angular
Amplify APIs
Analytics
Amplify Categories
analytics, notifications
Environment information
Describe the bug
In our project with Angular/Ionic/Capacitor we are presenting duplication in the metrics of our InApp message campaigns with aws pinpoint. Reviewing a little more, it seems that the InAppMessaging.onMessageReceived listener is being called twice and when sending the MESSAGE_DISPLAYED event, it is being sent several times to aws pinpoint.
Initially I thought it was some problem with the configurations of our project, for this reason I created a project from scratch with the minimum configurations and I see the same behavior, apparently this behavior is seen from versions equal to or greater than 5.3.6 of aws-amplify
Expected behavior
If I have a campaign created in AWS Pinpoint for an InApp message it should only receive it once in the InAppMessaging.notifyMessageInteraction listener, the MESSAGE_DISPLAYED event should only be sent once and the InApp campaign metrics should not be duplicated in aws Pinpoint.
If I change to version 5.3.5 this works very well and the calls to the listener and the events are not duplicated
Reproduction steps
Code Snippet
The project to reproduce the bug is here: https://github.com/KevinToala/aws-amplify-inapp-issue
You just have to run the commands:
Log output
aws-exports.js
No response
Manual configuration
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response