Skip to content

HIGH: [API Reliability] Android: GetMissingOnyxMessages is not called in the background #39544

Closed

Description

@arosiclair

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


Version Number: N/A
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): N/A
Logs: N/A
Expensify/Expensify Issue URL:
Issue reported by: @arosiclair
Slack conversation: N/A

Action Performed:

  1. Add yourself as a workspace member
  2. Kill the app
  3. Remove yourself from the workspace (this creates some missed onyx updates)
  4. Send yourself a DM
  5. Push notification received
  6. The app wakes up in the background
  7. A gap is detected and ONYX_UPDATES_FROM_SERVER gets set in Onyx to fill the gap

Expected Result:

The callback for ONYX_UPDATES_FROM_SERVER runs and calls the GetMissingOnyxMessages API in the background

Actual Result:

The callback does NOT run until the app is reopened

Workaround:

N/A

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~011415a3700cdef632
  • Upwork Job ID: 1775605339418427392
  • Last Price Increase: 2024-04-03

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Apr 3, 2024
  2. self-assigned this
    on Apr 3, 2024
  3. melvin-bot commented on Apr 3, 2024

    @melvin-bot

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

  4. added
    InternalRequires API changes or must be handled by Expensify staff
    on Apr 3, 2024
  5. melvin-bot commented on Apr 3, 2024

    @melvin-bot
  6. melvin-bot commented on Apr 3, 2024

    @melvin-bot

    Triggered auto assignment to Contributor Plus for review of internal employee PR - @getusha (Internal)

  7. changed the title [-]Android: `GetMissingOnyxMessages` is not called in the background[/-] [+]HIGH: [Reliability] Android: `GetMissingOnyxMessages` is not called in the background[/+] on Apr 3, 2024
  8. arosiclair commented on Apr 8, 2024

    @arosiclair
    ContributorAuthor

    As mentioned, the root problem is that Onyx.connect callbacks do not seem to run in our background process for Android (via headless js). Instead they run once the app is re-opened. That is blocking these two critical callbacks for filling update gaps in the background:

    I started discussing this here.

    One workaround is to optionally run the ONYX_UPDATES_FROM_SERVER code synchronously. However, that still leaves ONYX_UPDATES_LAST_UPDATE_ID_APPLIED_TO_CLIENT as an empty value. I'm not sure if there is a way to synchronously retrieve that value from Onyx atm.

  9. 8 remaining items

  10. arosiclair commented on Apr 15, 2024

    @arosiclair
    ContributorAuthor

    Out for review!

  11. quinthar commented on Apr 16, 2024

    @quinthar
    Contributor

    Woohoo!

  12. removed their assignment
    on Apr 16, 2024
  13. quinthar commented on Apr 27, 2024

    @quinthar
    Contributor

    Can we close this?

  14. changed the title [-]HIGH: [Reliability] Android: `GetMissingOnyxMessages` is not called in the background[/-] [+]HIGH: [API Reliability] Android: `GetMissingOnyxMessages` is not called in the background[/+] on Apr 27, 2024
  15. quinthar commented on Apr 27, 2024

    @quinthar
    Contributor

    Closing, reopen if you disagree.

  16. rushatgabhane commented on Apr 28, 2024

    @rushatgabhane
    Member

    @laurenreidexpensify could you please attach payment summary for C+ review - #40022 (comment)

  17. rushatgabhane commented on Apr 28, 2024

    @rushatgabhane
    Member
  18. JmillsExpensify commented on Apr 30, 2024

    @JmillsExpensify
    Contributor

    Re-opening for payment summary so I can pay this one out.

  19. laurenreidexpensify commented on May 1, 2024

    @laurenreidexpensify
    Contributor

    Payment Summary:

    C+ review @rushatgabhane $500 requested in newdot

  20. JmillsExpensify commented on May 1, 2024

    @JmillsExpensify
    Contributor

    $500 approved for @rushatgabhane

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.InternalRequires API changes or must be handled by Expensify staffReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions