Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[web] I can't clear hive boxes on flutter web #1039

Closed
Macacoazul01 opened this issue Jul 22, 2022 · 11 comments · Fixed by #1041
Closed

[web] I can't clear hive boxes on flutter web #1039

Macacoazul01 opened this issue Jul 22, 2022 · 11 comments · Fixed by #1041
Labels
problem An unconfirmed bug.

Comments

@Macacoazul01
Copy link

I'm using hive on more than one project and not being able to clear all the boxes is some sort of a security bug on my context.

Everytime a user logs out the app, the data from the person should be wiped out of the phone/navigator...

And the ideal way should be deleting all content from the boxes with Hive.deleteFromDisk();

Maybe it's related to #1028

Currently using:
hive: 2.2.3
flutter: 3.0.5

My flutter doctor:

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.0.5, on Microsoft Windows [versao 10.0.22000.795], locale pt-BR)
[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[√] Chrome - develop for the web
[X] Visual Studio - develop for Windows
    X Visual Studio not installed; this is necessary for Windows development.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2021.2)
[√] VS Code (version 1.69.2)
[√] Connected device (3 available)
[√] HTTP Host Availability

! Doctor found issues in 1 category.

Sample project with the error:
hiveerror.zip

@Macacoazul01 Macacoazul01 added the problem An unconfirmed bug. label Jul 22, 2022
@Macacoazul01
Copy link
Author

Macacoazul01 commented Jul 22, 2022

maybe also related to:
#989
#961
#749
#799 (not sure)
@themisir @TheOneWithTheBraid

@Macacoazul01
Copy link
Author

Not sure on which one is the error or if it's in both, like Techno-Disaster said that is happening on more platforms than web

\hive\hive\lib\src\backend\vm\backend_manager.dart

\hive\hive\lib\src\backend\js\native\backend_manager.dart

@TheOneWithTheBraid
Copy link
Contributor

Have you got some more logs and stack traces?

@TheOneWithTheBraid
Copy link
Contributor

Okay, seems like the bug is caused by missing TupleKeys. I'll quickly place a MR.

TheOneWithTheBraid added a commit that referenced this issue Jul 22, 2022
Fixes: #1039

Signed-off-by: TheOneWithTheBraid <[email protected]>
TheOneWithTheBraid added a commit that referenced this issue Jul 22, 2022
Fixes: #1039

Signed-off-by: TheOneWithTheBraid <[email protected]>
@Macacoazul01
Copy link
Author

@TheOneWithTheBraid is this fix already published on pub?

@Lorenzobettega
Copy link

@TheOneWithTheBraid I'm with the same error and saw that the bug is already fixed, please can you published this on pub?

@anilthapa1939
Copy link

is this issue fixed yet? because i am still facing the same issue.
--versions
hive 2.2.3
Flutter 3.3.10

@Macacoazul01
Copy link
Author

@anilthapa1939 this is maybe on the new dev version

@themisir any expectations on when it'll be released?

@anilthapa1939
Copy link

@anilthapa1939 this is maybe on the new dev version

@themisir any expectations on when it'll be released?

@themisir any update?

@themisir
Copy link
Contributor

themisir commented Mar 7, 2023

nope, i am out of loop with this issue and hive web after the latest updates. i can only help with the native implementation, hive web is out of my expertise. is there something that's not been pushed to pub.dev or needs to be fixed?

@Macacoazul01
Copy link
Author

The #1041 wasn't published yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem An unconfirmed bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants