Connection closed before full header was received, uri = https://amazonS3UrlHere/img.jpeg

431 Views Asked by At
CachedNetworkImage(
  key: ValueKey('${widget.postImg}'),
  imageUrl: '${widget.postImg}',
  width: double.infinity,
  fit: BoxFit.cover,
  placeholder: (context, url) => imagePlaceholder(),
 ),

All I have to show is a list of images in the App. I get imageUrl from AWS S3 bucket. When I scroll, in a random image load flutter gives this error, and the whole app crashes.

Connection closed before full header was received, uri = https://amazonS3UrlHere/img.jpeg

I tried so many solutions. Use FadeInImage.memoryNetwork, CachedNetworkImage, change image request URL https to http but nothing worked for me. I suspect the issue is with the AWS S3 bucket but cannot figure it out how to solve the issue. I would be grateful if anyone could help me with this issue.

0

There are 0 best solutions below