makeWebRequest responcecode -300

Trying to fetch json from my own server, which has domain name and purchased ssl certificate (Not self-signed). Returns value -300 (NETWORK_REQUEST_TIMED_OUT), but when I upload my json to online json storage (npoint.io) and fetch my json from that storage everything works perfectly. 

Nothing comes to my apache2 log files, but tcpdump shows traffic when I try to fetch json from my server. And everything works fine when I run my program on PC (SDK) but not on physical Watch.

Could this still be certificate problem? Now I have SSL certs from Namecheap, tried also SSLforfree certificates but no effect. 

   function makeRequest() {
       var url = URL;
       var params = null;
       var options = {
         :method => Communications.HTTP_REQUEST_METHOD_GET,
         :responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON
       };
       var responseCallback = method(:onReceive);
       Communications.makeWebRequest(url, params, options, method(:onReceive));
  }

  • What does your url look like?  Https?  And you don't include any parameters in it, correct?

  • Solution was to use ca-bundle file correctly in my apache configuration

  • Since the timeout is raised with -2 or -300 after 5 seconds only it is normal that the watch does not wait for more.

    Here some response times of the Garmin api endpoint this morning going up to 150 seconds response time.

    [21/Aug/2024:04:23:36 +0000] "POST /api/ HTTP/1.1" 200 308 "-" "ConnectMobile/21 CFNetwork/1498.700.2 Darwin/23.6.0" response-time=1.149
    [21/Aug/2024:04:23:53 +0000] "POST /api/ HTTP/1.1" 200 308 "-" "ConnectMobile/21 CFNetwork/1498.700.2 Darwin/23.6.0" response-time=1.180
    [21/Aug/2024:04:43:58 +0000] "POST /api/ HTTP/1.1" 200 302 "-" "Mozilla/5.0 ( compatible )" response-time=1.139
    [21/Aug/2024:04:44:45 +0000] "POST /api/ HTTP/1.1" 200 308 "-" "Mozilla/5.0 ( compatible )" response-time=1.310
    [21/Aug/2024:04:47:59 +0000] "POST /api/ HTTP/1.1" 200 308 "-" "Mozilla/5.0 ( compatible )" response-time=1.245
    [21/Aug/2024:04:53:15 +0000] "POST /api/ HTTP/1.1" 200 307 "-" "Mozilla/5.0 ( compatible )" response-time=1.331
    [21/Aug/2024:04:54:33 +0000] "POST /api/ HTTP/1.1" 200 306 "-" "Mozilla/5.0 ( compatible )" response-time=1.290
    [21/Aug/2024:05:09:09 +0000] "POST /api/ HTTP/1.1" 200 305 "-" "Mozilla/5.0 ( compatible )" response-time=1.175
    [21/Aug/2024:05:20:03 +0000] "POST /api/ HTTP/1.1" 200 305 "-" "ConnectMobile/23 CFNetwork/1496.0.7 Darwin/23.5.0" response-time=1.092
    [21/Aug/2024:05:41:41 +0000] "POST /api/ HTTP/1.1" 200 307 "-" "ConnectMobile/23 CFNetwork/1498.700.2 Darwin/23.6.0" response-time=2.374
    [21/Aug/2024:05:41:44 +0000] "POST /api/ HTTP/1.1" 200 305 "-" "ConnectMobile/23 CFNetwork/1498.700.2 Darwin/23.6.0" response-time=1.109
    [21/Aug/2024:05:42:32 +0000] "POST /api/ HTTP/1.1" 200 305 "-" "Mozilla/5.0 ( compatible )" response-time=1.107
    [21/Aug/2024:05:46:25 +0000] "POST /api/ HTTP/1.1" 200 304 "-" "Mozilla/5.0 ( compatible )" response-time=1.475
    [21/Aug/2024:06:00:30 +0000] "POST /api/ HTTP/1.1" 200 307 "-" "Mozilla/5.0 ( compatible )" response-time=1.303
    [21/Aug/2024:06:09:04 +0000] "POST /api/ HTTP/1.1" 499 0 "-" "Mozilla/5.0 ( compatible )" response-time=150.618
    [21/Aug/2024:06:13:30 +0000] "POST /api/ HTTP/1.1" 502 1661 "-" "Mozilla/5.0 ( compatible )" response-time=44.672
    [21/Aug/2024:06:13:46 +0000] "POST /api/ HTTP/1.1" 502 1661 "-" "Mozilla/5.0 ( compatible )" response-time=60.005
    [21/Aug/2024:06:14:38 +0000] "POST /api/ HTTP/1.1" 200 309 "-" "Mozilla/5.0 ( compatible )" response-time=20.039
    [21/Aug/2024:07:03:22 +0000] "POST /api/ HTTP/1.1" 200 306 "-" "Mozilla/5.0 ( compatible )" response-time=2.305
    [21/Aug/2024:07:10:18 +0000] "POST /api/ HTTP/1.1" 200 307 "-" "Mozilla/5.0 ( compatible )" response-time=1.272
    [21/Aug/2024:07:11:34 +0000] "POST /api/ HTTP/1.1" 200 309 "-" "Mozilla/5.0 ( compatible )" response-time=1.348