makeWebRequest returns responseCode == 0 (possibly SSL handshake problem?)

Hi, My app downloads data off a web server using makeWebRequest. This has worked fine but when I recently added support for Edge devices, I noticed that with some of the Edge devices (1030, 530, 830), makewebrequest returns no data and responseCode == 0 when tested in the simulator (I cannot test with real devices).

I looked at the HTTP log in the simulator and I see some encoded messages going back and forth between the device and the server, it looks like an SSL handshake ( I can read some information about the SSL certificate, etc) but no HTTP (POST) request i sent and consequently no data is sent back. When I test with other devices, I see the same SSL handshake sequence, but followed by the HTTP post request and the correct HTTP response data. 

This issue is only with some of the Edge devices (1030, 830, 530), other Edge devices work fine. 

Im using target SDK v. 3.1.x 

I have disabled "Use Device HTTPS requirements" in the sim. Im out of ideas. Thanks in advance

best regards

Fredrik

  • My apps that do makeWebRequest work fine in the sim for both wifi and ble, and the same on a real device.

    If someone wanted to test it on a devices,

    -is it in the store for the impacted devices?

    -Is there anything needed like an API key?

    -is it easy to see the reponseCode in the app or what's needed? (setting up a log file is tricky if downloaded from the store)

  • Hi Jim, I have not put the app on the app store yet and unfortunately its not easy to test, you need to have account credentials to authenticate to the service.

    I have tested to connect to a different web service and that works, so clearly the issue is related to connecting to this specific web service. 

    What I know so far is that when I enable "use device HTTPS requirements" all devices will fail the makewebrequest (empty response data and responseCode = 0). When "use device HTTPS requirements" is disabled, all tested devices work, except for that I need to disable the WiFi connection on some Edge devices for them to work. 

    Right now my working assumption is that something breaks during the SSL handshake. Either in the certificate exchange or crypto protocol negotiation. I am however no security expert and don't have the needed tools to analyse this any further. (this theory doesn't explain why I need to disable the Wifi connection on some Edge devices though)

    Would it make sense to file this as a problem report and have someone at Garmin engineering to take a look at it? 

    I can assist with user credentials, etc. if needed.

    best regards

    Fredrik

  • Also, I could of course create a pre-configured program file to side load.