Also getting error 404 with makeImageRequest :-(

Using SDK 8.1.1 on both a simulated Fenix 7S Pro and Edge 840, using URL http://weewx.{my_host_name}.duckdns.org/daywindvec.png for makeImageRequest gives me a 404 error. Reading the same URL from my phone disconnected from my home WiFi (ie, getting the image like Garmin's servers would, outside of my home network) results in said image fetched so it's not because the file isn't externally accessible. Using URL http://static.garmincdn.com/com.garmin/ui/images/logo/garmin_logo_on_w.png fetches the image so my makeImageRequest call is correctly coded (see below). Looking at my web server log file, I see no attempt to fetch that file from Garmin's web server and I do see the fetch from my cell so I'm looking at the right place.

Anything I can do on my side to successfully get that file? Here's the code snippet of said call

    var url = "http://weewx.{my_host_name}.duckdns.org/daywindvec.png"; /*"http://static.garmincdn.com/com.garmin/ui/images/logo/garmin_logo_on_w.png";*/
    var params = null;

    var options = {
        :palette => [
            Gfx.COLOR_WHITE,
            Gfx.COLOR_GREEN,
            Gfx.COLOR_DK_GREEN,
            Gfx.COLOR_LT_GRAY,
            Gfx.COLOR_DK_GRAY,
            Gfx.COLOR_BLACK
        ],
        :maxWidth => 127,
        :maxHeight => 127,
        :dithering => Comm.IMAGE_DITHERING_NONE,
        :packingFormat => Comm.PACKING_FORMAT_PNG
    };

    Comm.makeImageRequest(url, params, options, method(:onImageResponse));

Thanks

  • The short answer is I don't think there is anything you can do on your side.  In the past couple weeks I have been getting a number of reports of 404 errors when using one radar source in my radar widget.  The server that I use to consolidate the radar image on the map and then size the image to match the devices has been running for 4 years.  It even worked fin when I released an update for my widget on June 30th.  Now I get a 404 error in the simulator and on my device.  In my server I don't even see the request in the webserver logs.  For some reason the simulator HTTP traffic in the recent SDK don't show any makeImageRequest traffic.  See screenshot.

    Since I remembered previously seeing the image request details in a previous SDK, I tried to go back a few releases.  I tried SDK 6.2.2 and saw the same behavior as 8.2.2.  I eventually tried to run my widget in the oldest SDK I could.  Turns out with the current VSCode extension that is SDK 4.0.6.  The only change I made to my widget was I needed to comment out 2 parameters in my jungle file that SDK 4.0.6 does not understand and my widget runs fine and I can even see the image requests in the HTTP traffic.

    The problem is I can't go back and re-release my widget, app, and data field with 4.0.6 as I support all the latest devices which can't be compiled with 4.0.6.  Angry

  • in current SDK, i never seen a logging when i use  makeImageRequest only 

    makeWebRequest with http simulator console 

  • That's very interesting. Since you wrote that it did work until recently even with the newer SDK-s I don't think that the change is in the SDK (that we download). If I remember correctly the makeImageRequest goes through either garmin servers or the Garmin Connect phone app, that does some manipulation to the image (sounds like similar or same things that your own proxy does). So I would point to that component (the garmin web service or the Garmin Connect app) that might have changed recently and that is probably causing these issues.

  • I am not sure I understand.  You can see in my screenshots that the HTTP traffic with SDK 4.0.6 is showing results for both makeWebRequest and makeImageRequest.  I the latest SDKs it only provides makeWebRequest traffic.  I don't know when it switched but to me that is a simulator bug and will be opening a report.

  • Based on what I am seeing, I agree it is definitely something with the Garmin servers.  I need to verify this with some packet captures but my guess is SDK 4.0.6 uses a different server pool that have not been "patched" yet.  The weird thing is of my two image sources in my app, one URL gets blocked, the other still works through Garmin's servers for now.  For the link that is broken, I thought it might have something to do with the server cert that recently updated.  I changed to a different cert provider, but that made no difference.  Guess I am opening two big resorts. 

  • makeImageRequest uses a Garmin service to process the image before delivering it to the watch. Originally, this was used on iOS, but not android. See https://forums.garmin.com/developer/connect-iq/f/discussion/256721/connect-mobile-4-40-makeimagerequest-localhost-error/1226813#1226813 

    Maybe originally the simulator did not use the service and it would show up in the http traffic, but when they made the change to GCM on android they also updated the simulator to use the service. The timescales roughly match up with 4.0.x being around that time.

    You could test this out by fetching an image from your own web server and looking at the source IP of the request in the web server logs. Is this a Garmin server, or the system the simulator is running on. Or by doing some network tracing to see where the request from the simulator actually goes.

    There have also been historic reports where the Garmin service did not handle some images due to the domain, but this could be for other reasons too, for example https://forums.garmin.com/developer/connect-iq/i/bug-reports/the-proxy-server-servicing-makeimagerequest-cannot-resolve-the-cf-zone 

    So, if you are getting 404 for an image you know exists, I'd expect this to be an issue associated with the Garmin service. If it only just started happening for a particular image, maybe Garmin have been making changes to their servers.

    Many guesses here, but maybe this helps. I expect it can only be solved with the help of Garmin who can look at what is going on on their servers when your request comes in.

  • I did some more testing.  What I found is the SDK 4.0.6 does not use the Garmin servers.  In my packet capture I can see the 4.0.6 simulator directly contacts the end server and appers to do all the image processing locally.  I don’t recall which SDK it was, but the image processing was switched to use the Garmin backend servers for settings and the image requests.  With SDK 8.2.2, I can see the simulator send a request to service.garmin.com.  All I can tell is the source website is working fine, but Garmin’s servers are the problem.

  • yes I was thinking the same thing.  My testing did see the old simulator went direct to the source.  I used wire shark on my workstation running the simulator to monitor the connection requests.  All indications point to Garmin’s servers are broke.

  • That's what I'm seeing too. I (maybe wrongly) assume it's because the URL I want to fetch from is on a DDNS system (duckdns.org). Maybe Garmin limits its access to static DNS names?

  • I am very sure DDNS is not the problem.  My URL is a Static DNS and still have the problem.  So far I have tested with two different sources.  One with static DNS and one with dynamic DNS.  Both have the problem.  What I don't understand is what is different with the one source that does still work. I suspect it is a matter of time before it breaks also. Grin