{"id":24983,"date":"2026-11-12T20:49:15","date_gmt":"2026-11-13T01:49:15","guid":{"rendered":"https:\/\/nuxx.net\/blog\/?p=24983"},"modified":"2026-11-12T20:49:15","modified_gmt":"2026-11-13T01:49:15","slug":"rediscovering-webkit-bug-322883","status":"publish","type":"post","link":"https:\/\/nuxx.net\/blog\/2026\/11\/12\/rediscovering-webkit-bug-322883\/","title":{"rendered":"Rediscovering WebKit Bug 322883"},"content":{"rendered":"<div class=\"wp-block-image\">\n<figure class=\"alignright size-medium\"><a href=\"https:\/\/nuxx.net\/blog\/wp-content\/uploads\/2026\/11\/IMG_0047.png\"><img loading=\"lazy\" decoding=\"async\" width=\"138\" height=\"300\" src=\"https:\/\/nuxx.net\/blog\/wp-content\/uploads\/2026\/11\/IMG_0047-138x300.png\" alt=\"\" class=\"wp-image-24984\" srcset=\"https:\/\/nuxx.net\/blog\/wp-content\/uploads\/2026\/11\/IMG_0047-138x300.png 138w, https:\/\/nuxx.net\/blog\/wp-content\/uploads\/2026\/11\/IMG_0047-472x1024.png 472w, https:\/\/nuxx.net\/blog\/wp-content\/uploads\/2026\/11\/IMG_0047-768x1665.png 768w, https:\/\/nuxx.net\/blog\/wp-content\/uploads\/2026\/11\/IMG_0047-709x1536.png 709w, https:\/\/nuxx.net\/blog\/wp-content\/uploads\/2026\/11\/IMG_0047-945x2048.png 945w, https:\/\/nuxx.net\/blog\/wp-content\/uploads\/2026\/11\/IMG_0047.png 1179w\" sizes=\"auto, (max-width: 138px) 100vw, 138px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Last night, while going through some testing of <a href=\"https:\/\/github.com\/c0nsumer\/trailmaps.app-map-generator\">trailmaps.app-map-generator<\/a> I ran into a reproducible bug when trying to load a test maps offline (in Airplane mode): some of the map tiles wouldn&#8217;t load (see the gray lower half in the image to the right).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I first expected this to be another offline-mode app bug that needed handling, but it didn&#8217;t happen on Chrome (Android) which made it really curious. Either way, I got to digging (with Claude generating a series of test scripts).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After a bunch of test cases and scripts and analysis it turns out there&#8217;s a bug in <a href=\"https:\/\/webkit.org\/\">WebKit<\/a>! This got me excited. A real, live, reproducible bug in one of the most widely used web browser engines in the world that affects how content loads in current versions of Safari (on both iOS and macOS)?!? That felt like a pretty neat find and something great to report and get fixed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Well, it turns out this is a duplicate of bug <a href=\"https:\/\/bugs.webkit.org\/show_bug.cgi?id=322883\">322883<\/a> which was reported back in August and I just had parallel discovery. A bit disappointing, but confirmation is also good. Since it&#8217;s still not fixed I added supporting information and a live-hosted reproduction (<a href=\"https:\/\/nuxx.net\/files\/webkit_bug_322883_repro\/\">link<\/a>). Hopefully that&#8217;ll nudge it along.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So what is the bug?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The engine for <a href=\"https:\/\/trailmaps.app\">trailmaps.app<\/a> maps uses a <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Service_Worker_API\">service worker<\/a> to handle the local cache of map data, including serving it back to the local device when there&#8217;s no data service (airplane mode, poor mobile data signal, etc). The map library used, <a href=\"https:\/\/maplibre.org\/maplibre-gl-js\/docs\/\">MapLibre GL JS<\/a>, starts several web workers so map tiles (in this case the terrain, background map, OSM data, etc) load efficiently and quickly in parallel.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"alignright size-medium\"><a href=\"https:\/\/nuxx.net\/blog\/wp-content\/uploads\/2026\/11\/Screenshot-2026-11-12-at-7.49.31-AM.png\"><img loading=\"lazy\" decoding=\"async\" width=\"282\" height=\"300\" src=\"https:\/\/nuxx.net\/blog\/wp-content\/uploads\/2026\/11\/Screenshot-2026-11-12-at-7.49.31-AM-282x300.png\" alt=\"\" class=\"wp-image-24985\" srcset=\"https:\/\/nuxx.net\/blog\/wp-content\/uploads\/2026\/11\/Screenshot-2026-11-12-at-7.49.31-AM-282x300.png 282w, https:\/\/nuxx.net\/blog\/wp-content\/uploads\/2026\/11\/Screenshot-2026-11-12-at-7.49.31-AM-962x1024.png 962w, https:\/\/nuxx.net\/blog\/wp-content\/uploads\/2026\/11\/Screenshot-2026-11-12-at-7.49.31-AM-768x818.png 768w, https:\/\/nuxx.net\/blog\/wp-content\/uploads\/2026\/11\/Screenshot-2026-11-12-at-7.49.31-AM.png 1418w\" sizes=\"auto, (max-width: 282px) 100vw, 282px\" \/><\/a><figcaption class=\"wp-element-caption\">The bug, reproduced on Safari 27.0.1 on macOS.<\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">It turns out that when launching multiple web workers from the same script in the same task, the current production version of WebKit only connects the first one to the service worker. The subsequent ones go directly to the network. So if there&#8217;s no network available, the content doesn&#8217;t load. This is the bug and it causes missing portion of the map.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I only stumbled across this now because I was testing a map from a <code>\/test\/<\/code> subdirectory which has all caching disabled so these requests didn&#8217;t fall back use the browser&#8217;s regular cache. Normal hosted maps &#8212; the ones I tend to use when out and about &#8212; are fairly aggressively cached by the client. So it seems the only way this would be seen on a current map is to load it, let it sit until the cache expires (one day), lose data service, then try to load the map again. And only on WebKit browsers, such as Safari, which I rarely use. But exactly the sort of thing a normal user could stumble across when using maps in a remote area.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So, for now (until this is fixed), my maps detect if it is being run via WebKit and if so, only uses one web worker (commit <a href=\"https:\/\/github.com\/c0nsumer\/trailmaps.app-map-generator\/commit\/d6afb18cb5a933ff688c071fdf0f553af84cc2c1\">d6afb18<\/a>). <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A coworker wasn&#8217;t able to reproduce this on Safari 27.3 on an iOS beta, so I&#8217;m hopeful this gets fixed soon. At least I now understand what&#8217;s happening, why, and have a workaround.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last night, while going through some testing of trailmaps.app-map-generator I ran into a reproducible bug when trying to load a test maps offline (in Airplane mode): some of the map tiles wouldn&#8217;t load (see the gray lower half in the image to the right). I first expected this to be another offline-mode app bug that\u2026<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,57],"tags":[],"class_list":["post-24983","post","type-post","status-publish","format-standard","hentry","category-computers","category-mapping"],"_links":{"self":[{"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/posts\/24983","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/comments?post=24983"}],"version-history":[{"count":7,"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/posts\/24983\/revisions"}],"predecessor-version":[{"id":24992,"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/posts\/24983\/revisions\/24992"}],"wp:attachment":[{"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/media?parent=24983"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/categories?post=24983"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/tags?post=24983"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}