Encountering an issue with AJAX calls failing in release mode on Android but working fine on iOS. The error message seen in Chrome Dev Tools is:
Provisional headers are shown
Request URL:https://server.com/api/index.php?ticket=ST-111111-ABCDEFG-cas
Request Headers
Provisional headers are shown
Content-Type:application/x-www-form-urlencoded; charset=UTF-8
Origin:file://
User-Agent:Mozilla/5.0 (Linux; Android 6.0; Google Nexus 5 - 6.0.0 - API 23 - 1080x1920 Build/MRA58K) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/40.0.0.0 Mobile Safari/537.36
Query String Parametersview sourceview URL encoded
ticket:ST-111111-ABCDEFG-cas
Form Dataview sourceview URL encoded
request:{"param1":"val1","param2":"val2"}
The issue persists when running the app in Debug mode and even after updating Cordova to the latest version. Current tool versions include:
- Node version: v4.4.3
- Cordova version: 6.2.0
- [email protected]
- Android SDK up to date
Config.xml settings include:
<allow-navigation href="*" />
<access origin="*" />
<allow-intent href="*" />
Whitelist plugin being used:
<plugin name="cordova-plugin-whitelist" spec="1" />
Additionally, a meta tag has been set in the index.html file:
<meta http-equiv="Content-Security-Policy" content="default-src *; img-src 'self' data:; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">
Any other important Cordova settings that might have been missed?
Tried removing and re-adding Android platform, as well as updating all plugins but still facing the same Ajax error.
Your assistance would be greatly appreciated.