[solved] Meteor React Native not working

Hello everyone. I am developing an app in React Native that connects to my laptop using the ‘meteorrn/core’ package, where I host a web page made with Meteor and React Native. The app utilizes Meteor’s account and session system, as well as its methods for exchanging information between the server and the application. I am using Expo, and when previewing the app in the ‘Expo Go’ tool, everything works fine. However, when I generate an APK, the Meteor package seems to simply not work.

For example, the first thing that needs to be done when starting the app is to log in. But when pressing the button that triggers this action, nothing happens, not even an error in the function responsible for it. Any idea what might be happening?

Better to add some logging in your app to identify which specifically is failing. Is it the method call or something else

How can I add logging if it’s an apk? I can do it in expo go, but like i said, in expo go it works fine

could it have something to do with the app not having network or internet permissions?

It’s better to research logging and how you can add it to your app. This can save you a lot of effort in the future trying to figure out what is happening to your app.

Regarding not having a network connection, then there is no way for your app to connect to your server and log the user

Does your server use https? It won’t work with http.

It’s http… But I also tried fetching an example API on the internet with https and it didn’t work neither.

hey @maldaurore I’m maintaining the Meteor RN library. Can you provide a minimal code for reproduction, reduced to the part that causes the issues?

A few more questions from my end:

I’m sorry. The issue was that I needed to add a line of code in the Android manifest allowing the connection via HTTP since apparently it comes disabled by default:

android:usesCleartextTraffic="true"

inside the “application” tag.

I’m sorry for rushing and blaming the library for this.

1 Like

@maldaurore no worries, I think this might be a good example for a troubleshooting / FAQ section in the repo

How can I contribute?

You can add a new PR to add a Troubleshooting / FAQ section with the mentioned content in the Meteor React Native repo: GitHub - meteorrn/meteor-react-native: Meteor client for React Native matching Meteor Spec

Note: I you are not experienced with Pull Requests etc. then don’t you worry I will support you in the process

1 Like

Hey @jkuester I can’t find that section in the repo

No worries, it doesn’t exist yet, just add it as new section in the PR, I will support you in the process