isar / isar/hive

"Hive.openBox() "will not be executed down on dingTalk webview(IOS 14.6)

Open
#685 1 comment 1 reaction 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**
open flutter web url on dingTalk webview( IOS 14.6 ).
![image](https://user-images.githubusercontent.com/27715452/120665860-b8e86380-c4be-11eb-9040-ace2140163e8.png)

When the program is executed to "Hive.openBox()", the program will not be executed down。
"Try catch" does not catch the error,and the code in "finally" will not be executed

**Code sample**
```
static List errorList = [];
static init() async {
errorList.add('13.1');
var path;
errorList.add('13.2');
Hive.init(path) ;
InitUtils.errorList.add('13.3');
try {
errorList.add('13.4 : ${Hive.isBoxOpen(_boxName)}');
if (Hive.isBoxOpen(_boxName) == false) {
_box = await Hive.openBox(_boxName).catchError((error) {
errorList.add('13.5 error:$error');
});
}
} catch (e) {
errorList.add('13.6 error:$e');
} finally {
errorList.add('13.7 finally');
}
errorList.add('13.8');
}

onTap() async {
await init();
/// Loading the page for the first time : [13.1,13.2,13.3,13.4 : false,]
/// Print after refreshing the page : [13.1,13.2,13.3,13.4 : false,13.7 finally,13.8]
print(errorList.toString())
}

```

**Version**
- Platform: Web(Flutter Web on IOS 14.6)
- Flutter version: [2.2.0 stable]
- Hive version: [2.0.4]

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the reported init() flow and reproduce the hang by opening the Flutter web URL in DingTalk's iOS 14.6 webview, focusing on the await Hive.openBox(_boxName) call. Done means the call completes or reports a catchable failure, with the try/catch/finally sequence behaving as shown by the errorList output.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.