-
-
Notifications
You must be signed in to change notification settings - Fork 860
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NetworkNoRetryImageProvider throws uncaught error if tile could not be loaded #1387
Comments
Hi @Chris1234567899, I think it is perfectly acceptable and correct to throw an error here. My caching plugin has the same behaviour, so does the one you linked. The reason is that there's not really a good alternative. It shouldn't crash the app, and you'll just have to ignore the error in Crashlytics. You can use your own tile provider and catch the errors if it really bothers you, or try adding an Of course, if you have an alternative, please let us know. @ibrierley Do you agree with this? |
@JaffaKetchup So in my opinion, it should be therefore the other way around: The default way should be no interruption/no uncaught error, and if some devs want to make a custom error feedback for the user, they already can do so through the parameters provided in the tile layer (error image + custom callback function). PS. the errorImage param does not prevent flutter_map to throw an uncaught error, if that is what you meant. I would be happy if this would be the case. |
Ok, for now I'll make it a feature request: it's not broken, it would just be better off changed. I guess we can write errors to an output stream the user can optionally listen to, that might make sense. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
This issue was closed because it has been stalled for 5 days with no activity. |
Hello, Same problem here, as I zoom in/out or pan, my console is spammed with the error Any leads to solve this ? |
Not quite sure from that if you want to fix the problem, or just suppress the error and which device that is on ? |
Both, but I don't think the connectivity issue comes from flutter_map (tell me if i'm wrong), so at least supress the error could be nice tho. It's on an iOS device (iPhone 13 pro max). |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
I have this same error |
I've realised that my suggestion in #1387 (comment) won't help: we still have to throw an error, even if we also call a callback or write to a stream. |
What is the bug?
When using a tile layer, but a tile could not be loaded (e.g. no internet connection), an uncaught error is thrown.
SocketException (SocketException: Failed host lookup: 'api.mapbox.com' (OS Error: No address associated with hostname, errno = 7))
Yes, I'm aware, I can deactivate
or click 10 times on continue, but that does not really solve the issue. Although the docs suggest people to build their custom tile providers, the default on should work out of the box.
What is the expected behaviour?
Don't break/interrupt the app and even more important: Since flutter treats it as uncaught exception, it is also spammed on Crashlytics.
How can we reproduce this issue?
Do you have a potential solution?
No response
Can you provide any other information?
It looks like it's pretty much the same issue like
Baseflow/flutter_cached_network_image#336 (comment)
See also:
#593
Platforms Affected
All Platforms
Severity
Erroneous: Prevents normal functioning and causes errors in the console
Frequency
Consistently: Always occurs at the same time and location
Requirements
flutter doctor
finds no relevant issuesThe text was updated successfully, but these errors were encountered: