-
-
Notifications
You must be signed in to change notification settings - Fork 280
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
Weird issues #4575
Comments
Both issues are because the country is not populated: how is it possible? |
@saiprasad-patil: You said me your app was set to Andorra. Was-it your choice in the onboarding? |
No I remember choosing India, but have no idea how it was set to Andora. There's a chance it might have set when I reinstalled the app and might have changed it accidentally. |
There may be cases when the country is set to There are several solution options:
@saiprasad-patil Are you able to reproduce the issue, like if you install/reinstall the app? // (from ProductQuery)
static Future<void> setCountry(
final UserPreferences userPreferences, {
String? isoCode,
}) async {
isoCode ??= userPreferences.userCountryCode ??
PlatformDispatcher.instance.locale.countryCode?.toLowerCase();
_country = CountryHelper.fromJson(isoCode);
// we need this to run "world" queries
OpenFoodAPIConfiguration.globalCountry = null;
isoCode = _country?.offTag;
if (isoCode != null && isoCode != userPreferences.userCountryCode) {
await userPreferences.setUserCountryCode(isoCode);
}
} |
Try these steps:
(Also while uninstalling make sure to clear data so you have to sign in again, I created a new account to test this) |
@saiprasad-patil I think I found part of the problem: you're not supposed to start with Andorra. You're supposed to start with your device's country, so it looks like it wasn't detected (unless you're from Andorra). That means that we're not 100% good with detecting device countries In addition to that we should be more aggressive with "wrong countries" (could not understand the country code for some reason). Additional thought: needs to be tested with
The data is cleared automatically. If it's not the case please create an issue. |
No it was with regards to the option some phones give to keep app data. |
As reported by @saiprasad-patil, he got two issues:
I'm trying to reproduce them, but I'm out of luck at the moment.
The text was updated successfully, but these errors were encountered: