Skip to content
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

InApp message is shown every new session (timestamp of the impression record is always 0 seconds) #8907

Closed
alien190 opened this issue Nov 2, 2021 · 2 comments
Labels
api: inappmessaging Firebase In App Messaging

Comments

@alien190
Copy link
Contributor

alien190 commented Nov 2, 2021

  • Xcode version: 13.1
  • Firebase SDK version: 8.8.0 (Flutter plugin firebase_in_app_messaging: ^0.5.0+11)
  • Installation method: CocoaPods
  • Firebase Component: InAppMessaging

The problem description:

InAppMessages are shown every new session even though the scheduling is set to 'No more than one message every day'.

2021-11-02_11-57

The problem is reasoned by incorrect timestamp of the impression record. It's always 0 seconds.
Here is the line from log:

[Firebase/InAppMessaging][I-IAM270002] Insert the first impression record for message 3223183152453255168 with timestamp in seconds as 0.000000

I think the bug is located in this line

withStartTimestampInSeconds:self.lastDisplayTime];

This code:
[self.displayBookKeeper recordNewImpressionForMessage:messageID withStartTimestampInSeconds:self.lastDisplayTime];

probably should be fixed as:

[self.displayBookKeeper recordNewImpressionForMessage:messageID withStartTimestampInSeconds: [self.timeFetcher currentTimestampInSeconds ] ];

@google-oss-bot
Copy link

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.

@paulb777 paulb777 added api: inappmessaging Firebase In App Messaging and removed needs-triage labels Nov 2, 2021
alien190 added a commit to alien190/firebase-ios-sdk that referenced this issue Nov 3, 2021
…(timestamp of the impression record is always 0 seconds).
eldhosembabu pushed a commit that referenced this issue Dec 3, 2021
* Fix for issue #8907 InApp message is shown every new session (timestamp of the impression record is always 0 seconds).
@eldhosembabu
Copy link
Contributor

Closing this issue since PR is merged.

eldhosembabu added a commit that referenced this issue Dec 3, 2021
Updating changelog to reflect fix for #8907
eldhosembabu added a commit that referenced this issue Dec 6, 2021
* Updating changelog to reflect fix for #8907
@firebase firebase locked and limited conversation to collaborators Jan 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: inappmessaging Firebase In App Messaging
Projects
None yet
Development

No branches or pull requests

4 participants