makeWebRequest - prerequisits

For my apps I recently implemented synchronization with my server - both trainings data and license are now stored and retrieved from/to my server using Communications.makeWebRequest(). It works great - hundreds of users have already succesfully connected to the server and  tens of indivitual synchronizations are registeded each day. 

However tooday I recieved a message from one of the users that he is not able to get his watch unlocked:

- My server does not recieve any requests from users deviceS (tried on Fenix8 and Fenix6).

- User has his bluetooth on with internet connection on his mobile - he is able to download and install the apps, change app settings in Garmin IQ, synchronize the  watch etc.

- User downloaded the latest app version - there is internet connection on the list of permissions when checked it in Garmin IQ of my app

- User does not have any firewall + it is his private phone

I was able to grant him access offline however I'm wondering what can be other reasons he is not able to make any requests over the internet makeWebRequest()? I need to be able to troubleshoot it in the future as I plan to move to the fully automated license handling by me server. 


Thank you in advance  for any hints

  • If you are communicating with this user and he's willing to help try sending him an app that does the same request and logs everything, especially possible errors then ask them to side load it, including the empty txt file, try it, then send you back the logfile

  • Would try if no other answers come. I hoped I'm missing some setting or other factor is in place

  • In general, if you do an app with makeWebRequest, you want to have a way to show if an error occurs (probably including the responseCode).  It makes it easier to diagnose things like this without sending out a special sideload, etc.  It could be something as simple as the user lost the connection to their phone.

  • Yeah, I would add a place with connection/sync status in the app.

  • Can it have something to do with the fact that the user has iOS mobile?

    The way my app does the request is:

    var url = "https :// www.mydo main.com /getlicense"   //without whitespaces

    var params = {"code" => "ca6df1v"};

    var options = {
       :method => Communications.HTTP_REQUEST_METHOD_GET,
       :headers => {
       "Content-Type" => Communications.REQUEST_CONTENT_TYPE_JSON},
       :responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON
    };


    Communications.makeWebRequest(url, params, options, method(:checkLicense));

  • If you only have one user with iOS that might be something to consider, but if you make multiple users with iOS and only one has a problem I'd say it was far less likely.

    This is a good case where if the user could see the responseCode from the request and let you know what it is, it could really help.

  • True, a lot of users are connecting from iOS. I'm just not familiar with it so taught it may have some data connection safety measures switch on/off based on system settings.

  • Again, change your app to displays the responseCode if the makeWebRequest fails so the user can tell you what it is.  Until then, you could be making a bunch of bad guesses.

    I've had apps that do makeWebRequest calls since 2015 (it was first makeJsonRequest) and never seen anything that needed to set for iOS vs Android.

  • Ok, so I've done as suggested. Now my app displays responseCode on License screen. I contacted the user and was told  that response he is getting is:

    BLE_CONNECTION_UNAVAILABLE -104
    No BLE connection is available.

    It is strange since without BLE connection he would not be able to download the app and enter the  unlock code in the first place - but he did. Do you have any clue what may be causing it? (it happens on Fenix6 and Fenix8 as well so I guess it is not due to the watch device).

  • Ok, that means thew watch isn't connected to the phone.  There have been some issues with some watches where the connection keeps dropping, or could be something like the user is just too far from their phone.  I'll see the connection drop if my phone is next to my computer and I go to the kitchen to get coffee with a va5 for example.