We're getting database is locked errors during testing and usage.
This seems to be happening because Dart doesn't support reading and writing concurrently and our usage of Isolates for threading in our library is not correct.
Currently we have a rudimentary hack in place in rollbar_infrastructure.dart:
static Future<bool> _process(dynamic message) async {
// HACK: This delay helps to avoid occasional sqlite's "db locked" errors/exceptions.
// Keep it until we figure out why sqlite has these errors randomly:
await Future.delayed(Duration(milliseconds: 25));
...
This doesn't fix the issue and it should go, too, and a proper fix should be found.
We're getting
database is locked
errors during testing and usage.This seems to be happening because Dart doesn't support reading and writing concurrently and our usage of Isolates for threading in our library is not correct.
Currently we have a rudimentary hack in place in
rollbar_infrastructure.dart
:This doesn't fix the issue and it should go, too, and a proper fix should be found.
Errors are similar to these: