Cordova undefined when AndroidInsecureFileModeEnabled set to false

Using cordova android version 12 via voltbuilder.

Currently trying to fix a google recaptcha issue on android where google returns invalid domain. This happens when AndroidInsecureFileModeEnabled is set to true and the origin is file:///. When set to false, the domain becomes ‘https’ and recaptcha works fine but cordova is undefined inside the project causing non of my plug-ins to work.

Why does cordova become undefined and any way this can be fixed?

I think we might need to know a little more about your project to say for sure. You shouldn’t need AndroidInsecureFileModeEnabled just to access cordova. How are you referencing cordova.js in your index.html?