react-native-check-version icon indicating copy to clipboard operation
react-native-check-version copied to clipboard

Android error: [TypeError: Cannot convert null value to object]

Open frndsjoao opened this issue 1 year ago • 3 comments

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?

frndsjoao avatar Oct 10 '24 22:10 frndsjoao

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.

frndsjoao avatar Oct 10 '24 22:10 frndsjoao

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

githistory avatar Oct 16 '24 14:10 githistory

Feel free to open a PR to change this regex, happy to accept!

tschoffelen avatar Oct 21 '24 07:10 tschoffelen

Still getting this error witht version 1.4.0

Mihai-github avatar Sep 19 '25 10:09 Mihai-github