Open mubashiralisiddiqui opened 1 year ago
~~Hi,
I got the same on my project
"error": [TypeError: null is not an object (evaluating 'text.match(/\[\[\[['"]((\d+\.)+\d+)['"]\]\],/)[1]')]
~~
I actually found the issue for my case.
My version number was 2.2.3 (XXX)
displayed on the Google Play Store page. Without the (XXX)
the regex works just fine.
I change the regex to match my case and also work like before by adding this (\s\(\d+\))?
so the regex now looks like this \[\[\[['"]((\d+\.)+\d+)(\s\(\d+\))?['"]\]\]
.
@tschoffelen are you interested in having the changes in your package? If so I can make a PR for the changes. Let me know 🙂
Hi @adrienGzc! Good find!
Definitely happy to accept PRs. One thing to keep in mind though is that I don't think that's a valid semver, so might also need to see if that causes problems with the version comparison logic.
Let me check how this behaves, I'll let you know 🙂
If you're willing to open a PR with this change that would be amazing!
"react-native-check-version": "^1.1.1", "react-native": "0.66.5", { platform: 'android', bundleId: 'com.tntmobile', version: null, needsUpdate: false, notes: '', url: null, lastChecked: '2023-05-28T12:37:39.902Z', country: 'fr', error: [TypeError: Cannot convert null value to object] }
in node modules here is the issue const text = await res.text(); const version = text.match(/[[['"['"]]],/)[1]; getting null while applying the regex