Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does not work "cannot read property country" #217

Open
kriit24 opened this issue Jan 29, 2024 · 1 comment
Open

does not work "cannot read property country" #217

kriit24 opened this issue Jan 29, 2024 · 1 comment

Comments

@kriit24
Copy link

kriit24 commented Jan 29, 2024

It does not work.
Expo SDK 49.
Also does not work - Unable to resolve "react-native-version-check-expo" from "App.js"

Possible Unhandled Promise Rejection (id: 0): TypeError: Cannot read property 'country' of null TypeError: Cannot read property 'country' of null at getCountry (http://192.168.1.100:8081/node_modules%5Cexpo%5CAppEntry.bundle//&platform=android&dev=true&hot=false&lazy=true:228401:44) at ?anon_0_ (http://192.168.1.100:8081/node_modules%5Cexpo%5CAppEntry.bundle//&platform=android&dev=true&hot=false&lazy=true:130878:58) at next (native) at asyncGeneratorStep (http://192.168.1.100:8081/node_modules%5Cexpo%5CAppEntry.bundle//&platform=android&dev=true&hot=false&lazy=true:6085:26) at _next (http://192.168.1.100:8081/node_modules%5Cexpo%5CAppEntry.bundle//&platform=android&dev=true&hot=false&lazy=true:6104:29) at anonymous (http://192.168.1.100:8081/node_modules%5Cexpo%5CAppEntry.bundle//&platform=android&dev=true&hot=false&lazy=true:6109:14) at tryCallTwo (/Users/kudo/01_Work/Repos/expo/expo/android/versioned-react-native/packages/react-native/ReactAndroid/hermes-engine/.cxx/MinSizeRel/3n472i6k/armeabi-v7a/lib/InternalBytecode/InternalBytecode.js:61:9) at doResolve (/Users/kudo/01_Work/Repos/expo/expo/android/versioned-react-native/packages/react-native/ReactAndroid/hermes-engine/.cxx/MinSizeRel/3n472i6k/armeabi-v7a/lib/InternalBytecode/InternalBytecode.js:216:25) at Promise (/Users/kudo/01_Work/Repos/expo/expo/android/versioned-react-native/packages/react-native/ReactAndroid/hermes-engine/.cxx/MinSizeRel/3n472i6k/armeabi-v7a/lib/InternalBytecode/InternalBytecode.js:82:14) at anonymous (http://192.168.1.100:8081/node_modules%5Cexpo%5CAppEntry.bundle//&platform=android&dev=true&hot=false&lazy=true:6101:25) at apply (native) at anonymous (http://192.168.1.100:8081/node_modules%5Cexpo%5CAppEntry.bundle//&platform=android&dev=true&hot=false&lazy=true:130891:32) at apply (native) at anonymous (http://192.168.1.100:8081/node_modules%5Cexpo%5CAppEntry.bundle//&platform=android&dev=true&hot=false&lazy=true:162297:27) at tryCallTwo (/Users/kudo/01_Work/Repos/expo/expo/android/versioned-react-native/packages/react-native/ReactAndroid/hermes-engine/.cxx/MinSizeRel/3n472i6k/armeabi-v7a/lib/InternalBytecode/InternalBytecode.js:61:9) at doResolve (/Users/kudo/01_Work/Repos/expo/expo/android/versioned-react-native/packages/react-native/ReactAndroid/hermes-engine/.cxx/MinSizeRel/3n472i6k/armeabi-v7a/lib/InternalBytecode/InternalBytecode.js:216:25) at Promise (/Users/kudo/01_Work/Repos/expo/expo/android/versioned-react-native/packages/react-native/ReactAndroid/hermes-engine/.cxx/MinSizeRel/3n472i6k/armeabi-v7a/lib/InternalBytecode/InternalBytecode.js:82:14) at anonymous (http://192.168.1.100:8081/node_modules%5Cexpo%5CAppEntry.bundle//&platform=android&dev=true&hot=false&lazy=true:162296:29) at init (http://192.168.1.100:8081/node_modules%5Cexpo%5CAppEntry.bundle//&platform=android&dev=true&hot=false&lazy=true:162307:18) at anonymous (http://192.168.1.100:8081/node_modules%5Cexpo%5CAppEntry.bundle//&platform=android&dev=true&hot=false&lazy=true:130933:23) at apply (native) at init (http://192.168.1.100:8081/node_modules%5Cexpo%5CAppEntry.bundle//&platform=android&dev=true&hot=false&lazy=true:162317:24) at anonymous (http://192.168.1.100:8081/node_modules%5Cexpo%5CAppEntry.bundle//&platform=android&dev=true&hot=false&lazy=true:162309:24) at tryCallOne (/Users/kudo/01_Work/Repos/expo/expo/android/versioned-react-native/packages/react-native/ReactAndroid/hermes-engine/.cxx/MinSizeRel/3n472i6k/armeabi-v7a/lib/InternalBytecode/InternalBytecode.js:53:16) at anonymous (/Users/kudo/01_Work/Repos/expo/expo/android/versioned-react-native/packages/react-native/ReactAndroid/hermes-engine/.cxx/MinSizeRel/3n472i6k/armeabi-v7a/lib/InternalBytecode/InternalBytecode.js:139:27) at apply (native) at anonymous (http://192.168.1.100:8081/node_modules%5Cexpo%5CAppEntry.bundle//&platform=android&dev=true&hot=false&lazy=true:39588:26) at _callTimer (http://192.168.1.100:8081/node_modules%5Cexpo%5CAppEntry.bundle//&platform=android&dev=true&hot=false&lazy=true:39467:17) at _callReactNativeMicrotasksPass (http://192.168.1.100:8081/node_modules%5Cexpo%5CAppEntry.bundle//&platform=android&dev=true&hot=false&lazy=true:39512:17) at callReactNativeMicrotasks (http://192.168.1.100:8081/node_modules%5Cexpo%5CAppEntry.bundle//&platform=android&dev=true&hot=false&lazy=true:39718:44) at __callReactNativeMicrotasks (http://192.168.1.100:8081/node_modules%5Cexpo%5CAppEntry.bundle//&platform=android&dev=true&hot=false&lazy=true:3643:46) at anonymous (http://192.168.1.100:8081/node_modules%5Cexpo%5CAppEntry.bundle//&platform=android&dev=true&hot=false&lazy=true:3417:45) at __guard (http://192.168.1.100:8081/node_modules%5Cexpo%5CAppEntry.bundle//&platform=android&dev=true&hot=false&lazy=true:3616:15) at flushedQueue (http://192.168.1.100:8081/node_modules%5Cexpo%5CAppEntry.bundle//&platform=android&dev=true&hot=false&lazy=true:3416:21)

@derek-primumco
Copy link

derek-primumco commented Feb 5, 2024

This has been my experience, too.

The Android Play Store check works, but the rest of it (current version and country) doesn't seem to work.

I read this article:
https://sugandsingh5566.medium.com/force-update-ensuring-your-react-native-app-stays-up-to-date-a39f5791b629

It suggests this code snippet, where /in/ is the country code for the App Store:

const latestVersioniOS = await fetch(`https://itunes.apple.com/in/lookup?bundleId= put her your bundleId like com.app`)
  .then(r => r.json())
  .then((res) => { return res?.results[0]?.version })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants