possible fuse storage regression on device

i’m saving the value of my token in the local storage , and try the perform some task using it, it perfectly works on local preview preview, but fail on device for both iOS and android.

my saving and load function is specified in a separed file in my lib folder

var Storage = require("FuseJS/Storage");

// save storage 
function saveStorage(savedata, json){
  return new Promise(function(resolve, reject) {
    Storage.write(savedata, json).then(function(results){
      resolve(results)
    })
  });
}

// load function
function loadFromStorage(data){
  return new Promise(function(resolve, reject) {
    Storage.read(data).then(function(results){
      resolve(results)
    })
  });
}

this is how i try to load into my main view , to see if in the storage i have a token

var storage = require("lib/storage")


 function loadToken(){
  storage.loadFromStorage("AuthToken").then(function(results){
    if(!results){
      router.goto("Walkthrough")
    }else{
      router.goto("Home")
    }
  })
}

it works perfectly in local preview , but for both iOS and android it fail

Fuse version: 0.37
MacOS

Exactly how does it “fail”?

Is there an error message of any kind when you run the previews?

Have you added console.log() statements somewhere to try and figure out if/when data gets written or read?

Any other important details that you could share?

Related: you should consider using FileSystem module instead of Storage.