react-native-check-version
react-native-check-version copied to clipboard
Android error: [TypeError: Cannot convert null value to object]
Hi everyone.
I'm getting the following error when using Android:
{"bundleId": "br.org.forluz.app", "country": "us", "error": [TypeError: Cannot convert null value to object], "lastChecked": "2024-10-10T22:17:47.315Z", "needsUpdate": false, "notes": "", "platform": "android", "url": null, "version": null}
my code:
const options: CheckVersionOptions = {
currentVersion: '2.4.12',
platform: 'android'
}
const version = await checkVersion(options);
// IOS WORKED
console.log("Got version info:", version);
Link to the app on GP: https://play.google.com/store/apps/details?id=br.org.forluz.app&hl=en_US
I think it's an GP missing config, but I don't know what. This same code works on iOS.
Any help?
Also I realized that Version number in "About this app" is Varies with device. I think its something related to this, but I don't know how to fix it.
https://github.com/tschoffelen/react-native-check-version/blob/master/src/providers/android.js#L26C1-L27C1
to
const version = text.match(/\[\[\[['"]((\d+\.)+\d+)['"]\]\],/)?.[1];
@tschoffelen
Feel free to open a PR to change this regex, happy to accept!
Still getting this error witht version 1.4.0