Ionic does not show json data on android emulator or devapp

369 Views Asked by At

On localhost:8100 with ionic serve command, app is calling json data via web api (asp.net core backend that enabled CORS with origins http://localhost:8100) which is working fine. Now, I tested with both devapp on galaxy 9 and android emulator (ioniccordovaemulate android). Both shows the app's layout, but it does not fetch json data.

Does anyone know what the problem is or how to debug it on devapp/android emulator like I can do it on browser's console?

1

There are 1 best solutions below

5
On BEST ANSWER

Use chrome://inspect/#devices to debug Android devices/emulators and check below:

  1. See if there is any error in console logs (maybe JavaScript is breaking due to which this is happening)
  2. Check if API is getting called and getting response.

Check here official information for how to use chrome inspect devices.