You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2023-06-01] Configure NetInfo to ping Auth for its internet reachability test #9211
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.
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.
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.
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:
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
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
Activity
roryabraham commentedon May 28, 2022
The design doc suggests using https://expensify.com/api?command=Get with a payload of:
returnValueList=nameValuePairsname=private_lastModifiedauthToken=...The problem with that is that we to have an
authTokenin 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.roryabraham commentedon May 30, 2022
So, maybe we don't need an
authTokenbecause 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 realcommand=Getrequest without using a POST request and passing thereturnValueList, etc... in the request body, and NetInfo isn't configured to use a POST request with a body for it's internet reachability test.roryabraham commentedon May 30, 2022
JK, was able to trigger an auth call with a GET request in Postman:
roryabraham commentedon Jun 15, 2022
No update here
roryabraham commentedon Jun 15, 2022
Actually going to HOLD this on #9020
roryabraham commentedon Jun 23, 2022
No update here, still on HOLD
63 remaining items
[-]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[/+]melvin-bot commentedon May 25, 2023
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon May 25, 2023
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.
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
roryabraham commentedon Jun 2, 2023
This is done, no payments due