Skip to content

[HOLD #227234] Receiving Notifications from chats sent months ago #13140

Closed

Description

@kavimuru

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Go to a chat with Gabi
  2. Start chatting

Expected Result:

Notifications received would be from our chats happening now

Actual Result:

Received notifications from chats received months ago. When I look at those chats they also show “Invalid Date”

Workaround:

unknown

Platform:

Where is this issue occurring?

  • Desktop App

Version Number: 1.2.30-0
Reproducible in staging?: Needs reproduction
Reproducible in production?: Needs reproduction
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:
Screenshot 2022-11-29 at 5 21 54 PM
Screenshot 2022-11-28 at 4 41 38 PM

Expensify/Expensify Issue URL:
Issue reported by: @garrettmknight
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1669654070339909

View all open jobs on GitHub

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Nov 29, 2022
  2. melvin-bot commented on Nov 29, 2022

    @melvin-bot

    Triggered auto assignment to @dylanexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  3. garrettmknight commented on Nov 30, 2022

    @garrettmknight
    Contributor

    Updated to v1.2.33-7, 'invalid date' persists:
    Screenshot 2022-11-30 at 10 01 29 AM

  4. dylanexpensify commented on Nov 30, 2022

    @dylanexpensify
    Contributor

    working on reproducing now

  5. dylanexpensify commented on Nov 30, 2022

    @dylanexpensify
    Contributor

    @garrettmknight is this only with your chat with Gabi?

  6. garrettmknight commented on Nov 30, 2022

    @garrettmknight
    Contributor

    There's another chat with her that has the 'Invalid Date' text on the same day, but no others.

  7. garrettmknight commented on Nov 30, 2022

    @garrettmknight
    Contributor

    Happened to @RobertLadue as well:
    Screenshot 2022-11-30 at 8 51 33 PM

  8. marcaaron commented on Dec 1, 2022

    @marcaaron
    Contributor

    possible theory - something in the API layer changed and is sending an invalid action.created

    We render the date here ->

    const ReportActionItemDate = props => (
    <Text style={[styles.chatItemMessageHeaderTimestamp]}>
    {props.datetimeToCalendarTime(props.created)}
    </Text>
    );

    So like the UI says it is probably invalid...

    Seeing the browser notifications makes sense too since we use the created field to determine whether to show a notification. The created being invalid means the front end interprets it as "new"

    App/src/libs/actions/Report.js

    Lines 1330 to 1331 in 820e876

    // If we are past the deadline to notify for this comment don't do it
    if (moment.utc(moment(action.created).unix() * 1000).isBefore(moment.utc().subtract(10, 'seconds'))) {

    IMO this is in part of a consequence of this issue (needs a better general design) and in part due to some API change that we haven't connected to this bug yet (which seems more urgent to solve).

  9. dylanexpensify commented on Dec 2, 2022

    @dylanexpensify
    Contributor

    Ah very interesting @marcaaron. Should we put this on hold then while we work on the linked issue? Or can we work on this externally in the meantime?

  10. marcaaron commented on Dec 2, 2022

    @marcaaron
    Contributor

    I don't think it should be on HOLD, no. It seems like an API change has triggered this and we should make this Internal so someone on the team can prioritize it.

  11. added
    InternalRequires API changes or must be handled by Expensify staff
    on Dec 2, 2022
  12. 13 remaining items

  13. dylanexpensify commented on Dec 19, 2022

    @dylanexpensify
    Contributor

    @arosiclair any updates by chance?

  14. arosiclair commented on Dec 19, 2022

    @arosiclair
    Contributor

    Only path forward I see is getting affected reportIDs and running a CQ to see what these invalid created values look like. That should give us a hint as to what the issue is.

    @garrettmknight @RobertLadue @joekaufmanexpensify could you share the report IDs for the chats you guys experienced this Invalid Date issue? You can open the chat in web and grab the ID from the URL here

    Screen Shot 2022-12-19 at 3 05 52 PM

  15. luacmartins commented on Dec 19, 2022

    @luacmartins
    Contributor

    Sorry I completely missed the ping here. It seems like the PRs Andrew linked are probably the cause. I agree that we could run a CQ to get the created dates for those reports to see how we are storing the date and then fix it.

  16. joekaufmanexpensify commented on Dec 19, 2022

    @joekaufmanexpensify
    Contributor

    I know I did experience this issue at some point in the past, but I don't remember which report, and didn't record it. Sorry! For me, signing out and back in resolved the issue at the time.

  17. melvin-bot commented on Dec 23, 2022

    @melvin-bot

    @arosiclair, @dylanexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  18. arosiclair commented on Dec 26, 2022

    @arosiclair
    Contributor

    No real updates atm. Signing out and back in resolving the issue suggests that Onyx might have had an invalid created value cached and the API was only able to replace it with a valid one after signing out and clearing Onyx.

    Bumping @garrettmknight @RobertLadue for those report IDs

  19. changed the title [-]Receiving Notifications from chats sent months ago[/-] [+][HOLD #227234] Receiving Notifications from chats sent months ago[/+] on Dec 27, 2022
  20. JmillsExpensify commented on Dec 27, 2022

    @JmillsExpensify
    Contributor

    A couple of things:

    • Given the relation to sequence numbers PRs, I'm going to proactively add a HOLD on that project and simultaneously take this issue over (I'm the BZ person assigned and responsible for SQN bugs).

    • Let's still have @garrettmknight and @RobertLadue share their reportIDs when they are both back from vacay.

    • Even then, given that signing in and out resolves the issue, that indicates that this is temporary, so I could equally see the argument that we should close this for focus. Leaving that up to @arosiclair.

  21. arosiclair commented on Dec 27, 2022

    @arosiclair
    Contributor

    Yeah let's just close this out for now as this may never come up again after sequence numbers is finished. If it does, we can just reopen and take another look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2InternalRequires API changes or must be handled by Expensify staffNeeds ReproductionReproducible steps needed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions