Unable to open the application in mobile device


I have using ionic framework to build mobile and web application. But I am facing some error while using mobile application. There is no issue in web application, all are working fine. But in mobile application after launch screen, I am getting following error.

Unhandled Promise rejection: Network request failed; Zone: <root>; Task: Promise.then; Value: TypeError: Network request failed
at xhr.onerror [as zone_symbol ON PROPERTYerror (vendor.js:268480:14) at XMLHttpRequest.wrapfh (polyfills.js:2956:39)
at ZoneDelegate.invokeTask (polyfills.js:2599:31)
at Zone.runTask (polyfills.js:2371:47) at ZoneTask.invokeTask [as invoke] (polyfills.js:2680:34)
at invokeTask (polyfills.js:3793:14)
at XMLHttpRequest.globalZoneAwareCallback (polyfills.js:3819:17) TypeError: Network request failed

I have trying to analyze the issue root cause, but while making entry for all providers in app.module.ts file, the mobile application working fine. In angular, no need to enter the providers in app.module.ts. Because I mentioned provided in root for every service(injectable) files.

Why I need to enter all providers in app.module.ts? Kindly clarify my doubts.

Version Details

  • ionic 6
  • angular 13
  • cordova 11