signalpoint commented on issue #802: URL: https://github.com/apache/cordova-android/issues/802#issuecomment-1092350400
I am experiencing a very similar issue. Cookies from the web server are not being saved with cordova and android. My last publication to Google Play was in February of 2021. At that time, I had no issues with cookies, cordova and android. Based on that timing, and the fact that this issue here was created in August of 2019, I was skeptical of the suggestions mentioned above, and unfortunately using `window.cordova.plugins.CookieManagementPlugin.flush();` is **not** working for me. I came across the blog post announcing [Cordova Android 10](https://cordova.apache.org/announcements/2021/07/20/cordova-android-10.0.0.html), which mentions **WebViewAssetLoader Support** and: > ... this is a breaking change that will cause data associated with the file:// scheme, such as cookies, ..., to be lost. They mentioned you can revert this change by adding this to the `config.xml` file: ``` <preference name="AndroidInsecureFileModeEnabled" value="true" /> ``` **That fixed it for me!** *However*, I am worried that once I try to publish the application to Google Play it will be rejected because the blog post says: > Setting this flag will keep the content on the file:// scheme, which Google reports to be insecure. I will return here and update my comment when I find out. I hope this is helpful to others! -- 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]
