Closed JongGyuChoi closed 4 years ago
It's not a bug. This library parse html of play store webpage and extract app version from that. If the page doesn't contain app version, it will throw that error.
works fine. close this.
I'm having the same warning, Maybe the structure of the playstore page have changed ?
Aren't the versions permanently removed from google play pages? Seems like there should be a different/fallback solution for this.
I'm having the same issue, any solution ?
As long as play store doesn't provide app version, you need to use custom provider using your own api providing latest app version.
It seems may app pages in play store doesn't provide app version :( Is there any api that provides play store app version?
On my side, I don't have any app version because I'm using 2 app bundles/apk with different version.
Check Your play store app name and your react native app name
because react-native-version-check
search your app name in play store and app store
Hi, I had this issue too, check your react-native-version-check
version, I had 3.2.1 and the latest is 3.4.1 when I update fix to me.
Otherwise, if this don't resolve the issue, you can pass a custom provider for android:
export const getAndroidLatestVersion = () => fetch(
`https://play.google.com/store/apps/details?id=${
VersionCheck.getPackageName()
}&hl=en`,
)
.then(res => res.text())
.then((text) => {
const match = text.match(/Current Version.+>([\d.]{4,10})<\/span>/);
if (match) {
const latestVersion = match[1].trim();
return Promise.resolve(latestVersion);
}
return Promise.reject();
});
I am also facing this issue . version is 3.4.1
With the latest version of react-native
and react-native-version-check
with auto linking (For ios pods required). It works perfectly fine for android as well as ios.
It works on Android? You mention iOS for some reason.
@ssuchanowski comment updated
It works on Android? You mention iOS for some reason.
With the latest version of
react-native
andreact-native-version-check
with auto linking (For ios pods required). It works perfectly fine for android as well as ios.
Check Your play store app name and your react native app name
because
react-native-version-check
search your app name in play store and app store
For me this was the issue. If you open your android/app/build.gradle you can check whether the applicationId is the same as the applicationId in the Google Play Console. If the names don't match update your applicationId in build.gradle.
3.4.2 facing this issue
3.4.2 facing this issue too :(
same here on v3.4.2, is it because google change the format of html? use to have something like current version key word? but now I can't find it. The version code is now wrapped inside array.
@StevenChen0824 @Tony0205 @eamanola @Anujmoglix @mateusschenato @JongGyuChoi , I fixed this issue, by passing the package Name,
await VersionCheck.needUpdate({ packageName: 'YOUR_ANDROID_PACKAGE_NAME(com.xxx.xxxx)', });
Like this,
Hope this will fix this issue.
Check that your app hasn't been removed by Google during the review
Same problem, I think that the scraper HTML can no longer fetch the version because PlayStore doesn't show it (check in the source code of a published app).
Yoy can do as a temporary solution is to manually add the version (example '1.0' ... '2.0', ... etc.) in the "Version Notes - Google Play Console", this will make the HTML provided by PlayStore carry the explicit version.
As I say it is a temporary solution.
@EHRdev hi, may I know do you found any solution to fix this? I face the same issue
Any solution to fix this issue?
May I know, by when can we expect a solution for this problem?
There is a PR raised with the fix, https://github.com/kimxogus/react-native-version-check/pull/166/files. Can you guys please approve and release this on priority?
There is a PR raised with the fix, https://github.com/kimxogus/react-native-version-check/pull/166/files. Can you guys please approve and release this on priority?
This PR works fine, thank you greatly @sumit-anar
@kimxogus could you merge this PR, please?
This PR works fine for me as well. @JongGyuChoi, Could you please approve and merge this PR asap?
There is a PR raised with the fix, https://github.com/kimxogus/react-native-version-check/pull/166/files. Can you guys please approve and release this on priority?
This PR works fine for me as well. @JongGyuChoi, Could you please approve and merge this PR asap?
There is a PR raised with the fix, https://github.com/kimxogus/react-native-version-check/pull/166/files. Can you guys please approve and release this on priority?
Yes I need this aswell
@stefanleoussis Could you please approve and merge this PR? To close this issue..
@stefanleoussis Could you please approve and merge this PR? To close this issue.
I don't believe I have the ability to unfortunately, I can only approve it @viniciussgp
Any updates on this?
This PR fixes the issue: https://github.com/kimxogus/react-native-version-check/pull/166/files
Until this is merged you can use the following solution for Android:
const res = await fetch(
`https://play.google.com/store/apps/details?id=${VersionCheck.getPackageName()}&hl=en`
);
const text = await res.text();
const match = text.match(/\[\[\["([\d.]+?)"\]\]/);
if (match) {
const latestVersion = match[1].trim();
return latestVersion;
} else return null;
This successfully extracts the version number from your app page. You can now compare the latest version number with the current one and implement your custom logic.
The master branch code is updated but new tag 3.4.3 is not released.
Temporary workaround
yarn add 'https://gitpkg.now.sh/kimxogus/react-native-version-check/packages/react-native-version-check?master'
or
npm install 'https://gitpkg.now.sh/kimxogus/react-native-version-check/packages/react-native-version-check?master'
patch available version 3.4.3 https://www.npmjs.com/package/react-native-version-check?activeTab=versions
message: 'Parse Error. Your app\'s play store page doesn\'t seem to have latest app version info.',
is this bug??