Watchface working in simulator, failing webrequest on device with HTTP response -101

Former Member
Former Member

Watchface runs normally in the simulator, and all http requests (only 1 per 10 minutes) work fine and get a response of 200 and data shows up perfectly.

Sideloading to Vivoactive 3 (copying the .prg to Apps folder) the exact same watchface is getting a -101 for any web request - even if the request is to a non existent URL. Looking at the docs, a -101 which is a BLE_QUEUE_FULL according to https://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/Communications.html. This error happens on the very first http request.

Any help is appreciated!

  • This is an error you see when you do multiple web requests at the same time (the max is 3 outstanding requests).   Comm happens much faster in the sim than a real device, so responses happen much faster and you might not see it there..

    Are you doing multiple requests at the same time by any chance?  It could be a bug in your code - try putting a println each time to call makeWebRequest.  You're background may only run every 10 minutes, but each time it runs you could be doing multiple requests.

  • Former Member
    0 Former Member over 5 years ago in reply to jim_m_58

    I have 1 Comm.makeWebRequest in the entire project in the onTemporalEvent.

    I set the event with:  Background.registerForTemporalEvent(new Time.Duration(10 * 60));

    In the Sim I see the request going out every 10 minutes and getting a 200 result.

  • What do you see on the real device?  The println's will show in an app's log file.

  • Former Member
    0 Former Member over 5 years ago in reply to jim_m_58

    I'm not seeing any of the println's in the long. I found out about the http response code by drawing it to the watchface as text.

    I do see an error -

    Error: Unexpected Type Error
    Details: 'Failed invoking <symbol>'

    Pointing to the line with the webrequest itself (asterisk'd below) (i changed the url here to google)

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

    var url="">https://www.google.com";
    **Comm.makeWebRequest(url, options, {"aa" => "bb"}, method(:onReceiveWeather));
    Sys.println("ontemporal exit: "+ts);

    Is there something i'm doing wrong with deploying to device? My manifest.xml specifies the right permissions.

  • Former Member
    0 Former Member over 5 years ago in reply to Former Member

    Figured it out. Needed to swap options and params in makewebrequest. For some reason, it works in the simulator but not on the watch.