Flutter_cached_network_image: If the url leads to 404, app crash

Created on 13 Sep 2019  ·  6Comments  ·  Source: Baseflow/flutter_cached_network_image

If I use the wrong url or the image url from server is not found, the app will crash

Most helpful comment

They may response slowly. The solution I can think out is that backend developers detect image not found and 301 jump to default image url.
This is a trick and temporary solution.

All 6 comments

Same issue happening with me. I am about to submit the app to client for review and they have removed some urls from api. Now the images are 404 and this plugin does not handle 404 exception.

They may response slowly. The solution I can think out is that backend developers detect image not found and 301 jump to default image url.
This is a trick and temporary solution.

Not just 404, along same line, 403 crash app as well.

D/Error (25502): Caused by: com.kiwi.fluttercrashlytics.FlutterException: HttpException: No valid statuscode. Statuscode was 403 D/Error (25502): at BaseCacheManager.getFile(package:flutter_cache_manager/src/cache_manager.dart:120) D/Error (25502): at CachedNetworkImageState._animatedWidget(package:cached_network_image/src/cached_image_widget.dart:270) D/Error (25502): at CachedNetworkImageState.build(package:cached_network_image/src/cached_image_widget.dart:196)

So when would this bug be fixed? it seriously hindered me from using this awesome package.

When will we get a fix?

grouping this in #273

Was this page helpful?
0 / 5 - 0 ratings

Related issues

digitaldangal picture digitaldangal  ·  5Comments

srburton picture srburton  ·  6Comments

sososdk picture sososdk  ·  5Comments

creativecreatorormaybenot picture creativecreatorormaybenot  ·  4Comments

lifetin picture lifetin  ·  7Comments