Cordova App Error: The connection to the server was unsuccessful

After migrating to cordova 11 when I created a new app with android-targetSdkVersion set to 32, some of the mobiles were giving this error

The connection to the server was unsuccessful. (https://localhost/index.html).

Following entries in config.xml helped fix this problem.

<allow-navigation href="*" />
<content src="index.html"/>
<content original-src="index.html" />

Leave A Comment

Your email address will not be published.