FranGhe opened a new issue, #1840:
URL: https://github.com/apache/cordova-android/issues/1840
I created an app and it has been published and working for a long time now.
I'm sure the app always worked until at least July 26th and after that date
no new changes were made except to change the version (I had to republish a new
version for iOS just to update the policy).
The app has just been created that when you start it makes an ajax call to
the server to retrieve information and content.
They told me that this doesn't happen, so when I investigated I noticed that
everything works correctly from development, but when published it doesn't.
These are the features
**Cordova Platform:**
> Android 14.0.1
**Cordova Plugin:**
> cordova-android-play-services-gradle-release 4.0.0
"cordova-android-play-services-gradle-release"
> cordova-background-geolocation-plugin 2.3.3
"cordova-background-geolocation-plugin"
> cordova-clipboard 1.3.0 "Clipboard"
> cordova-open-native-settings 1.5.5 "Native settings"
> cordova-plugin-androidx-adapter 1.1.3 "cordova-plugin-androidx-adapter"
> cordova-plugin-app-version 0.1.14 "AppVersion"
> cordova-plugin-camera 8.0.0 "Camera"
> cordova-plugin-device 3.0.0 "Device"
> cordova-plugin-dialogs 2.0.2 "Notification"
> cordova-plugin-file 8.1.3 "File"
> cordova-plugin-firebasex 18.0.7 "Google Firebase Plugin"
> cordova-plugin-geolocation 5.0.0 "Geolocation"
> cordova-plugin-globalization 1.11.0 "Globalization"
> cordova-plugin-inappbrowser 6.0.0 "InAppBrowser"
> cordova-plugin-insomnia 4.3.0 "Insomnia (prevent screen sleep)"
> cordova-plugin-network-information 3.0.0 "Network Information"
> cordova-plugin-screen-orientation 3.0.4 "Screen Orientation"
> cordova-plugin-statusbar 4.0.0 "StatusBar"
> cordova-plugin-x-socialsharing 6.0.4 "SocialSharing"
> cordova-support-android-plugin 2.0.4 "cordova-support-android-plugin"
> cordova.plugins.diagnostic 7.2.3 "Diagnostic"
> es6-promise-plugin 4.2.2 "Promise"
**confg.xml**
```
<content src="index.html" />
<access origin="*" />
```
**Ajax Request Example**
```
function checkConnection(){
$.ajax({
url: ServerBaseUrl+"/switch.php",
type: "post",
data: {FUNC:"test"},
error: function(jqXHR, exception) {console.log("checkConnection ->
BAD Connection");},
success: function(result) {console.log("checkConnection -> GOOD
Connection");},
timeout: 1000
});
}
```
**file switch.php on Server**
```
<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);
ini_set("safe_mode","Off");
ini_set("allow_url_fopen", "1");
date_default_timezone_set("Europe/Rome");
error_log("Bingo");
switch ($_REQUEST["FUNC"]) {
case 'test':
error_log("test");
die(true);
break;
default:
error_log("error");
die();
}
```
---------
If I start the app in development I see the php log "Bingo" on the server
and I see in the console checkConnection - > GOOD Connection (in
chrome://inspect/#devices ).
If I launch the app published and installed via PlayStore, obviously I can’t
see the console and on the php side I don’t have any reports from the error_log.
Any indication ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]