error -300

Hi,

all of sudden my app started to give errors (300, NETWORK_REQUEST_TIMED_OUT) on the following code:

 function callURL(url) {
  // Log url
     Log(url);
  
  // Make the request
        Comm.makeWebRequest(
            url,
            {
            },
            {
                "Content-Type" => Comm.REQUEST_CONTENT_TYPE_URL_ENCODED
            },
             method(:onReceive)
      ); 
    }
The errors however only occur on the watch (i own a forerunner 630, but i also have users reporting the same error on other devices (like vivoactive music 3) and not in the simluator. 
It also does not appear to be a timeout, since the error comes directly after the request was done.
I use exactly the same function in another app, and there it works fine, also on my watch.
anyone, since i have complaining users and i have no clue how to fix, Please help! Does anyone know how to fix? or other possible causes then network timeout?
Kr Arnold
  • hi,

    i did not get the error with an ImageReqest, but with a WebRequest. Code is on top of this discussion. 

    I narrowed it down to that it occurs for all http requests as of garmin connect mobile 4.20

    Issue is gone

    - if i use https (which is not always an option and definitily is not always needed for this application)

    - or if i downgrade garmin connect mobile to 4.19

    Kind Regards

    Arnold

  • - I got this thread and the other -300 thread mixed up. This one is about makeWebRequest and that one is about makeImageRequest... Sorry.

  • Hye, 

    I have a user Who has thé same problem on f245 with ios gcm 4.20.

    The code I use is for weather on openweathermap so it is https.

    I dont know ios so I cant tell him how to downgrade to 4.19 

    Can you drive me ?

    Thanks 

  • I'm still trying to reproduce this myself but haven't succeeded yet. I really only see this out in the wild and can only observe it with some built-in-to-app analytics.

    Based on some support request anecdotes, I suspect this is maybe related to poor Wi-Fi conditions, so if you're in your office next to your router, you may never run into this. But, if you're say out on your patio with a couple of walls in between, you *might* be able to trigger it. That's what I'm going to be trying at least...

    I'm seeing -1003 errors in similar cases...

  • Lots of my users reporting the same issue. I am quite overloaded with support emails now, because our paid app is not usable anymore. I know about Fenix 5, Fenix 5X, Vivoactive 3 models so far which are affected by this issue. But it seems like it affect vast number of users globally. 

    Looks like it started with 4.20 GCM Android. 

  • ok, if its really because of using encrypted http:  I was aware about some risk for the future with using that in my apps, but I didn't believe that Garmin folks will change this behaviour like this for Android platform. Really unbelievable. 

    Does somebody know how to make encrypted web server locally on Android? Triumph

  • Are you sure the user is seeing -300?  There are other errors that are common, like -104 if there's no phone connection, -2 if there's a timeout in getting a response, etc.

    In the background I either return the data or an error code so I can display that code on the watch face.

  • So after having update the watchface for returning thé error code... Nothing is shown... It seems That nothing is sent to internet or nothing is received... 

    But the weird thing is That hé has other watchface with openweathermap, Those work (returning the update time...) 

  • I believe you’ll have to use a self-signed certificate, and ask your users to install that certificate manually so it’s trusted, unfortunately. Let’s Encrypt doesn’t give out localhost certs (for good reason), so that’s not an option. 

    You may also want to see here:

    https://stackoverflow.com/questions/37281958/how-to-trust-self-signed-certificate-on-android

    It’s too bad GCM isn’t implementing an https exception for localhost/127.0.0.1, since, as others pointed out, Apple backed away from their super-strict requirements a while ago (local HTTP connections are allowed). 

  • Hmm, for now I am fighting with using the right keystore to make it at least work in test environment. . So far I am getting ERR_SSL_VERSION_OR_CIPHER_MISMATCH in Chrome when using BKS-V1.. Worried