Ionic Storage not working on DevApp

Hello Community,

i using the sample from the docs. With “ionic serve” it works. Chrome displays the correct saved key/value pairs (as expected). If i used the DevApp it works ONE - time after the DevApp starts. But only if i used “storage.ready().then”. If i use it like in docs, nothing happened: “storage.get(key).then” not firing the promise.

In this Time, it seems that the plugin is loaded in the host app (DevApp) only one time. Cause the ready promise is not firing and ALSO the platform.ready only fires one time.

I create a injectable service that called a method “load” in the constructer. In “load” (currently is load only be called if storage.ready() is firing - as above for debug) i implemt it like the following:

   this.storage.get('data-rules').then((val) => {
      this.rules = JSON.parse(val); // for Debug, i know that documentation says: "any"
      if ((!this.rules) || (this.rules || this.rules.length == 0)) {
        this.rules = this.getDefaultRules();
      }
    }, (reason) => {  
      this.rules = root.getDefaultRules();
    });

Again: All works perfectly in my browser.

Anybody things like this? It ported the most of my projects to Ionic Pro and the newer Ionic Storage Module. Hours left, i have no idea how can i fix this :frowning:

Additional info:
My Device: Android 8, Google Pixel (1. Gen) XL
My Build System: Windows Terminal Server, (since 1 year (i used the old ionic view), i didnt want any build environment on my local machine, so USB debugging fails for me)

Thank you

1 Like

I’m having the same issue.

Any update?

try using events in this.platform.ready()

fire the event whenver you want and catching the event in platform ready()

Hey almobams, I’m new to Ionic 3 and I’m not following you :confused:

Hi,
The storage is not working on DevApp for me too.
I am reading the app language from the storage to translate the app at startup and it’s not working… But on the webpage ‘–lab’ it’s working.