Plugin secure-storage-echo doesn't work on resume activity

I have trouble using the secure storage echo plugin from When the app loads, the plugin works fine. But when the app is sent to background (paused activity), and again resumed (resume activity), the plugin works randomly (mostly doesn’t). It doesn’t even respond with error. It just hangs. I given below some example code for your reference:

document.addEventListener("deviceready", onDeviceReady, false);

function onDeviceReady() {
  // Cordova is now initialized. Have fun!

  console.log("Running cordova-" + cordova.platformId + "@" + cordova.version);

  var ss = new cordova.plugins.SecureStorage(
    function () {
    function (error) {
      console.log("Error " + error);

When the app starts, I get a success message in the console. But when send to background (using back button), and restarting (by clicking on app icon), the success message rarely is displayed in the console. Please help. Any work arounds are welcome too.