Skip to content
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

The request failed because it wasn't able to reach the ipify service - how fix it? #6

Open
FetFrumos opened this issue Jan 24, 2022 · 8 comments

Comments

@FetFrumos
Copy link

I using your packages in my flutter android app. Quite often I get this error:

Exception: The request failed because it wasn't able to reach the ipify service. This is most likely due to a networking error of some sort.

This probably happens when the app is in the background. I am using this library - background_fetch .

This is my stack exception:

dart_ipify_base.dart in Ipify._send at line 160 within dart_ipify Called from: <asynchronous suspension> dart_ipify_base.dart in Ipify.ipv4 at line 54 within dart_ipify Called from: <asynchronous suspension> dart_ipify_base.dart in Ipify.geo at line 128 within dart_ipify Called from: <asynchronous suspension> app_geo.dart in AppGeo.getCountry at line 8 within myapp Called from: <asynchronous suspension> home_page.dart in _HomePageState.getCountry at line 99 within myapp Called from: <asynchronous suspension> home_page.dart in _HomePageState._onBackgroundFetch at line 111 within myapp

where can I find the cause of the error? how can I fix this error? any tips?

@mariusPeligourmet
Copy link

Same error here.

@guplem
Copy link

guplem commented Apr 26, 2022

This error appeared to me using Flutter Web with a Parse server SDK calling a Cloud Function

@dipen-apptrait
Copy link

did anyone find a solution?

@Bujupah
Copy link
Owner

Bujupah commented Nov 3, 2022

I am not able to reproduce this
@dipen-apptrait can you paste the stack trace error? probably will need dart/flutter versions

@guplem
Copy link

guplem commented Nov 4, 2022

did anyone find a solution?

I figured out this was due to an AdBlock extension (uBlock Origin in my case) blocking the access (i suppose to avoid tracking of users).

I just had to assume that the user might have a way to hide the ip, so the app must be able to handle the error.

If I remember it correctly, surrounding the call with a try-catch should be enough.
But then you must ensure that the ip is not a requirement for the proper execution of your app. Something that, if I'm not wrong, might be even enforced by law in many countries.

@MuhammedKpln
Copy link

MuhammedKpln commented Dec 7, 2022

I've encountered this error today, it seems to be not reaching to the ipify.org. I've tried to establish a connection with native http module didn't get luck with that either. So i don't think it's package relatable. I've tried other services too that provides same functionality, nothing. Somehow it seems to be blocking from the iOS it self?

Edit: I was using a dns provider that block access to ipify.org, it works now as expected.

@Bujupah
Copy link
Owner

Bujupah commented Dec 16, 2022

I am not facing any issue here...
Please check your firewalls, extensions, etc... or might be there was downtime at ipify server side

@HimaniTank95
Copy link

I got same error today. and some how it got resolved in 30 min. not sure how it was working but it seems issue is there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants