inProgress-team / react-native-meteor

Meteor Reactivity for your React Native application :)
MIT License
693 stars 210 forks source link

react-native-meteor not working on android versions 9.0 and above #366

Open ezrogha opened 4 years ago

ezrogha commented 4 years ago

Hi, I have noticed that react-native-meteor doesn't run on android versions 9.0 and above when the app is run via apk, though it works properly on local(using dev server). i.e In my code nothing is executed after this line when using v9.0 and above via apk Meteor.call('Account.checkEmailVerification', { email }, (err, ok) => { All other versions execute perfectly.

Note: react-native-meteor works properly on all versions when run in development

Any help will be highly appreciated 🙏🏽

ezrogha commented 4 years ago

I fixed this by adding android:usesCleartextTraffic="true" to android manifest file. Read more about it here. It occurs because android versions 9+ don't allow insecure connections in release builds. For my case I was connecting to ws:// which would have also worked if it were wss://