Authorisation Failure

I have an app that uses makeOAuthRequest as the first step in downloading data from third party websites.

It works like clockwork using my Android phone on two third party sites.

It fails like clockwork using my iPhone on two third party sites.  Each time I get a call back after making the makeOAuthRequest call BUT the responseCode = 503.

Both sites are clearly not temporarily unavailable so I strongly suspect this to be an Apple <=> Garmin issue.

Have any other developers noticed this problem and is it being investigated by Garmin / Apple?

  • This problem is now solved.  

    The problem is Garmin's sloppy coding in support of CIQ apps.  I suspect it is the lowest priority and that they use inexperienced software engineers who are not adequately supervised.

    Authorisation and Web Requests:

    Successful requests should return 200 - 299. (as per RFC 7231, the industry standard)

    • Garmin returns 200 in the simulator.
    • Garmin returns 2 on success for makeWebRequests!  (a child knows 2 is not in the range 200-299)
    • In some cases (iPhone) Garmin returns code 503 on successful authorisation requests.  (again not in the range 200-299).

    That a company thinks it is acceptable to waste developers time in this way astounds me and underlines how little they value us.

  • Are you sure you're not seeing -2 instead of 2?  -2 is a timeout waiting on the server.

    503 is service unavailable, which indicates something is wrong on the server.

    Things in the sim don't always work the same as when a phone and GCM is involved.

    How are you building the request as things like the params might be handled differently between Android and iOS.  Post the code.  Also, requests thru GCM are much slower than the sim.

    One thing to bear in mind here is many apps use OAuth with no problem, so you may want to look at your app and server.

    There are some sites that have issues with a proxy - and that's what GCM is here.  Google comes to mind, where the error is:

    Error 403: disallowed_useragent

  • Quite sure Jim.  My code now works.  Sure you can get things to work, but I think the problem is the sloppy responseCode returns.  How else can valid data be returned but the response code not be 200-299.  I think you should stop apologising for Garmin.

  • Why does no one else seem to have this issue?  Many things use OAuth.

  • Ah that old one.  I have solved the problem.  Go jump mate.

  • Sounds like an issue on your server to me.  That might be why no one else sees it.

  • You are not helping Jim.  You can't because the issue is already resolved.  I just have to ignore the response codes because they are incorrect and test the return values. This just needs making clear to other developers so they don't have the same issues in future.  You attempting to obfuscate the problem in order to detract blame from Garmin is unhelpful.

  • And the issue is not my server which has not been utilised at the point of this erroneous return code so your pointy finger can point elsewhere - to Garmin.

  • Seems you are trying to blame garmin for an issue with your environment.  How long have you been doing CIQ?  Have you looked through this forum for issues that have come up between iOS and Andriod when doing comm? 

    You can't ignore this is the first time this has come up in years.

  • So how come Rebecca in bug reporting has volunteered that even with code 503 valid data might be returned?  The old "how long...", "your server...", "your environment...".  "no one else..." smokescreen and BS.  It makes you look foolish. I am no longer interested in what you have to say as it has no validity.