Open stefcon opened 6 months ago
I'm also having issues with the package overflowing my crashlytics service.
Likely there's somewhere in the code that we're not handling exceptions across an async boundary, causing exceptions to go to the default exception handler. https://dart.dev/libraries/async/futures-error-handling#potential-problem-failing-to-register-error-handlers-early
A couple of options come to mind:
PlatformDispatcher.instance.onError = ...yourhandler
https://docs.flutter.dev/testing/errors#handling-all-types-of-errorsThank you very much for the response, that workaround seems reasonable for now. The following works for me to suppress the errors (and in my case, let integration tests now pass with a zero exit code). Very nice to finally be rid of the errors.
// flutter pub add executor_lib
import "package:executor_lib/executor_lib.dart";
void main() async {
FlutterError.onError = (details) {
// Flutter map currently has a bug with async vector tile loading. On
// cancellation (i.e. when a request for a tile has been sent but its result
// is no longer necessary), a CancellationException is throw and not
// properly handled. Silently ignore this exception type.
if (details.exception is CancellationException) {
return;
}
FlutterError.presentError(details);
};
return runApp(...);
}
Whenever I do fast zoom in/out, I'm getting following error:
I saw that in latest release note for 7.3.1 it is noted that it has something to do with that:
The problem is that visibly slows down the map when it happens, and in addition it also overflows my crashlytics service. Is there some way that this is supposed to be handled outside the library and is it something that is being worked on currently? Also, If someone would like to explain why this feature is now being handled this way and what it enables generally would be great.