breautek commented on issue #1840: URL: https://github.com/apache/cordova-android/issues/1840#issuecomment-3246306055
### CORS I would first suspect CORS. The server must be configured to permit cross-origin requests. That means the server should respond the `OPTIONS` request, (which the browser will automatically send, when applicable) in addition to the main request. Both requests should include `Access-Control-X` headers. The main one is `Access-Control-Allow-Origin` but there is a variety of them depending on your needs. I have more information on CORS [here](https://breautek.com/articles/enabling-cors.html), you can check your server response headers to see if they are including Access-Control headers in their responses. ### Debuggable I would suspect this has less to do with "It doesn't work from Play store" and more on it doesn't work on release builds, because I assume you're using a development server on dev/debug builds, and a production server on release builds. By default, cordova will disable chrome dev tools access on release builds, but you can enable them by including `<preference name="InspectableWebview" value="true" />`. This should work on Android, and iOS 16.4+ (enabling the inspector on release builds was not possible before 16.4). With this preference you can build and run your app in release mode and still get access to the webview console: `cordova run android --release`. For iOS I think you would need to at least deploy to testflight, or deploy an ad-hoc ipa. Definitely more complicated than Android. Just don't forget to remove the preference if you don't want end users to be able to open the remote dev tools. This might give you more insight on what is actually happening. -- 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]
