0

Abstract / Context

I've been 8 hours straight trying to fix a problem that doesn't seem to have any feasible solution: all of a sudden, my Ionic Cordova project started having problems when connecting to Internet.

I was trying to install Firebase and set up FCM, which got me into this problem. I ended up rolling back to a stable build that I had, that was working perfectly and didn't give me any problem. But the problem persisted. As for now, my app is totally dead and useless until this problem gets fixed.

Explaining the problem

  • The app has no connectivity to Internet. The Android platform folder gets perfectly built, as the APK, but when the app is opened, it is unable to fetch resources from my server.
  • It also cannot access other generic Internet resources. Doing a fetch('http://www.google.com') returns a status of 404, per example.
  • I used to test the APKs directly in my device, with developer debug options activated, via Chrome with the Remote Device option. Now, it detects absolutely nothing.
  • As weird as it sounds, the app works perfectly when tested via ionic serve in the navigator, correctly accessing my server resources and performing network requests as normal.

What I've tried this far:

  • Changing my Node version. I both tried the LTS and the latest version (v12.11.1), but both give exactly the same results.
  • Updating Cordova to its latest version, and rolling it back to 7.1, but none of them worked either.
  • Installing / uninstalling the Cordova Androidx and Cordova Androidx Adapter plugins.
  • Of course, in every one of these steps, removing and re-creating the android platform.
  • Adding a <meta> tag that accepted all the requests, as it was suggested in another thread.
  • Adding <allow-navigation href="*" /> to the config.xml file.

System and setup:

Dump generated with the command ionic info:

Ionic:

   Ionic CLI                     : 5.2.5 (C:\Users\zerok\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework               : @ionic/angular 4.0.0
   @angular-devkit/build-angular : 0.12.4
   @angular-devkit/schematics    : 7.3.0
   @angular/cli                  : 7.1.0
   @ionic/angular-toolkit        : 1.3.0

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 8.1.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.1, (and 12 other plugins)

Utility:

   cordova-res : 0.7.0
   native-run  : not installed

System:

   NodeJS : v12.11.1 (C:\Program Files\nodejs\node.exe)
   npm    : 6.11.3
   OS     : Windows 10

Testing in a Xiaomi Pocophone, Android 9

Logs when building app with ionic cordova build android:

ionic cordova build android
> ng.cmd run app:ionic-cordova-build --platform=android

Date: 2019-10-03T11:29:32.113Z
Hash: 12ee885cabf55c31b9b6
Time: 12152ms
chunk {0} 0.js, 0.js.map () 16.6 kB  [rendered]
chunk {1} 1.js, 1.js.map () 12.8 kB  [rendered]
chunk {2} 2.js, 2.js.map () 17.1 kB  [rendered]
chunk {3} 3.js, 3.js.map () 1.45 kB  [rendered]
chunk {4} 4.js, 4.js.map () 93.7 kB  [rendered]
chunk {5} 5.js, 5.js.map () 3.22 kB  [rendered]
chunk {6} 6.js, 6.js.map () 1000 bytes  [rendered]
chunk {7} 7.js, 7.js.map () 5.28 kB  [rendered]
chunk {8} 8.js, 8.js.map () 1.4 kB  [rendered]
chunk {9} 9.js, 9.js.map () 1.73 kB  [rendered]
chunk {10} 10.js, 10.js.map () 29.5 kB  [rendered]
chunk {11} 11.js, 11.js.map () 30.4 kB  [rendered]
chunk {12} 12.js, 12.js.map () 31 kB  [rendered]
chunk {13} 13.js, 13.js.map () 32.2 kB  [rendered]
chunk {14} 14.js, 14.js.map () 24.7 kB  [rendered]39m
chunk {15} 15.js, 15.js.map () 25.5 kB  [rendered]
chunk {16} 16.js, 16.js.map () 21.1 kB  [rendered]
chunk {17} 17.js, 17.js.map () 21.5 kB  [rendered]
chunk {18} 18.js, 18.js.map () 23.1 kB  [rendered]
chunk {19} 19.js, 19.js.map () 23.1 kB  [rendered]
chunk {20} 20.js, 20.js.map () 48.8 kB  [rendered]
chunk {21} 21.js, 21.js.map () 48.8 kB  [rendered]
chunk {22} 22.js, 22.js.map () 26.3 kB  [rendered]
chunk {23} 23.js, 23.js.map () 27.8 kB  [rendered]
chunk {24} 24.js, 24.js.map () 30.5 kB  [rendered]
chunk {25} 25.js, 25.js.map () 30.9 kB  [rendered]
chunk {26} 26.js, 26.js.map () 31.1 kB  [rendered]
chunk {27} 27.js, 27.js.map () 31.4 kB  [rendered]
chunk {28} 28.js, 28.js.map () 24.1 kB  [rendered]
chunk {29} 29.js, 29.js.map () 24.6 kB  [rendered]
chunk {30} 30.js, 30.js.map () 26.3 kB  [rendered]
chunk {31} 31.js, 31.js.map () 27.8 kB  [rendered]
chunk {32} 32.js, 32.js.map () 32 kB  [rendered]
chunk {33} 33.js, 33.js.map () 33.1 kB  [rendered]
chunk {34} 34.js, 34.js.map () 23.6 kB  [rendered]
chunk {35} 35.js, 35.js.map () 24.1 kB  [rendered]
chunk {36} 36.js, 36.js.map () 31.5 kB  [rendered]
chunk {37} 37.js, 37.js.map () 32.5 kB  [rendered]
chunk {38} 38.js, 38.js.map () 23.4 kB  [rendered]
chunk {39} 39.js, 39.js.map () 23.9 kB  [rendered]
chunk {40} 40.js, 40.js.map () 48.8 kB  [rendered]
chunk {41} 41.js, 41.js.map () 48.8 kB  [rendered]
chunk {42} 42.js, 42.js.map () 30.5 kB  [rendered]
chunk {43} 43.js, 43.js.map () 31 kB  [rendered]
chunk {44} 44.js, 44.js.map () 23.1 kB  [rendered]
chunk {45} 45.js, 45.js.map () 23.1 kB  [rendered]
chunk {46} 46.js, 46.js.map9m () 28.6 kB  [rendered]
chunk {47} 47.js, 47.js.map () 28.7 kB  [rendered]
chunk {48} 48.js, 48.js.map () 21.1 kB  [rendered]
chunk {49} 49.js, 49.js.map () 21.6 kB  [rendered]
chunk {50} 50.js, 50.js.map () 25.6 kB  [rendered]
chunk {51} 51.js, 51.js.map () 25.6 kB  [rendered]
chunk {52} 52.js, 52.js.map () 31.2 kB  [rendered]
chunk {53} 53.js, 53.js.map () 31.2 kB  [rendered]
chunk {54} 54.js, 54.js.map () 31 kB  [rendered]
chunk {55} 55.js, 55.js.map () 31.2 kB  [rendered]
chunk {56} 56.js, 56.js.map () 25.5 kB  [rendered]
chunk {57} 57.js, 57.js.map () 25.5 kB  [rendered]
chunk {58} 58.js, 58.js.map () 16.8 kB  [rendered]
chunk {59} 59.js, 59.js.map () 17.1 kB  [rendered]
chunk {60} 60.js, 60.js.map () 20.6 kB  [rendered]
chunk {61} 61.js, 61.js.map () 20.7 kB  [rendered]
chunk {62} 62.js, 62.js.map () 29.9 kB  [rendered]
chunk {63} 63.js, 63.js.map () 29.9 kB  [rendered]
chunk {64} 64.js, 64.js.map () 25.4 kB  [rendered]
chunk {65} 65.js, 65.js.map () 26.2 kB  [rendered]
chunk {66} 66.js, 66.js.map () 21.2 kB  [rendered]
chunk {67} 67.js, 67.js.map () 21.2 kB  [rendered]
chunk {68} 68.js, 68.js.map () 24.1 kB  [rendered]
chunk {69} 69.js, 69.js.map () 25.7 kB  [rendered]
chunk {70} 70.js, 70.js.map () 38.9 kB  [rendered]
chunk {71} 71.js, 71.js.map () 39.5 kB  [rendered]
chunk {72} 72.js, 72.js.map () 18.7 kB  [rendered]
chunk {73} 73.js, 73.js.map () 18.7 kB  [rendered]
chunk {74} 74.js, 74.js.map () 38.8 kB  [rendered]
chunk {75} 75.js, 75.js.map () 39.5 kB  [rendered]
chunk {76} 76.js, 76.js.map () 33.5 kB  [rendered]
chunk {77} 77.js, 77.js.map () 33.5 kB  [rendered]22m
chunk {78} 78.js, 78.js.map () 13.1 kB  [rendered]
chunk {79} 79.js, 79.js.map () 13.1 kB  [rendered]
chunk {80} 80.js, 80.js.map () 26.5 kB  [rendered]
chunk {81} 81.js, 81.js.map () 27.7 kB  [rendered]
chunk {82} 82.js, 82.js.map () 18.7 kB  [rendered]
chunk {83} 83.js, 83.js.map () 18.7 kB  [rendered]
chunk {84} 84.js, 84.js.map () 17.8 kB  [rendered]
chunk {85} 85.js, 85.js.map () 18.2 kB  [rendered]
chunk {86} 86.js, 86.js.map () 20.4 kB  [rendered]
chunk {87} 87.js, 87.js.map () 20.7 kB  [rendered]
chunk {88} 88.js, 88.js.map () 21.2 kB  [rendered]
chunk {89} 89.js, 89.js.map () 21.2 kB  [rendered]
chunk {90} 90.js, 90.js.map () 16 kB  [rendered]
chunk {91} 91.js, 91.js.map () 16.1 kB  [rendered]
chunk {92} 92.js, 92.js.map () 15.9 kB  [rendered]
chunk {93} 93.js, 93.js.map () 16 kB m [rendered]
chunk {94} 94.js, 94.js.map () 43.7 kB  [rendered]
chunk {95} 95.js, 95.js.map () 46 kB  [rendered]
chunk {96} 96.js, 96.js.map () 46.3 kB  [rendered]
chunk {97} 97.js, 97.js.map () 48.8 kB  [rendered]
chunk {98} 98.js, 98.js.map () 26.2 kB  [rendered]
chunk {99} 99.js, 99.js.map () 27.1 kB  [rendered]
chunk {100} 100.js, 100.js.map () 23.6 kB  [rendered]
chunk {101} 101.js, 101.js.map () 25.2 kB  [rendered]
chunk {102} 102.js, 102.js.map () 20.4 kB  [rendered]
chunk {103} 103.js, 103.js.map () 20.7 kB  [rendered]
chunk {104} 104.js, 104.js.map () 25.1 kB  [rendered]
chunk {105} 105.js, 105.js.map () 26.2 kB  [rendered]
chunk {106} 106.js, 106.js.map () 15.9 kB  [rendered]
chunk {107} 107.js, 107.js.map () 16.1 kB  [rendered]
chunk {108} 108.js, 108.js.map () 16.8 kB  [rendered]
chunk {109} 2m109.js, 109.js.map () 17.1 kB  [rendered]
chunk {110} 110.js, 110.js.map () 20.7 kB  [rendered]
chunk {111} 111.js, 111.js.map () 20.7 kB  [rendered]
chunk {112} 112.js, 112.js.map () 15.9 kB  [rendered]
chunk {113} 113.js, 113.js.map () 16 kB  [rendered]
chunk {114} 114.js, 114.js.map () 42.1 kB  [rendered]
chunk {115} 115.js, 115.js.map () 42.4 kB  [rendered]
chunk {116} 116.js, 116.js.map () 6.39 kB  [rendered]
chunk {117} 117.js, 117.js.map () 6.47 kB  [rendered]
chunk {118} 118.js, 118.js.map () 6.39 kB  [rendered]
chunk {119} 119.js, 119.js.map () 6.46 kB  [rendered]
chunk {120} 120.js, 120.js.map () 42.5 kB  [rendered]
chunk {121} 121.js, 121.js.map () 42.7 kB  [rendered]
chunk {122} 122.js, 122.js.map () 19.8 kB  [rendered]
chunk {123} 123.js, 123.js.map () 19.8 kB  [rendered]
chunk {124} 124.js, 124.js.map () 17.8 kB [39m [rendered]
chunk {125} 125.js, 125.js.map () 17.9 kB  [rendered]
chunk {126} 126.js, 126.js.map () 17.2 kB  [rendered]
chunk {127} 127.js, 127.js.map () 17.2 kB  [rendered]
chunk {128} 128.js, 128.js.map () 17.2 kB  [rendered]
chunk {129} 129.js, 129.js.map () 17.3 kB  [rendered]
chunk {130} 130.js, 130.js.map () 13.6 kB  [rendered]
chunk {131} 131.js, 131.js.map () 13.7 kB  [rendered]
chunk {132} 132.js, 132.js.map () 14.3 kB  [rendered]
chunk {133} 133.js, 133.js.map () 14.3 kB  [rendered]
chunk {134} 134.js, 134.js.map () 10 kB  [rendered]
chunk {135} 135.js, 135.js.map () 10.1 kB  [rendered]
chunk {136} 136.js, 136.js.map () 17.3 kB  [rendered]
chunk {137} 137.js, 137.js.map () 17.3 kB  [rendered]
chunk {138} 138.js, 138.js.map () 12.8 kB  [rendered]
chunk {139} 139.js, 139.js.map () 12.8 kB  [rendered]
chunk {[33m140} 140.js, 140.js.map () 3.73 kB  [rendered]
chunk {141} 141.js, 141.js.map () 1.6 kB  [rendered]
chunk {142} 142.js, 142.js.map () 23.9 kB  [rendered]
chunk {143} 143.js, 143.js.map () 23.9 kB  [rendered]
chunk {144} 144.js, 144.js.map () 14.2 kB  [rendered]
chunk {145} 145.js, 145.js.map () 14.4 kB  [rendered]
chunk {146} 146.js, 146.js.map () 2.4 kB  [rendered]
chunk {147} 147.js, 147.js.map () 2.43 kB  [rendered]
chunk {148} 148.js, 148.js.map () 23.8 kB  [rendered]
chunk {149} 149.js, 149.js.map () 23.8 kB  [rendered]
chunk {150} 150.js, 150.js.map () 24.5 kB  [rendered]
chunk {151} 151.js, 151.js.map () 25 kB  [rendered]
chunk {152} 152.js, 152.js.map () 9.83 kB  [rendered]
chunk {153} 153.js, 153.js.map () 9.84 kB  [rendered]
chunk {154} 154.js, 154.js.map () 10.4 kB  [rendered]
chunk {155} 155.js, 155.js.map2m () 10.7 kB  [rendered]
chunk {156} 156.js, 156.js.map () 10.9 kB  [rendered]
chunk {157} 157.js, 157.js.map () 10.9 kB  [rendered]
chunk {158} 158.js, 158.js.map () 10.1 kB  [rendered]
chunk {159} 159.js, 159.js.map () 10.3 kB  [rendered]
chunk {160} 160.js, 160.js.map () 13.3 kB  [rendered]
chunk {161} 161.js, 161.js.map () 13.4 kB  [rendered]
chunk {162} 162.js, 162.js.map () 25.5 kB  [rendered]
chunk {163} 163.js, 163.js.map () 26 kB  [rendered]
chunk {164} 164.js, 164.js.map () 10.8 kB  [rendered]
chunk {165} 165.js, 165.js.map () 10.8 kB  [rendered]
chunk {166} 166.js, 166.js.map () 3.08 kB  [rendered]
chunk {167} 167.js, 167.js.map () 12 kB  [rendered]
chunk {168} 168.js, 168.js.map () 14.6 kB  [rendered]
chunk {169} 169.js, 169.js.map () 7.92 kB  [rendered]
chunk {170} 170.js, 170.js.map () 1.63 kB  [rendered][39m
chunk {171} 171.js, 171.js.map () 1.36 kB  [rendered]
chunk {172} 172.js, 172.js.map () 5.03 kB  [rendered]
chunk {common} common.js, common.js.map (common) 18.5 kB  [rendered]
chunk {cordova} cordova.js, cordova.js.map (cordova) 63.5 kB [entry] [rendered]
chunk {default~event-creation-event-creation-module~event-page-event-page-module~map-map-module~place-page-~c14e8f5b} default~event-creation-event-creation-module~event-page-event-page-module~map-map-module~place-page-~c14e8f5b.js, default~event-creation-event-creation-module~event-page-event-page-module~map-map-module~place-page-~c14e8f5b.js.map (default~event-creation-event-creation-module~event-page-event-page-module~map-map-module~place-page-~c14e8f5b) 196 kB  [rendered]
chunk {default~event-page-event-page-module~events-manager-events-manager-module~map-map-module} default~event-page-event-page-module~events-manager-events-manager-module~map-map-module.js, default~event-page-event-page-module~events-manager-events-manager-module~map-map-module.js.map (default~event-page-event-page-module~events-manager-events-manager-module~map-map-module) 12.3 kB  [rendered]
chunk {event-creation-event-creation-module} event-creation-event-creation-module.js, event-creation-event-creation-module.js.map (event-creation-event-creation-module) 33.4 kB  [rendered]
chunk {event-page-event-page-module} event-page-event-page-module.js, event-page-event-page-module.js.map39m (event-page-event-page-module) 24 kB  [rendered]
chunk {events-manager-events-manager-module} events-manager-events-manager-module.js, events-manager-events-manager-module.js.map (events-manager-events-manager-module) 16.7 kB  [rendered]
chunk {login-login-module} login-login-module.js, login-login-module.js.map (login-login-module) 14.3 kB  [rendered]
chunk {main} main.js, main.js.map (main) 380 kB [initial] [rendered]
chunk {map-map-module} map-map-module.js, map-map-module.js.map (map-map-module) 37 kB  [rendered]
chunk {place-page-place-page-module} place-page-place-page-module.js, place-page-place-page-module.js.map (place-page-place-page-module) 49.4 kB  [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 236 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 9.63 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 85.2 kB [initial] [rendered]
chunk {user-stats-user-stats-module} user-stats-user-stats-module.js, user-stats-user-stats-module.js.map (user-stats-user-stats-module) 14.2 kB  [rendered]
chunk {user_profile-userprofile-module} user_profile-userprofile-module.js, user_profile-userprofile-module.js.map (user_profile-userprofile-module) 23 kB  [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 5.66 MB [initial] [rendered]
> cordova.cmd build android
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=C:\Users\zerok\AppData\Local\Android\sdk (DEPRECATED)
Subproject Path: CordovaLib
Subproject Path: app
> Task :app:preBuild UP-TO-DATE
> Task :CordovaLib:preBuild UP-TO-DATE
> Task :CordovaLib:preDebugBuild UP-TO-DATE
> Task :CordovaLib:checkDebugManifest UP-TO-DATE
> Task :CordovaLib:processDebugManifest UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :CordovaLib:compileDebugAidl NO-SOURCE
> Task :app:compileDebugAidl NO-SOURCE
> Task :CordovaLib:packageDebugRenderscript NO-SOURCE
> Task :app:compileDebugRenderscript UP-TO-DATE
> Task :app:checkDebugManifest UP-TO-DATE
> Task :app:generateDebugBuildConfig UP-TO-DATE
> Task :app:prepareLintJar UP-TO-DATE
> Task :app:generateDebugSources UP-TO-DATE
> Task :CordovaLib:compileDebugRenderscript UP-TO-DATE
> Task :CordovaLib:generateDebugBuildConfig UP-TO-DATE
> Task :CordovaLib:generateDebugResValues UP-TO-DATE
> Task :CordovaLib:generateDebugResources UP-TO-DATE
> Task :CordovaLib:packageDebugResources UP-TO-DATE
> Task :CordovaLib:generateDebugRFile UP-TO-DATE
> Task :CordovaLib:prepareLintJar UP-TO-DATE
> Task :CordovaLib:generateDebugSources UP-TO-DATE
> Task :CordovaLib:javaPreCompileDebug UP-TO-DATE
> Task :CordovaLib:compileDebugJavaWithJavac UP-TO-DATE
> Task :CordovaLib:processDebugJavaRes NO-SOURCE
> Task :CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug UP-TO-DATE
> Task :app:javaPreCompileDebug UP-TO-DATE
> Task :app:mainApkListPersistenceDebug UP-TO-DATE
> Task :app:generateDebugResValues UP-TO-DATE
> Task :app:generateDebugResources UP-TO-DATE
> Task :app:mergeDebugResources
> Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
> Task :app:processDebugManifest UP-TO-DATE
> Task :app:processDebugResources
> Task :app:compileDebugJavaWithJavac UP-TO-DATE
> Task :app:compileDebugNdk NO-SOURCE
> Task :app:compileDebugSources UP-TO-DATE
> Task :app:mergeDebugShaders UP-TO-DATE
> Task :app:compileDebugShaders UP-TO-DATE
> Task :app:generateDebugAssets UP-TO-DATE
> Task :CordovaLib:mergeDebugShaders UP-TO-DATE
> Task :CordovaLib:compileDebugShaders UP-TO-DATE
> Task :CordovaLib:generateDebugAssets UP-TO-DATE
> Task :CordovaLib:packageDebugAssets UP-TO-DATE
> Task :app:mergeDebugAssets UP-TO-DATE
> Task :app:validateSigningDebug UP-TO-DATE
> Task :app:signingConfigWriterDebug UP-TO-DATE
> Task :app:transformClassesWithDexBuilderForDebug UP-TO-DATE
> Task :app:transformDexArchiveWithDexMergerForDebug UP-TO-DATE
> Task :app:mergeDebugJniLibFolders UP-TO-DATE
> Task :CordovaLib:compileDebugNdk NO-SOURCE
> Task :CordovaLib:mergeDebugJniLibFolders UP-TO-DATE
> Task :CordovaLib:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE
> Task :CordovaLib:transformNativeLibsWithIntermediateJniLibsForDebug UP-TO-DATE
> Task :app:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE
> Task :app:processDebugJavaRes NO-SOURCE
> Task :app:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
> Task :app:packageDebug
> Task :app:assembleDebug
> Task :app:cdvBuildDebug

BUILD SUCCESSFUL in 8s
42 actionable tasks: 3 executed, 39 up-to-date

Cordova plugin list:

cordova-plugin-camera 4.0.3 "Camera"
cordova-plugin-datepicker 0.9.3 "DatePicker"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-filepath 1.5.1 "cordova-plugin-filepath"
cordova-plugin-geolocation 4.0.1 "Geolocation"
cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 4.1.1 "cordova-plugin-ionic-webview"
cordova-plugin-native-spinner 1.1.3 "Native Spinner"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-telerik-imagepicker 2.2.4 "ImagePicker"
cordova-plugin-whitelist 1.3.4 "Whitelist"
phonegap-plugin-multidex 1.0.0 "Multidex"

Package.json contents:

{
  "name": "dromous",
  "version": "0.0.1",
  "author": "ByGymApp",
  "homepage": "http://dromousapp.com/",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@agm/core": "^1.0.0-beta.5",
    "@angular/common": "~7.2.3",
    "@angular/compiler-cli": "^7.1.0",
    "@angular/core": "~7.2.3",
    "@angular/forms": "~7.2.3",
    "@angular/http": "~7.2.3",
    "@angular/platform-browser": "~7.2.3",
    "@angular/platform-browser-dynamic": "~7.2.3",
    "@angular/router": "~7.2.3",
    "@ionic-native/background-mode": "^5.2.0",
    "@ionic-native/core": "5.0.0",
    "@ionic-native/date-picker": "^5.2.0",
    "@ionic-native/geolocation": "^5.0.0",
    "@ionic-native/image-picker": "^5.2.0",
    "@ionic-native/spinner-dialog": "^5.0.0",
    "@ionic-native/splash-screen": "5.0.0",
    "@ionic-native/status-bar": "5.0.0",
    "@ionic-native/stripe": "^4.20.0",
    "@ionic/angular": "4.0.0",
    "@types/googlemaps": "^3.37.0",
    "@types/parse": "^2.1.0",
    "chart.js": "^2.7.3",
    "cordova-android": "^8.1.0",
    "cordova-plugin-datepicker": "0.9.3",
    "cordova-plugin-device": "^2.0.2",
    "cordova-plugin-geolocation": "^4.0.1",
    "cordova-plugin-ionic-keyboard": "^2.1.3",
    "cordova-plugin-ionic-webview": "^4.1.1",
    "cordova-plugin-native-spinner": "^1.1.3",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-statusbar": "^2.4.2",
    "cordova-plugin-telerik-imagepicker": "2.2.4",
    "cordova-plugin-whitelist": "^1.3.4",
    "cordova-res": "^0.7.0",
    "core-js": "^2.5.3",
    "crypto-js": "^3.1.9-1",
    "moment": "^2.24.0",
    "ng2-charts": "^1.6.0",
    "parse": "^2.1.0",
    "phonegap-plugin-multidex": "^1.0.0",
    "recursive-readdir": "^2.2.2",
    "rxjs": "6.4.0",
    "rxjs-compat": "^6.5.3",
    "sharp": "^0.23.1",
    "typescript": "^3.1.6",
    "whitelist": "^1.0.2",
    "zone.js": "^0.8.29"
  },
  "devDependencies": {
    "@angular-devkit/architect": "^0.13.0",
    "@angular-devkit/build-angular": "^0.12.4",
    "@angular-devkit/core": "^7.3.0",
    "@angular-devkit/schematics": "^7.3.0",
    "@angular/cli": "7.1.0",
    "@angular/compiler": "~7.2.3",
    "@angular/language-service": "~7.2.3",
    "@ionic/angular-toolkit": "^1.3.0",
    "@types/chartjs": "0.0.31",
    "@types/jasmine": "^3.3.8",
    "@types/jasminewd2": "^2.0.6",
    "@types/node": "^10.12.21",
    "codelyzer": "~4.5.0",
    "jasmine-core": "~3.3.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~4.0.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.0",
    "karma-jasmine": "~2.0.1",
    "karma-jasmine-html-reporter": "^1.4.0",
    "node-sass": "^4.12.0",
    "protractor": "^5.4.2",
    "ts-node": "~8.0.2",
    "tslint": "~5.12.1"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-geolocation": {
        "GEOLOCATION_USAGE_DESCRIPTION": "To locate you"
      },
      "cordova-plugin-statusbar": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-keyboard": {},
      "cordova-plugin-native-spinner": {},
      "cordova-plugin-datepicker": {},
      "cordova-plugin-telerik-imagepicker": {},
      "cordova-plugin-ionic-webview": {
        "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
      },
      "cordova-plugin-whitelist": {}
    },
    "platforms": [
      "android"
    ]
  }
}

I'll really appreciate some help here...

Zerok
  • 1,323
  • 1
  • 24
  • 56
  • 1
    I do not use cordova but you can try this if u haven't already, go to the android app manifest and add usesCleartexttraffic and set it to true maybe that will help. – Pemba Tamang Oct 03 '19 at 11:39
  • @PembaTamang thing is, all of this was working before, so I don't think that will help... anyways, how would I do that? I found the AndroidManifest.xml file, but I don't know how to put that property. – Zerok Oct 03 '19 at 11:48
  • 1
    check option 2 in this answer https://stackoverflow.com/a/50834600/8528047 – Pemba Tamang Oct 03 '19 at 11:50
  • @PembaTamang WOW, I actually didn't expect it to work... but it did! Thank you a lot buddy. You can post it as the definitive answer, and I'll confirm it as the good answer. – Zerok Oct 03 '19 at 11:56
  • yeah in api 28 and above cleartextTraffic is diabled by default. I'm glad it worked for you – Pemba Tamang Oct 03 '19 at 11:58
  • Check this solution https://stackoverflow.com/a/61846990/2971273 – Chevelle May 24 '20 at 18:07

1 Answers1

5

in api 28 and above cleartextTraffic is disabled by default. So it needs to be set to true in the manifest. add android:usesCleartextTraffic="true" in your manifest in the application tag. or define a network configuration file see more here https://developer.android.com/training/articles/security-config

Pemba Tamang
  • 1,235
  • 16
  • 38