Skip to content

[HOLD for payment 2023-06-01] Configure NetInfo to ping Auth for its internet reachability test #9211

Closed

Description

@roryabraham

Problem

We use NetInfo to track whether the app can access the internet. On web/desktop, that involves regularly polling a URL to see if we get a response. We currently poll the API root, which works as a test of internet reachability. It's better than using a random URL because it verifies not only that the internet is reachable, but also that our web servers are reachable.

However, it's possible that the web servers are reachable, but Auth is down. In this case, the app won't work as expected.

Why this is important

This is associated with the Boolean Offline Mode initiative, which seeks to establish a very robust standard for offline mode where if we're online everything works as expected, and if any system which the app relies on can't be communicated with as expected, then we go into offline mode and everything works to the extent possible in offline mode.

Solution

Configure NetInfo to use a network request that will actually communicate with Auth as an internet reachability test.

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~011d42c91cf9658297
  • Upwork Job ID: 1656885165625516032
  • Last Price Increase: 2023-05-12

Activity

  1. added
    Weekly
    Improvement
    on May 28, 2022
  2. self-assigned this
    on May 28, 2022
  3. roryabraham commented on May 28, 2022

    @roryabraham
    ContributorAuthor

    The design doc suggests using https://expensify.com/api?command=Get with a payload of:

    • returnValueList=nameValuePairs
    • name=private_lastModified
    • authToken=...

    The problem with that is that we to have an authToken in order for that to work, which means that it can't be used when the user is not logged in. We should find or create a public API endpoint that can be used to ping auth.

  4. roryabraham commented on May 30, 2022

    @roryabraham
    ContributorAuthor

    So, maybe we don't need an authToken because any authentication error would presumably come back with a 200 status code but a non-200 JSON code, which is fine. But the problem remains that we don't seem to be able to trigger a real command=Get request without using a POST request and passing the returnValueList, etc... in the request body, and NetInfo isn't configured to use a POST request with a body for it's internet reachability test.

  5. roryabraham commented on May 30, 2022

    @roryabraham
    ContributorAuthor

    But the problem remains that we don't seem to be able to trigger a real command=Get request without using a POST request and passing the returnValueList, etc... in the request body

    JK, was able to trigger an auth call with a GET request in Postman:

    image

  6. roryabraham commented on Jun 15, 2022

    @roryabraham
    ContributorAuthor

    No update here

  7. roryabraham commented on Jun 15, 2022

    @roryabraham
    ContributorAuthor

    Actually going to HOLD this on #9020

  8. roryabraham commented on Jun 23, 2022

    @roryabraham
    ContributorAuthor

    No update here, still on HOLD

  9. 63 remaining items

  10. removed
    Awaiting Payment
    on May 17, 2023
  11. added
    Reviewing
    on May 17, 2023
  12. added
    Weekly
    Awaiting Payment
    and removed
    Weekly
    on May 25, 2023
  13. changed the title [-]Configure NetInfo to ping Auth for its internet reachability test[/-] [+][HOLD for payment 2023-06-01] Configure NetInfo to ping Auth for its internet reachability test[/+] on May 25, 2023
  14. removed
    Reviewing
    on May 25, 2023
  15. melvin-bot commented on May 25, 2023

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  16. melvin-bot commented on May 25, 2023

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.17-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2023-06-01. 🎊

    After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

    • External issue reporter
    • Contributor that fixed the issue
    • Contributor+ that helped on the issue and/or PR

    As a reminder, here are the bonuses/penalties that should be applied for any External issue:

    • Merged PR within 3 business days of assignment - 50% bonus
    • Merged PR more than 9 business days after assignment - 50% penalty
  17. added
    Daily
    and removed
    Weekly
    on May 31, 2023
  18. roryabraham commented on Jun 2, 2023

    @roryabraham
    ContributorAuthor

    This is done, no payments due

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

Metadata

Metadata

Assignees

Labels

Awaiting PaymentDailyEngineeringImprovementInternal

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions