-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[HOLD for payment 2023-06-30] [HOLD for payment 2023-02-17] Test Preferences section
disappear when the android app is reloaded in offline mode
#14047
Comments
I can work on this |
I'll take a look at this today! |
Got caught up with the deploy and the mobile fire. I'll get to this tomorrow! |
Bug0 Triage ChecklistNote: see this SO for more information.
|
Job added to Upwork: https://www.upwork.com/jobs/~01cb1e08ff6673c342 |
Marking this as |
Triggered auto assignment to Contributor Plus for review of internal employee PR - @0xmiroslav ( |
I've been prioritizing other issues, so I'll make this external! |
Current assignee @greg-schroeder is eligible for the External assigner, not assigning anyone new. |
Current assignee @0xmiroslav is eligible for the External assigner, not assigning anyone new. |
Current assignee @luacmartins is eligible for the External assigner, not assigning anyone new. |
Root Case
When we are offline fetch request failed and its resolve promise with false value. In this case we are setting env as production.
Due to current env set as production in PreferencesPage TestMenus will be not display. Proposal diff --git a/src/ONYXKEYS.js b/src/ONYXKEYS.js
index f38f281b89..2c6d0ee650 100755
--- a/src/ONYXKEYS.js
+++ b/src/ONYXKEYS.js
@@ -179,4 +179,7 @@ export default {
// Whether we should show the compose input or not
SHOULD_SHOW_COMPOSE_INPUT: 'shouldShowComposeInput',
+
+ // Is release in beta version
+ IS_BETA: 'isBeta',
};
diff --git a/src/libs/Environment/betaChecker/index.android.js b/src/libs/Environment/betaChecker/index.android.js
index 3b38f37bcb..bfcce9dbda 100644
--- a/src/libs/Environment/betaChecker/index.android.js
+++ b/src/libs/Environment/betaChecker/index.android.js
@@ -1,6 +1,14 @@
import semver from 'semver';
+import Onyx from 'react-native-onyx';
import CONST from '../../../CONST';
import pkg from '../../../../package.json';
+import ONYXKEYS from '../../../ONYXKEYS';
+
+let lastBetaValue = false;
+Onyx.connect({
+ key: ONYXKEYS.IS_BETA,
+ callback: value => lastBetaValue = value,
+});
/**
* Check the GitHub releases to see if the current build is a beta build or production build
@@ -15,14 +23,16 @@ function isBetaBuild() {
const productionVersion = json.tag_name;
if (!productionVersion) {
resolve(false);
+ Onyx.set(ONYXKEYS.IS_BETA, false);
}
// If the current version we are running is greater than the production version, we are on a beta version of Android
const isBeta = semver.gt(pkg.version, productionVersion);
+ Onyx.set(ONYXKEYS.IS_BETA, isBeta);
resolve(isBeta);
})
.catch(() => {
- resolve(false);
+ resolve(lastBetaValue);
});
});
}
Currently calling Onyx.set directly we can create new action file or can move it on another actions file. |
@jatinsonijs any idea why this is not reproducible in iOS? Both android and iOS seem to share the same logic |
@luacmartins isBetaBuild implementation is different for android and iOS. In iOS we have testflight which provider us a way to check environment locally that's the reason its working fine in iOS, we are not depend on network here. iOS
|
Thanks for the extra context @jatinsonijs! @0xmiroslav do you have any concerns about this proposed solution? |
PR is ready for review cc @0xmiroslav |
PR merged! |
Test Preferences section
disappear when the android app is reloaded in offline modeTest Preferences section
disappear when the android app is reloaded in offline mode
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.68-0 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-02-17. 🎊 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:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Sent offers to issue reporter, contributor, and C+ - please accept and I'll take care of payment after the hold period. |
Accepted the offer, thanks |
Not sure should add regression test or not because this issue cannot happen on production it is related to staging only Regression Test
|
Payments made, job closed |
Test Preferences section
disappear when the android app is reloaded in offline modeTest Preferences section
disappear when the android app is reloaded in offline mode
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.31-3 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-30. 🎊 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:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Actions Performed:
Expected Result:
Test Preferences are displayed
Actual Result:
Test Preferences are not displayed until the app is reloaded
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: v1.2.49-0
Reproducible in staging?: y
Reproducible in production?: y
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:
23-01-05-11-57-49.mp4
az_recorder_20230105_194050.2.mp4
Expensify/Expensify Issue URL:
Issue reported by: @adeel0202
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1672903057105979
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: