[Touch ID Plugin] cordova is not defined

Forge Component
(14)
Published on 1 Apr by OutSystems R&D
14 votes
Published on 1 Apr by OutSystems R&D

Posting this here as advised. Original Post

I am experiencing very odd behaviour. I am trying to add the Touch Id Plugin. I have created a very rudimetary application to test how this plugin integrates. It simply runs the plugin to make sure it works.

So I generate an Android native application. Install the application on my phone. When I open the application for the first time the plugin works! Great this is the expected behaviour.

The problem occurs when I close the application and then launch it again. Now the plugin does not work. It reports 'cordova is not defined'

When I first install and run the application I can run a piece of javascript that will show me all the cordova plugins being used.

window.alert(JSON.stringify(cordova.require("cordova/plugin_list").metadata));

However, on closing and reopening the app this script causes an error which appears in the logs as '[ErrorScreen] cordova is not defined'

So why does cordova load and be available on the first run of the application? Should I be telling my application to load cordova in some way? I am clearly missing something?


Service Studio Version: 11.6.32

Android Version 9

Garrett Vernon wrote:

Posting this here as advised. Original Post

I am experiencing very odd behaviour. I am trying to add the Touch Id Plugin. I have created a very rudimetary application to test how this plugin integrates. It simply runs the plugin to make sure it works.

So I generate an Android native application. Install the application on my phone. When I open the application for the first time the plugin works! Great this is the expected behaviour.

The problem occurs when I close the application and then launch it again. Now the plugin does not work. It reports 'cordova is not defined'

When I first install and run the application I can run a piece of javascript that will show me all the cordova plugins being used.

window.alert(JSON.stringify(cordova.require("cordova/plugin_list").metadata));

However, on closing and reopening the app this script causes an error which appears in the logs as '[ErrorScreen] cordova is not defined'

So why does cordova load and be available on the first run of the application? Should I be telling my application to load cordova in some way? I am clearly missing something?


Service Studio Version: 11.6.32

Android Version 9


Hi Garrett,


I am using the same without any issues.

Just make sure that all dependencies are applied or not in your application. 


Please close and re run again. 

If the behavior is same, please send me OML file , I will check and help you with solution.