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
Making Network http error SocketException: Failed host lookup #27883
Comments
Are you using a proxy? |
No. I don't use proxy |
Hard to tell. Looks like a network issue. |
I tried many network but still not working |
Shouldn't this be |
Please consider asking support questions in one of the other channels listed at http://flutter.io/support . |
i think that url is not a problem. |
@mraleph could this be a tree-shaking issue or something like that? |
i rebuild release app and this is error:
|
@hoc081098 Double-check / make sure you have |
Thank @zarko-tg. Solve: add |
This saves me, Why this is not in the documentation ? |
@ferso It'd be less to worry about or consult documentation if they'd make it a default (in templates/starters) since most apps connect online. I spent like a day on a silly little thing. |
I had that error even in Debug mode (android/app/src/debug/AndroidManifest.xml has
I wiped data It works! |
Adding The documentation is out of date and should be updated. Since Flutter uses the internet permission internally in development mode it is always active when developing. When deploying the app to the play store, it is not active by default. The documentation currently says:
Which is misleading since the internet permission isn't in the production manifest (apparently it was in earlier flutter versions?). Please add a note to this so the documentation accurately explains that the internet permission has to be added to the production manifest in case it is needed. |
Great Info. This helped me. As I was wondering a bit that, where to add this line in that file... figured it out to be at the end like: |
This line used to be there on default on previous version of Flutter. It seems that they have removed on the recent updates. |
Make sure the debugging device internet is turned on , if you use localhost try changing it into 10.0.2.2 |
would I have to restart the app before it works? Mine isn't working. |
@Emyboy yes, it means building and starting the app again. If it isn't working that your are likely having some other problem, unrelated to this Github issue. |
@zarko-tg pls help me this way dont solve my problem |
@zarko-tg Thanks man that saved me too! |
great! works for me!! |
After trying all the steps. if You are running the server locally. In my case Strapi. Replace the localhost with http://localhost:1337/auth/local/register to http://10.0.2.2:1337/auth/local/register |
I get this error on IOS.
The solution listed here is for Android though. |
@ph55 Hey, having same issue on iOS. Did you manage to solve it? |
already set permission but still got that err
|
I cant display my api pictures due to this |
i tried and can't work too.. then realised my android simulator wifi is off... need to enable it ya :) |
make sure your device has internet connection. |
I have this issue on release build, but debug build works ok. |
please help my i have same isuee and i try your way not working with me i use this this endpoint |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Steps to Reproduce
Making Network http error when build release, even having internet connection
When build debug having no error
Code:
main.dart
:Screenshots:
Lenovo a2010: android 5.1
Philips S337: android 5.1:
Logs
flutter analyze
flutter doctor -v
The text was updated successfully, but these errors were encountered: