-
- Notifications
You must be signed in to change notification settings - Fork 75
Description
What is the bug?
I sometimes see this error in Crashlytics. I have added exception handling, but the error somehow still slips through to Crashlytics. What is the proper way to catch this, so it is not reported to Crashlytics?
Non-fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: FMTCBrowsingError: Failed to load the tile from the cache or the network because it was missing from the cache and the server responded with a HTTP code other than 200 OK.. Error thrown Instance of 'ErrorDescription'.
at FMTCImageProvider._loadAsync.finish(image_provider.dart:106)
at FMTCImageProvider._loadAsync(image_provider.dart:166)
What is the expected behaviour?
I think the error is expected, but I should be able to catch it, so it is not reported to Crashlytics. I am using the errorTileCallback on the TileLayer:
tileBuilder: (BuildContext context, Widget tileWidget, Tile tile) { if (tile.loadError) { // apply red colorFilter or wrap widget with another custom Widget return Container(color: AppColors.mapBadTile); } return ColorFiltered( colorFilter: notifier.isMapDarkModeEnabled ? MapUtils.colorFilterDark : MapUtils.colorFilterNone, child: tileWidget); }, evictErrorTileStrategy: EvictErrorTileStrategy.dispose, errorTileCallback: (Tile tile, error) { if (error != null) { debugPrint(error.toString()); } }, How can we reproduce this issue?
Seems to happen sometimes when there is no internet connection, but I do not know how to reliably force the error.Do you have a potential solution?
No response
Can you provide any other information?
No response
Platforms Affected
Android
Severity
Minimum: Allows normal functioning
Frequency
Rarely: Occurs every so often
Requirements
- I agree to follow this project's Code of Conduct
- My Flutter/Dart installation is unaltered, and
flutter doctorfinds no relevant issues - I am using the latest stable version of this package
- I have checked the FAQs section on the documentation website
- I have checked for similar issues which may be duplicates