AndroidInsecureFileModeEnabled prefrence not working
See original GitHub issueBug Report
Problem
After Cordova 10 release Cordova added WebViewAssetLoader support which can cause data associated with the file://
scheme, such as cookies, local storage, local cache, and web-based databases
But if we set AndroidInsecureFileModeEnabled to true according to docs(https://cordova.apache.org/announcements/2021/07/20/cordova-android-10.0.0.html) it will work like earlier which is not working for me
Due to this I am facing cookies issue
What is expected to happen?
After setting AndroidInsecureFileModeEnabled preference to true in config.xml it should work like old one
Information
Command or Code
<preference name="AndroidInsecureFileModeEnabled" value="true" />
Environment, Platform, Device
Version information
Cordova-android@10.0.1
Checklist
- I searched for existing GitHub issues
- I updated all Cordova tooling to most recent version
- I included all the necessary information above
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
cordova 10 has CORS issue with allowList - Stack Overflow
AndroidInsecureFileModeEnabled set to true puts you back to file:/// scheme, as it was before cordova-android 10. There are no security issues, ...
Read more >Config.xml - Apache Cordova
See the preference element of plugin.xml for more details on CLI variables. ... Use with caution, this may cause compatibility issues with web...
Read more >CORS issue when testing on Android - Auth0 Community
... name="AndroidInsecureFileModeEnabled" value="true" />. It appears that the CORS issue was related to a local development problem and the ...
Read more >[GitHub] [cordova-android] pawan-logiciel opened a new ...
Bug Report ## Problem After Cordova 10 release Cordova added ... After setting AndroidInsecureFileModeEnabled preference to true in ...
Read more >Monaca HTML5 Resource Encryption
When using this plugin, the following options in config.xml are not available for Android. <preference name="AndroidInsecureFileModeEnabled" value="true" /> ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks. cordova-android@10.1.0 It’s works fine for me.
This ticket does not give enough Information.
At best, I can only recommend upgrading to the latest
cordova-android@10.1.0
and try again.If you still have the issue after upgrading, try and provide more Information.
For example, provide the information that comes from the network & application tab of the DevTools and make sure its from both the working and non-working app. Both should show that the
index.html
is loading fromfile:///android_asset/www/index.html
… Application tab should also show that it is reading fromfile://
for the cookies, etc. If you see it checkingfile://
but there are no cookies, it probably means Android wiped out the information for more space.Make sure to also test with
10.1.0
as it might have fixed that area.