How to prevent [Invalid argument(s): No host specified in URI null] error
🐛 Bug Report
How can I prevent Invalid argument(s): No host specified in URI null, When the network resource is invalid. (Sometime the server error)
Also every time throw error message occur will record to firebase crashanalytic
My app also encounter my local image load laggy when go to new page or back to previous page, it will throw this error in my debug console.
Yes, i am also facing the same issue.
Even though i have provided the error widget.
CachedNetworkImage( placeholder: (_,__)=>imageLoadingWidget(), errorWidget: (context,_,__)=>SizedBox.shrink(), imageUrl: '', width: double.infinity, height: 140, fit: BoxFit.cover, )
Same problem here, fixed by manually check URL is valid.
@laeo My url is valid but the resource is invalid which mean sometime my server side will throw an internal server error(5xx) or 404 not found.
求解 我也遇到这个问题了
这个问题 我解决了;我当返回上一个界面时,上个界面需要刷新的图片控件使用的GetBuilder来处理刷新 就不会有问题了;以下是我的代码示例: GetBuilder<ConfigPublic>( init: ConfigPublic.to, initState: () {}, builder: () => ConfigPublic.to.isLogin ? Container( width: 115.r, height: 115.r, decoration: ViewUtil.boxRoundedBackground( radius: 38.r, borderColor: ColorResPublic.main_color, borderWidth: 5.r), child: controller.imgLoad.loadImg( "${ConfigPublic.to.userInfo.userIcon}", width: 110.r, height: 110.r, circular: 33.r, errorWidget: WidgetPublicUtil.getAppLogoWid(88.r)), ) : Image.asset(ImgResPublic.iv_def_user_avatar, width: 115.r, height: 115.r))
Any updates here?
I face same problem when server return 404 error, app is freeze and I must restart app manually, even when I use errorWidget.
Me too, same problem
Im also getting same issue, Sometimes when i open the app just show a white screen for 1 seconds and close, When i check the crashlytics i found this exception:
Im using cached_network_image: 3.2.3
I have addressed the same thing and summarized it in this thread hopefully it will help someone.
https://stackoverflow.com/a/77195058/13910996