jonataslaw / get_storage

A fast, extra light and synchronous key-value storage to Get framework
MIT License
369 stars 83 forks source link

Corrupted box, recovering backup file #63

Open thealteria opened 3 years ago

thealteria commented 3 years ago

Getting "Corrupted box, recovering backup file" error in log and not getting any saved values after upgrading getx.

AndsteLyc commented 3 years ago

Me to...

AndsteLyc commented 3 years ago

Me to...

I use GetStorage().read() before GetStorage.init()

thealteria commented 3 years ago

OK so I guess I know why I faced it. Basically I made different boxes/containers like GetStorage('box1') and GetStorage('box2') but was only initializing the GetStorage.init(). Now I'm using only single container with no container name and it's working fine.

Technorocker commented 2 years ago

I too keep getting this error in the console when I restart the app. Is anyone still looking at this issue?

thealteria commented 2 years ago

It's been more than a year and this issue is still open

kobe-victoremanuel commented 1 year ago

I was getting the error by doing:

await GetStorage.init();
final box = GetStorage('label');

But I resolved after changing to:

await GetStorage.init('label');
final box = GetStorage('label');
sina8013 commented 2 months ago

OK so I guess I know why I faced it. Basically I made different boxes/containers like GetStorage('box1') and GetStorage('box2') but was only initializing the GetStorage.init(). Now I'm using only single container with no container name and it's working fine.

Really thank you, it works :)

milescui commented 1 month ago

I solved it. The reason is that WidgetsFlutterBinding.ensureInitialized() is called in GetStorage.init(). If you also call WidgetsFlutterBinding.ensureInitialized() in the main function, this error will occur when the app restarts