0

I can login into the app using the username and password in android emulator. But when I try to login in the real mobile device with same login credentials, the error is thrown reading: cannot read property 'status' of undefined.

I am getting data and token from API. The api works perfectly in the emulator. What could be the issue?

Tried to login in the react native app using username and password in real android device. I expected to be logged in with the correct login credentials.

But not able to. It showed error: 'Cannot read property 'status' of undefined.

The same code is working perfectly for emulator.

  • Hi, welcome to Stack Overflow. It's important to add enough code so that others can reproduce your problem - see [ask] and [mcve] for reference. Re your issue, what address is the API hosted on? If it's localhost you will need to use an IP. – Abe Jul 19 '23 at 17:37
  • See https://stackoverflow.com/questions/33704130/react-native-android-fetch-failing-on-connection-to-local-api – Abe Jul 19 '23 at 17:38
  • Please provide enough code so others can better understand or reproduce the problem. – Y. Gherbi Jul 20 '23 at 01:27

0 Answers0