3

I have an App developed with Cordova 8.1.2, and compiled under Android 8.1 Oreo API Level 27 Revision 3, successfully working on Play Store and with registered users.

During last weeks some users have been upgrading phones to Android 9.0 Pie and when they open the app and make register or login actions, they receive an ajax communication with server error.

I have try it in developer mode with android studio and Emulator with Android 9.0 Pie, and I get the same result. I made some tests with different ajax URLs and the ajax call never arrives to the server.

Someone with the same issue?

Here is error log in android studio:

2019-01-30 20:29:19.701 1921-1921/? E/netmgr: Failed to open QEMU pipe 'qemud:network': Invalid argument
2019-01-30 20:29:22.351 1754-1900/? E/storaged: getDiskStats failed with result NOT_SUPPORTED and size 0
2019-01-30 20:29:38.714 1925-2029/system_process E/memtrack: Couldn't load memtrack module

Ajax error view in console:


    {"readyState":0,"status":0,"statusText":"error"}

Angel González
  • 123
  • 1
  • 7

2 Answers2

3

Finally, I solved the issue. The problem is that in Android 9 Pie API 28 permit ajax calls to https services by default. There are to options:

  1. Make https calls in ajax URLs
  2. Adding exception for your http sites (view developer android)
Angel González
  • 123
  • 1
  • 7
  • can you explain how can I add this exception. I read the document you gave, but did not understand at all. – Razin Abid Jul 23 '19 at 13:55
  • See this post for solution https://stackoverflow.com/questions/54752716/why-am-i-seeing-neterr-cleartext-not-permitted-errors-after-upgrading-to-cordo – Vibin TV Jul 30 '19 at 10:39
0

You need to download the API 28 and update platform tools from the SDK manager i believe and recompile your app.

Eric
  • 9,870
  • 14
  • 66
  • 102