You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every week I receive a Sentry report that is flooded by SocketException: Failed host lookup: 'static.openfoodfacts.org'.
For instance, this week 2 of the top 3 Sentry errors were that type of error (like https://openfoodfacts.sentry.io/issues/4209456223/?notification_uuid=5e3ad9a2-7d25-4008-a32b-011d33135270&project=5376745&referrer=weekly_report)
Let's assume that the server is mature enough and does not need Smoothie Sentry errors to know when it's down.
By clearing those "failed host lookup" errors, the weekly report would make more sense, and we would be able to detect less frequent but more interesting errors.
Proposed solution
It looks like it affects specifically static.openfoodfacts.org. That's typically where we retrieve svg files (like "vegetarian" icon).
And in that case that's particularly stupid to have an error (reported by Sentry or not) because we have a local fallback icon anyway.
The solution would be to replace our unique SvgPicture.network( call (in svg_cache.dart) by something more robust if the network lookup fails. Something like we try-catch the download of the svg data and then display that data - and if there's a SocketException: Failed host lookup: 'static.openfoodfacts.org' we don't send a call to Sentry.
The text was updated successfully, but these errors were encountered:
Additional thought: whatever solution we implement should cache the (successful) results, as SvgPicture.network does.
The cache should last as long as the app. For instance with static fields.
If we cache longer we may not be able to get the server icon changes.
Problem
Every week I receive a Sentry report that is flooded by
SocketException: Failed host lookup: 'static.openfoodfacts.org'
.For instance, this week 2 of the top 3 Sentry errors were that type of error (like https://openfoodfacts.sentry.io/issues/4209456223/?notification_uuid=5e3ad9a2-7d25-4008-a32b-011d33135270&project=5376745&referrer=weekly_report)
Let's assume that the server is mature enough and does not need Smoothie Sentry errors to know when it's down.
By clearing those "failed host lookup" errors, the weekly report would make more sense, and we would be able to detect less frequent but more interesting errors.
Proposed solution
It looks like it affects specifically
static.openfoodfacts.org
. That's typically where we retrieve svg files (like "vegetarian" icon).And in that case that's particularly stupid to have an error (reported by Sentry or not) because we have a local fallback icon anyway.
The solution would be to replace our unique
SvgPicture.network(
call (insvg_cache.dart
) by something more robust if the network lookup fails. Something like we try-catch the download of the svg data and then display that data - and if there's aSocketException: Failed host lookup: 'static.openfoodfacts.org'
we don't send a call to Sentry.The text was updated successfully, but these errors were encountered: