isar / isar/hive

Flutter webapp show blank screen on Safari "Private browsing mode" caused by "Hive.openBox() " is not be executed.

Open
#694 1 comment 0 reactions 0 assignees View on GitHub
problem
Dominant language
Dart
Stars
4.4k
Forks
449
PR merge metrics
No merged PRs in 30d

Description

**Steps to Reproduce**
- Just init a flutter project with Hive database as normally
`var box = await Hive.openBox('testBox');`
- Build flutter webapp in release mode
- Open the webapp on the safari "Private browsing mode"
- The web will display a blank screen
- In the console log, I saw the app stuck on that line `var box = await Hive.openBox('testBox');`
- If we wait for a litter, and reload the browser -> the Hive box could open, and the app run as normal.
- I think in private browsing, the indexed database needs a litter time to create. So the first time the code will not work.

**Code sample**
```
var box = await Hive.openBox('testBox');
```

**Version**
- Platform: iOS, Mac
- Flutter version: 2.0.0
- Hive version: 2.0.4

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.