1

The problem

I'm developing an app which uses MongoDB realm and Redux. When only redux is in the project, no problem. But then after debuggin it with realm installed errors started happening. Realm is using port=8083 for its XML requests, while React Native is running by default in port=8081. So, when realm does its first XML request to initialize the realm app react native crashes.

error in debugger

The troubleshooting

By looking at the react-native-debugger documentation its possible to change de debugger port. Nice! And then i searched for a way to do the same in react-native. As weird as it sounds, apparently react-native's android port is hardcoded by the react-native init, meaning that only the default 8081 port works. Actually, only the metro server and ios port can be changed. I requested support from MongoDB, about changing their default port to 8081. But still waiting for an answer.

This is the app repository Any suggestion?

Thanks in advance!

codeLearnerrr
  • 300
  • 2
  • 10

1 Answers1

1

So, the react native app was running in the emulator and it did just fine. Then, i had this idea of turning off the SIM Card internet in the physical device. After doing so, the local wi-fi was used (where the computer was connected as well). Shazam...! That was it. End of story. This was the issue. What bugs me is that the documentation forgot to mention this use case. The nearest i could find was this

codeLearnerrr
  • 300
  • 2
  • 10