xhr timeout over 3G, works perfect over wifi

You must Login before you can answer or comment on any questions.

Hello there, I have an issue which could be related to the last iOS update. My xhr works perfectly over wifi but it fails over 3G. I searched this Q&A section and tried everything relevant:

enableKeepAlive:false,
xhr.setTimeout(0);
xhr.setTimeout(random.high.value);
but nothing seems to work. What is even more perplexing is that my xhr works from time to time on different carriers.

Any help would be greatly appreciated. I would also advise anyone whose iOS apps are accessing data remotely through xhr to test that remote connection over 3G is still working as intended following the last iOS update.

Many thanks,

Dimitris

— asked 1 year ago by Dimitris Plessas
3 Comments
  • Doing some more research with a couple of other apps and some testing, it seems that the problem appears when I am trying to call Google APIs but not when I am trying to connect to my own site for downloading a simple text file. Not sure if that helps.

    — commented 1 year ago by Dimitris Plessas

  • Are you in the UK? Is the carrier Vodafone?

    — commented 1 year ago by Darren Adams

  • The carrier is Vodafone, but I am in Greece. It seems to work with another carrier oddly enough.

    — commented 1 year ago by Dimitris Plessas

2 Answers

Following your comment Darren, I checked with all three major carriers in Greece. All devices under the same roof. All working perfectly both over wifi and 3G with the exception of Vodafone 3G. Does this even make sense? Any thoughts?

— answered 1 year ago by Dimitris Plessas
answer permalink
2 Comments
  • I'm aware of another developer that had issues with 3g on Vodafone. Apparently, Vodafone does something with the headers before sending to the server. They somehow alter or append what the app uses as a header. The developer's name is Jon Odel. You should be able to look him up on devlink. I may have his email address too, but try contacting him through devlink first. I think he found some sort of workaround. If you have any other questions, don't hesitate to ask me here or contact me on devlink.

    — commented 1 year ago by Darren Adams

  • Thanks a lot Darren. I will try to hook up with Jon and post any solution for everyone's benefit.

    — commented 1 year ago by Dimitris Plessas

After trying every workaround to any problem remotely close to mine, the most simple thing seems to have done the job: switching from http to https. Of course the URL you are trying to call needs to support that but luckily google (which I am calling) does.

Did not manage to get a hold of Jon, thanks Darren for pointing me to the right direction though.

Your Answer

Think you can help? Login to answer this question!