-
-
Notifications
You must be signed in to change notification settings - Fork 656
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
HttpException: No valid statuscode. #273
Comments
This should be improved in 1.1.2, could you try to verify that? |
Hello, we're building our App based on your pretty cool plugin ! Thanks for the hard work btw :) We are running into the same issue: we're loading AWS S3 pictures dynamically, and when the picture doesn't exist, AWS S3 returns an HTTP 403 error (not 404). Upgrading from 1.1.0 to version 1.1.3 didn't solve the issue :( Here is the error displayed in the logs:
The issue is that the exception is handled and logged by the plugin, so we don't have a way to handle it in our App if we wanted to. Additionally, because there are a lot of pictures trying to be loaded and they fail to load, the plugin retries to download them every time the widget rebuilds, ending in:
The solutions we can suggest are to:
Cheers! |
I'm having this issue as well. Any ETA or plans to get it fixed? |
No sorry, I don't have an ETA for it. I first have to find out why it fails. |
We should be able to handle the errors ourselves. |
It makes no sense to fail on a 404, or what ever HTTP response other than 200, this is just really annoying to simply through an exception without notifying the caller, it just makes no sense and really just because of this issue i started to consider other frameworks to use rather than Flutter, even though i love it! |
This should be fixed in the latest flutter version. Stable release will probably this week |
@vanlooverenkoen how did the Flutter framework fix this? What was the PR or issue for it? |
This is fixed in the Flutter framework: So flutter_cached_network_image should probably update the implementation as well. |
I guess this should partly fix it for the ImageProviders, but I'm not sure if it really fixes the issues mentioned here. |
You can already test this on beta. I did some testing. Our errors removed after using beta, dev or master |
So is this fixed now? Because I'm still getting this error |
@netgfx do you get the errors when using the imageprovider or 2.3.0-beta? |
I'm using latest stable Using it like this:
When the url pulls a 404 the App crashes or in dev uncaught error is thrown. |
It really crashes? I wouldn't expect that, you see it crashing? |
Sometimes it crashes and other times (usually in debug mode) any other loading fails if one comes 404, all I see are spinners from that point on. I will try the beta versions and post results. |
@renefloor When I use the beta.1 I get the following error:
I have the image inside a ListTile like this:
|
This is not related to the HttpException, and thus offtopic, but you can just add a sized box right? Didn't you have this problem with 2.2.0? |
Yes sorry for offtopic just thought it was useful to mention. No that issue didn't exist with 2.2.0 and frankly it shouldn't have because I'm already setting specific dimensions. |
I think I can fix that size issue soon. (See Baseflow/octo_image#7) For now you could disable 'break on uncaught exceptions' in the debugger settings. |
@aaironman Can you try without the decoration? And basically without the image builder altogether. |
@netgfx It doesn't work for me.Like this: |
It should really, because it doesn't need the image builder, the simplest example is:
but does it throw the 404 error? |
I am testing Here is my code:
|
Why is this closed? Is still happening, even with ^2.3.0-beta.1+1 |
it still happened. I am on version cached_network_image 2.3.1 |
@ssbaval could you please reopen this issue? |
@raphaaugustosilva can you give me a small piece of code to reproduce the issue? For example the example url that @kauaicreative gives also results in a 404 when used in the browser. When giving a 404 the image should show the error widget. If that is not happening it is indeed a bug, but the fact that some urls are not valid is not a bug of the package. |
Hi @renefloor. |
I back to cached_network_image: ^2.2.0+1 this issue is gone. |
cached_network_image: ^2.3.2+1 |
Having same issue on cached_network_image: ^2.3.2+1 with Flutter 1.20.4 This happens when I have a number of 404 image urls and I scroll too fast and move up in a list. Its very annoying otherwise the package is pretty cool! Please provide a fix as soon as possible ! |
I am having same issue too. This issue is happening for a very long tme but still it exsists. |
But I noticed that this issue was gone until I have updated to latest flutter version. I will try to downgrade in upcoming days to check. |
What happens exactly? Do you just get the 404 in the logs, or does the app crash/freeze? |
I am getting this also without scrolling. Flutter console just reports 400
as an error and image does not appear
![image](https://user-images.githubusercontent.com/3918999/94177091-5489f480-fe99-11ea-9629-60699c86aa26.png)
|
I found an issue. For me it was that i was sending Beare header to s3 and it was deying it. So i added condition that for auth headers would not be sent to external urls. |
I get a similar error even with Flutter's Image.network. It looks like it may be an issue with Flutter, which explains why this issue has come back. |
Yes, that's not really an error, it is also The try/catch is within the Flutter framework, so that's not really anything we can solve. |
please reopen |
@ponyo877-debug why should it be reopened? The dart vm bug is unrelated to this library, so it cannot be fixed here. We should only keep issues open that should be fixed here. |
@renefloor is correct. I having crashes debugging, but after generate an APK, everything work as expected on phone. |
Hi, I was experiencing this issue when using a StreamBuilder on one page of my TabBarView. I would get http error saying 403. My StreamBuilder located in the 1st tab would update when someone selects a user shown in my 2nd tab and then clicks an "Add" button. I fixed it by putting each tab into separate dart files and then calling those on a third dart file containing only the TabBar. Other than that specific circumstance I wouldn't get this error. |
I have sentry running and looked at my logs - for this error sentry was triggered 237 times in 1 day !.
If the URL is invalid, not found or malformed - I was under the impression that an error widget would be rendered instead ??
Exception is :
The text was updated successfully, but these errors were encountered: