SFDX-Data-Move-Utility
SFDX-Data-Move-Utility copied to clipboard
NeedUpdate method for android not working
The below function not working, getting an empty response while I am checking on Android but it works for iOS.
VersionCheck.needUpdate()
.then(async res => {
console.log(res.isNeeded); // true
if (res.isNeeded) {}
});
I am using the latest version of this library.
react-native: 0.63.2 react-native-version-check: 3.4.2
Can anyone have any fix for this issue?
try add country code inside needUpdate
will work
VersionCheck.needUpdate({ country: 'eg' })
@Moustafa-mahmaed I tried to add country code, but it won't work and I am getting res
undefined it seems like res
isn't parsable.
@nikesh8 Did you find a solution?
VersionCheck.needUpdate({ country: 'eg' }) .then(async res => { console.log(res.isNeeded); if (res.isNeeded) { }else{ } });
same problem facing
Possible Unhandled Promise Rejection (id: 76): TypeError: undefined is not an object (evaluating 'res.isNeeded')
@nikesh8 Did you find a solution?
Not yet
VersionCheck.needUpdate({ country: 'eg' }) .then(async res => { console.log(res.isNeeded); if (res.isNeeded) { }else{ } });
same problem facing
Possible Unhandled Promise Rejection (id: 76): TypeError: undefined is not an object (evaluating 'res.isNeeded')
Please add your response which you are getting in res
it is just crashing whenever you call needUpdate or whatever. I saw Network Request Failure error several times it is seems like whenever request is rejected the app crashes even if it is wrapped in try/catch
Hi, i have the same problem, when i call VersionCheck.getLatestVersion()
the app crash. I also saw in console [TypeError: Network request failed]
.
After some research i found the error thrown:
NoSuchMethodError: No virtual method toString(Z)Ljava/lang/String; in class Lokhttp3/Cookie; or its super classes
We are also facing the same issue, getting an undefined response while I am checking on Android but it works for iOS.
VersionCheck.needUpdate() .then(async res => { console.log(res.isNeeded); // true if (res.isNeeded) {} });
Hi, I am also facing same issue react-native-version-check ^3.4.1 Tried this VersionCheck.needUpdate({ country: 'eg' }) but still not working. Thanks.
@nikesh8 @sureshhallyali
Found any solution?
- react-native link
- Close metro server
- uninstall app
- clean project
- reinstall app works for me
facing the same issue
Same issue here, is there any chance to get this working on android?
@nikesh8 @sureshhallyali
Found any solution?
Not Yet. Still looking for a solution.
same problem, how fix it??