question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Data not cleared on Android

See original GitHub issue

I have logout function which I try to clear all storage data and they are not cleared.

logout() {
        this.storage.clear().then((data) => {
			console.log(data);
		})
    	this.storage.remove('token');
   	this.storage.remove('profile');
   	this.storage.remove('login');
};   

In fact when I debug with chrome://inspect#device I don’t see any data but they are loaded.

Ionic Storage driver: cordovaSQLiteDriver   SQLitePlugin.js:175 
OPEN database: _ionicstorage      SQLitePlugin.js:106 
new transaction is waiting for open operation     SQLitePlugin.js:179 
OPEN database: _ionicstorage - OK   SQLitePlugin.js:80 
DB opened: _ionicstorage         SQLitePlugin.js:80 

I don’t see any data. In chrome web it works but not on android. screen shot 2016-12-05 at 22 12 34

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:14 (1 by maintainers)

github_iconTop GitHub Comments

16reactions
KrunchMuffincommented, Jul 27, 2017

I got it to clear now. THis is what I did. in config.xml

    <preference name="InAppBrowserStorageEnabled" value="false" />
    <platform name="android">
        <edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application">
            <application android:allowBackup="false" />
            <application android:fullBackupContent="false" />
        </edit-config>
   ...
   </platform>

and I also implemented the clear() method from ionic even tho I was removing each item already. https://ionicframework.com/docs/storage/#clear

3reactions
xpagliosacommented, Jul 22, 2017

Include android:allowBackup=“false” android:fullBackupContent=“false” in <application> section of AndroidManifest.xml

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix a Fitbit showing a red X with data not cleared sync and ...
For Android users, clear the Fitbit app's cache in Settings > Apps > Fitbit > Storage & cache > Clear cache. Close or...
Read more >
Solved: Versa Lite shows a "Data not cleared sync & try ag...
Solved: My fit bit versa lite is showing a red X and the message: Data not cleared Sync & try again message. I...
Read more >
[Solved] Fitbit Versa 2 Data Not Cleared Sync and Try Again?
Method 5: Clear Your Bluetooth Cache. If you are an Android user, it's possible for you to repair the “data not cleared sync...
Read more >
What Does It Mean When Your Fitbit Says Data Not ...
The message Data not erased, Sync & Try again frequently occurs when you attempt a factory reset without first removing your watch from...
Read more >
How to fix Fitbit Versa 2 “Data not cleared sync and try again ...
... showing you how to fix Fitbit Versa 2 saying “ Data not cleared sync and try again.” I do not know if...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found