Meta tags:
description= Command build Is this a regression? Yes. It started with the debug IDs in 22.1.0. Description Follow-up to #34574. The builder names polyfills- hash .js and main- hash .js first. Then it adds a //# debugId= id line to the file. It compu...;
Headings (most frequently used words):
the, navigation, debug, id, of, file, description, metadata, footer, jsaguet, commented, on, nov, 2026, cause, changes, bytes, polyfills, and, main, but, not, their, names, so, cached, files, fail, sri, check, 34674, menu, repository, activity, issue, actions, command, is, this, regression, minimal, reproduction, exception, or, error, your, environment, anything, else, relevant, second, entry, chunk, optimizer, first, assignees, labels, type, projects, milestone, relationships, development,
Text of the page (most frequently used words):
the (149), and (41), build (32), file (25), #angular (19), that (18), name (18), debug (17), main (17), for (15), bytes (15), files (15), names (15), github (14), npx (14), with (13), repro (13), not (12), #polyfills (12), new (11), chunk (11), this (10), source (10), same (10), fix (10), 2026 (9), builder (9), cause (9), map (9), changes (9), you (8), projects (8), option (8), but (8), change (8), when (8), sri (8), from (8), optimizer (8), nov (8), would (7), code (7), then (7), their (7), actions (6), more (6), its (6), hash (6), cached (6), chunks (6), both (6), jsaguet (6), browser (6), debugid (6), can (5), security (5), copilot (5), issue (5), sign (5), upgrade (5), import (5), index (5), html (5), release (5), line (5), cli (5), npm (5), install (5), config (5), architect (5), production (5), fail (5), check (5), your (5), time (4), open (4), app (4), one (4), have (4), second (4), first (4), after (4), each (4), copy (4), adds (4), only (4), bundles (4), are (4), hashed (4), maps (4), hashes (4), does (4), esbuild (4), computes (4), stays (4), content (4), generate (4), has (4), routes (4), configurations (4), dist (4), true (4), support (4), navigation (3), needstriage (3), milestone (3), area (3), comment (3), already (3), step (3), once (3), final (3), initialfiles (3), script (3), imports (3), ssr (3), still (3), rule (3), fixes (3), old (3), lazy (3), entryfilenames (3), entry (3), cover (3), builds (3), two (3), different (3), component (3), subresourceintegrity (3), path (3), loadcomponent (3), zone (3), resource (3), link (3), 34674 (3), quality (3), another (3), tab (3), window (3), refresh (3), session (3), reload (3), developers (3), changelog (3), customer (3), enterprise (3), grade (3), features (3), all (3), community (2), status (2), footer (2), pull (2), requests (2), development (2), none (2), yet (2), type (2), labels (2), metadata (2), rename (2), like (2), other (2), prefer (2), now (2), current (2), bug (2), next (2), writes (2), differently (2), every (2), gets (2), those (2), rewrite (2), also (2), needs (2), metafile (2), must (2), renames (2), use (2), them (2), keep (2), compute (2), see (2), options (2), way (2), cache (2), runs (2), passes (2), too (2), how (2), causes (2), author (2), contributor (2), commented (2), possible (2), chunkfilenames (2), write (2), pin (2), defaults (2), false (2), sourcemap (2), eof (2), did (2), 34583 (2), added (2), robot (2), rewritten (2), integrity (2), qwjlbg44 (2), hhnd32nm (2), x_google_ignorelist (2), add (2), description (2), insights (2), 196 (2), repository (2), signed (2), universe (2), training (2), integrations (2), stories (2), center (2), documentation (2), learn (2), business (2), products (2), secret (2), perform, action, share, personal, information, manage, cookies, contact, docs, privacy, terms, inc, branches, relationships, due, date, assigned, assignees, account, join, conversation, free, accept, application, built, which, pick, direction, keeping, without, avoids, problem, comes, back, any, whatever, cost, because, inside, generated, locale, own, stats, table, print, output, replaced, placeholder, includes, reach, through, rollup, handle, cycles, updates, get, manifest, service, worker, injectdebugids, force, version, constant, safe, carry, exists, don, augmentchunkhash, later, longer, breaks, need, note, tells, users, purge, these, picks, therefore, failure, affect, apps, contain, lowercase, letters, three, calls, uses, outputhashing, want, hold, contains, looked, small, trade, off, maintainer, should, decide, give, update, jbvvgizd, bldq8cju, bsxymvae, u95iy, da40ilvd, dzobh1dd, difference, 5h54s2wb, cat, src, export, const, router, keeps, gave, symptom, above, changed, title, activity, before, covers, expected, anything, else, relevant, core, node, macos, environment, failed, find, valid, digest, attribute, https, example, com, jtoapwzj, computed, sha, 384, been, blocked, exception, error, urls, key, order, d932f97d, b667, 5462, b3b7, b328a1ce7f5a, 81c8766a, 7d41, 50fd, ac6d, 16c3c4ed6358, e3a30145, 1442, 57c2, 96a7, a88f9bf43b0a, 50dd2d3c, f1e3, 5224, 9587, 43f24f562421, differs, minimal, reproduction, fixed, such, pins, cdn, kept, under, url, serves, blocks, happened, commit, moved, start, 5a0d226, rewrites, follow, 34574, yes, started, ids, regression, command, body, opened, items, issues, message, dismiss, alert, switched, accounts, out, appearance, settings, search, pricing, event, talks, workshops, what, partners, about, company, forum, events, webinars, blog, connect, resources, premium, advanced, ons, trust, why, evaluate, industries, government, manufacturing, financial, services, healthcare, industry, nonprofits, startups, team, enterprises, stage, businesses, latest, improvements, across, place, developer, articles, sponsors, trending, repos, explore, customize, certifications, scanning, leak, prevention, protection, vulnerability, detection, remediation, secure, cloud, environments, codespaces, analysis, enforcement, automation, ship, coding, agent, tasks, automated, work, hosting, review, collaboration, platform, menu, skip,
Text of the page (random words):
debug id changes the bytes of polyfills and main but not their file names so cached files fail the sri check issue 34674 angular angular cli github skip to content navigation menu sign in products platform github repository hosting code review and collaboration copilot ai coding agent for tasks projects and automated work build ship actions ci cd and automation code quality quality analysis fixes and enforcement codespaces cloud development environments secure code security vulnerability detection and remediation secret protection secret scanning and leak prevention all features developers learn documentation training certifications build build with copilot customize copilot integrations explore trending repos github sponsors developer articles changelog changelog your source for the latest features improvements and fixes across github products all in one place businesses by stage enterprises team startups nonprofits by industry healthcare financial services manufacturing government see all industries evaluate github why github customer stories business insights trust center add ons github advanced security enterprise grade code security copilot for business enterprise grade ai features premium support enterprise grade 24 7 support resources learn connect documentation resource center blog events webinars community forum customer stories integrations support customer support training github status company about partners changelog github universe github universe the event for developers by developers talks workshops and what s next for github pricing search sign in sign up appearance settings you signed in with another tab or window reload to refresh your session you signed out in another tab or window reload to refresh your session you switched accounts on another tab or window reload to refresh your session dismiss alert message angular angular cli repository navigation code issues 196 196 pull requests 20 20 actions security and quality 8 8 insights more items debug id changes the bytes of polyfills and main but not their file names so cached files fail the sri check 34674 new issue copy link new issue copy link open open debug id changes the bytes of polyfills and main but not their file names so cached files fail the sri check 34674 copy link labels area angular build milestone needstriage description jsaguet opened on nov 8 2026 issue body actions command build is this a regression yes it started with the debug ids in 22 1 0 description follow up to 34574 the builder names polyfills hash js and main hash js first then it adds a debugid id line to the file it computes id from the source map after it rewrites the map to add x_google_ignorelist the file name does not cover that line so when a builder release writes the source map differently the js bytes change and the file name stays the same 22 1 8 did that commit 5a0d226 moved x_google_ignorelist to the start of the map with subresourceintegrity the new index html pins the new bytes a cdn or browser cache that kept the old file under the same url serves the old bytes and the browser blocks the script this happened to us in production with polyfills hash js 34583 fixed this for the chunks of the chunk optimizer it does not cover files that esbuild names such as main and polyfills 22 2 6 still computes their debug id from the rewritten map minimal reproduction npx angular cli 22 1 8 new repro defaults ssr false cd repro npm install zone js npm install d angular build 22 1 6 npx ng config projects repro architect build options polyfills zone js npx ng config projects repro architect build configurations production sourcemap true npx ng config projects repro architect build configurations production subresourceintegrity true npx ng build mv dist repro browser build 22 1 6 npm install d angular build 22 1 8 npx ng build mv dist repro browser build 22 1 8 both builds write polyfills qwjlbg44 js and main hhnd32nm js in each file only the debugid line differs polyfills qwjlbg44 js build 22 1 6 debugid d932f97d b667 5462 b3b7 b328a1ce7f5a build 22 1 8 debugid 81c8766a 7d41 50fd ac6d 16c3c4ed6358 main hhnd32nm js build 22 1 6 debugid e3a30145 1442 57c2 96a7 a88f9bf43b0a build 22 1 8 debugid 50dd2d3c f1e3 5224 9587 43f24f562421 the two index html files pin different hashes for the same urls for both files the two source maps have the same content in a different key order exception or error failed to find a valid digest in the integrity attribute for resource https example com polyfills jtoapwzj js with computed sha 384 integrity the resource has been blocked your environment angular cli 22 1 8 angular build 22 1 6 then 22 1 8 angular core 22 2 5 zone js 0 16 3 node 24 17 0 os macos anything else relevant expected when the bytes of a hashed file change its name changes too a possible fix is to compute the debug id from the js before the builder adds the debug id line not from the rewritten map the file name already covers the js activity angular robot added area angular build on nov 8 2026 angular robot added this to the needstriage milestone on nov 8 2026 jsaguet changed the title debug id changes the bytes of main and polyfills but not their file names so cached files fail the sri check debug id changes the bytes of polyfills and main but not their file names so cached files fail the sri check on nov 8 2026 jsaguet commented on nov 8 2026 jsaguet on nov 8 2026 contributor author more actions the same symptom has a second cause the entry file of the chunk optimizer the debug id fix above does not fix it the chunk optimizer runs when an app has 3 or more lazy chunks it renames the lazy chunks and main imports them by name but the optimizer passes chunkfilenames and no entryfilenames so main keeps the name that esbuild gave it so when a builder release changes how the optimizer names chunks the bytes of main change and its name stays the same 22 2 6 did that with 34583 npx angular cli 22 2 5 new repro defaults ssr false cd repro npm install d angular build 22 2 5 npx ng generate component a npx ng generate component b npx ng generate component c cat src app app routes ts eof import routes from angular router export const routes routes path a loadcomponent import a a then m m a path b loadcomponent import b b then m m b path c loadcomponent import c c then m m c eof npx ng config projects repro architect build configurations production sourcemap true npx ng config projects repro architect build configurations production subresourceintegrity true npx ng build mv dist repro browser build 22 2 5 npm install d angular build 22 2 6 npx ng build mv dist repro browser build 22 2 6 both builds write main 5h54s2wb js and the two index html files pin different hashes for it the only difference in the file is the names of the chunks it imports build 22 2 5 chunk jbvvgizd js chunk bldq8cju js chunk bsxymvae js build 22 2 6 chunk dn u95iy js chunk da40ilvd js chunk dzobh1dd js the debug id and the source map of main are the same in both builds a possible fix is to give the entry a content hash with entryfilenames the same way as chunkfilenames and to update index html with the new name a fix that computes every file name from its final bytes would cover both causes jsaguet commented on nov 8 2026 jsaguet on nov 8 2026 contributor author more actions i looked at how to fix both causes the fix for the second cause is small the fix for the first cause has a trade off that a maintainer should decide the rule i want to keep is that when the bytes of a hashed file change its name changes too that rule must also hold on the upgrade to the release that contains the fix second cause the entry file of the chunk optimizer the fix passes entryfilenames to the three generate calls in chunk optimizer ts so main gets a content hash when bundles are hashed initialfiles then uses the new name with outputhashing none the file stays main js when the optimizer runs the name of main can now contain lowercase letters _ and as the names of the lazy chunks already do first cause the debug id the builder adds the debug id line after esbuild picks the file name if the builder computes the id in a new way the bytes of each file change and its name stays the same the release that fixes this bug would therefore cause the same sri failure one more time it would affect apps that use script source maps and sri and still have the old files in a cache i see these options compute the debug id from the file name and the js a later rewrite of the source map can no longer change the js the upgrade still breaks the rule once so the release would need a note that tells users to purge cached js do option 1 and force a one time rename this needs a version comment in the esbuild bundles and a constant in augmentchunkhash the upgrade is safe but the bundles carry a comment that exists only to change a hash i don t like this option keep the current debug id and name the files from their final bytes this is the option i prefer option 3 adds a step after injectdebugids only when bundles are hashed and script source maps are on the step hashes each js file with the names of the other output files replaced by a placeholder it includes the hashes of the files that the js file can reach through imports as rollup does to handle import cycles it then renames the files and updates those names in the js and the source maps initialfiles and the metafile get the new names so the index html sri the ssr manifest and the service worker use them with option 3 every file with a debug id gets a new name once on the upgrade after that any change to the bytes of those files changes the name whatever the cause the cost is more code because the builder would rewrite file names inside generated code each locale also needs its own copy of initialfiles and the metafile and the build stats table must print the final names keeping the current debug id without option 3 avoids the upgrade problem but the bug comes back the next time the builder writes the source map differently would you accept a rename step like option 3 in the application builder i have not built it yet if you would not which other option do you prefer i can open a pr for the second cause now and a pr for the first cause once you pick a direction sign up for free to join this conversation on github already have an account sign in to comment metadata metadata assignees no one assigned labels area angular build type no type projects no projects milestone needstriage no due date relationships none yet development no branches or pull requests issue actions open in github copilot app footer 2026 github inc footer navigation terms privacy security status community docs contact manage cookies do not share my personal information you can t perform that action at this time
|