Skip to content

BrowserDimensionWatcher: a page from before a roll fails to import the old hashed PortalLayoutBase.razor.js and the circuit dies #1572

Closed

Description

@meshweaver-cloud

What is failing
BrowserDimensionWatcher.OnAfterRenderAsync calls JSRuntime.InvokeAsync to invoke window.getWindowDimensions, which throws a JSException because the function does not exist on the client.

Probable cause — high confidence
The Blazor JS interop call expects window.getWindowDimensions to be defined, but it isn't. The companion JS module (likely BrowserDimensionWatcher.razor.js or a JS initializer) that defines this function was not loaded before the Blazor circuit tried to invoke it — or was never shipped at all. The error message says "The value 'window.getWindowDimensions' is not a function", which is definitive.

Impact — very low
1 occurrence on 1 pod, no recurrence. The failed JS call crashed a single Blazor circuit for one user session; the server-side circuit would have been disposed. No ongoing or widespread impact.

Where to look

  • src/MeshWeaver.Blazor.Portal/Resize/BrowserDimensionWatcher.cs ~line 52 — the InvokeAsync call.
  • The companion JS module that defines window.getWindowDimensions — verify it's included in the build output and that the function name matches the C# code.
  • Consider a guard: wrap the interop call in a try/catch or check typeof window.getWindowDimensions !== 'undefined' before invoking.

Evidence

Fingerprint 9b5a1d7b61c6a731
Category Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost
Severity Error
Exception Microsoft.JSInterop.JSException
Top frame MeshWeaver.Blazor.Portal.Resize.BrowserDimensionWatcher.OnAfterRenderAsync(Boolean firstRender)
Namespace memex-cloud
Pods memex-portal-deployment-579c55987c-pphxb
Occurrences 1
First seen 2026-08-14 14:23:00Z
Last seen 2026-08-14 14:23:00Z
Recent log lines
2026-08-14 14:23:00Z memex-portal-deployment-579c55987c-pphxb fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
      Unhandled exception in circuit 'dNVeR2EcK64IAZXaN-CSown8ow-e9yTYf0oXzL795mw'.
      Microsoft.JSInterop.JSException: The value 'window.getWindowDimensions' is not a function.
      @https://memex.meshweaver.cloud/_framework/blazor.web.js:1:519
      resolveInvocationHandler@https://memex.meshweaver.cloud/_framework/blazor.web.js:1:1428
      processJSCall@https://memex.meshweaver.cloud/_framework/blazor.web.js:1:4441
      beginInvokeJSFromDotNet@https://memex.meshweaver.cloud/_framework/blazor.web.js:1:4138
      beginInvokeJSFromDotNet@https://memex.meshweaver.cloud/_framework/blazor.web.js:1:4358
      _invokeClientMethod@https://memex.meshweaver.cloud/_framework/blazor.web.js:1:69353
      _invokeClientMethod@https://memex.meshweaver.cloud/_framework/blazor.web.js:1:70160
      _processIncomingData@https://memex.meshweaver.cloud/_framework/blazor.web.js:1:66732
      @https://memex.meshweaver.cloud/_framework/blazor.web.js:1:84431
         at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, JSCallType callType, Object[] args)
         at MeshWeaver.Blazor.Portal.Resize.BrowserDimensionWatcher.OnAfterRenderAsync(Boolean firstRender) in /home/runner/work/MeshWeaver/MeshWeaver/src/MeshWeaver.Blazor.Portal/Resize/BrowserDimensionWatcher.cs:line 52
         at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

Opened automatically from Admin/_LogIncident/9b5a1d7b61c6a731. Recurrences are folded into this issue rather than opening new ones.

Activity

  1. added a commit that references this issue on Aug 14, 2026
  2. systemorph-com commented on Sep 26, 2026

    @systemorph-com
    Contributor

    Reopened — this fault is happening again.

    Still occurring: 2 more since the last update (3 total).

    • Last seen: 2026-09-24 13:36:24Z
    • Pods: memex-portal-deployment-56fbdcd48f-cbms9, memex-portal-deployment-579c55987c-pphxb
    Recent log lines
    2026-08-14 14:23:00Z memex-portal-deployment-579c55987c-pphxb fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
          Unhandled exception in circuit 'dNVeR2EcK64IAZXaN-CSown8ow-e9yTYf0oXzL795mw'.
          Microsoft.JSInterop.JSException: The value 'window.getWindowDimensions' is not a function.
          @https://memex.meshweaver.cloud/_framework/blazor.web.js:1:519
          resolveInvocationHandler@https://memex.meshweaver.cloud/_framework/blazor.web.js:1:1428
          processJSCall@https://memex.meshweaver.cloud/_framework/blazor.web.js:1:4441
          beginInvokeJSFromDotNet@https://memex.meshweaver.cloud/_framework/blazor.web.js:1:4138
          beginInvokeJSFromDotNet@https://memex.meshweaver.cloud/_framework/blazor.web.js:1:4358
          _invokeClientMethod@https://memex.meshweaver.cloud/_framework/blazor.web.js:1:69353
          _invokeClientMethod@https://memex.meshweaver.cloud/_framework/blazor.web.js:1:70160
          _processIncomingData@https://memex.meshweaver.cloud/_framework/blazor.web.js:1:66732
          @https://memex.meshweaver.cloud/_framework/blazor.web.js:1:84431
             at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, JSCallType callType, Object[] args)
             at MeshWeaver.Blazor.Portal.Resize.BrowserDimensionWatcher.OnAfterRenderAsync(Boolean firstRender) in /home/runner/work/MeshWeaver/MeshWeaver/src/MeshWeaver.Blazor.Portal/Resize/BrowserDimensionWatcher.cs:line 52
             at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
    2026-09-24 13:36:23Z memex-portal-deployment-56fbdcd48f-cbms9 fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
          Unhandled exception in circuit 'WF7YiDlIfrGpPZG_iLgcgQiz2sOEyJuTLK7MIWqCMXE'.
          Microsoft.JSInterop.JSException: Failed to fetch dynamically imported module: https://memex.systemorph.com/_content/MeshWeaver.Blazor.Portal/Layout/PortalLayoutBase.oz91uswdy8.razor.js
          TypeError: Failed to fetch dynamically imported module: https://memex.systemorph.com/_content/MeshWeaver.Blazor.Portal/Layout/PortalLayoutBase.oz91uswdy8.razor.js
             at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, JSCallType callType, Object[] args)
             at MeshWeaver.Blazor.Portal.Resize.BrowserDimensionWatcher.OnAfterRenderAsync(Boolean firstRender) in /home/runner/work/MeshWeaver/MeshWeaver/plugins-repo/src/MeshWeaver.Blazor.Portal/Resize/BrowserDimensionWatcher.cs:line 86
             at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
    2026-09-24 13:36:24Z memex-portal-deployment-56fbdcd48f-cbms9 fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
          Unhandled exception in circuit 'dsGHcSWVYaaNgaCOC9Vj6ljR7y8pwW2tZ-vvKTGC-wM'.
          Microsoft.JSInterop.JSException: Failed to fetch dynamically imported module: https://memex.systemorph.com/_content/MeshWeaver.Blazor.Portal/Layout/PortalLayoutBase.oz91uswdy8.razor.js
          TypeError: Failed to fetch dynamically imported module: https://memex.systemorph.com/_content/MeshWeaver.Blazor.Portal/Layout/PortalLayoutBase.oz91uswdy8.razor.js
             at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, JSCallType callType, Object[] args)
             at MeshWeaver.Blazor.Portal.Resize.BrowserDimensionWatcher.OnAfterRenderAsync(Boolean firstRender) in /home/runner/work/MeshWeaver/MeshWeaver/plugins-repo/src/MeshWeaver.Blazor.Portal/Resize/BrowserDimensionWatcher.cs:line 86
             at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
    

    Re-addressed by the current identity function: this incident inherited 9b5a1d7b61c6a731 (Systemorph/MeshWeaver.Plugins#1796). Those nodes are superseded and will not fold, file or comment again.

  3. added
    area:layoutCore subsystem: layout areas and UI composition
    bugSomething isn't working
    sev:LLow - cosmetic, rare edge case, or developer-only
    on Sep 26, 2026
  4. systemorph-com commented on Oct 2, 2026

    @systemorph-com
    Contributor

    Still occurring: 1 more since the last update (4 total).

    • Last seen: 2026-10-02 10:54:52Z
    • Pods: memex-portal-deployment-56fbdcd48f-cbms9, memex-portal-deployment-579c55987c-pphxb, memex-portal-deployment-df798b484-47rwr
    Recent log lines
    2026-09-24 13:36:23Z memex-portal-deployment-56fbdcd48f-cbms9 fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
          Unhandled exception in circuit 'WF7YiDlIfrGpPZG_iLgcgQiz2sOEyJuTLK7MIWqCMXE'.
          Microsoft.JSInterop.JSException: Failed to fetch dynamically imported module: https://memex.systemorph.com/_content/MeshWeaver.Blazor.Portal/Layout/PortalLayoutBase.oz91uswdy8.razor.js
          TypeError: Failed to fetch dynamically imported module: https://memex.systemorph.com/_content/MeshWeaver.Blazor.Portal/Layout/PortalLayoutBase.oz91uswdy8.razor.js
             at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, JSCallType callType, Object[] args)
             at MeshWeaver.Blazor.Portal.Resize.BrowserDimensionWatcher.OnAfterRenderAsync(Boolean firstRender) in /home/runner/work/MeshWeaver/MeshWeaver/plugins-repo/src/MeshWeaver.Blazor.Portal/Resize/BrowserDimensionWatcher.cs:line 86
             at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
    2026-09-24 13:36:24Z memex-portal-deployment-56fbdcd48f-cbms9 fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
          Unhandled exception in circuit 'dsGHcSWVYaaNgaCOC9Vj6ljR7y8pwW2tZ-vvKTGC-wM'.
          Microsoft.JSInterop.JSException: Failed to fetch dynamically imported module: https://memex.systemorph.com/_content/MeshWeaver.Blazor.Portal/Layout/PortalLayoutBase.oz91uswdy8.razor.js
          TypeError: Failed to fetch dynamically imported module: https://memex.systemorph.com/_content/MeshWeaver.Blazor.Portal/Layout/PortalLayoutBase.oz91uswdy8.razor.js
             at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, JSCallType callType, Object[] args)
             at MeshWeaver.Blazor.Portal.Resize.BrowserDimensionWatcher.OnAfterRenderAsync(Boolean firstRender) in /home/runner/work/MeshWeaver/MeshWeaver/plugins-repo/src/MeshWeaver.Blazor.Portal/Resize/BrowserDimensionWatcher.cs:line 86
             at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
    2026-10-02 10:54:52Z memex-portal-deployment-df798b484-47rwr fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
          Unhandled exception in circuit 'C2Wv1oJv9Re_DQotm_lUyd35_KgRAXYmC9oBct0y20k'.
          Microsoft.JSInterop.JSException: Failed to fetch dynamically imported module: https://memex.systemorph.com/_content/MeshWeaver.Blazor.Portal/Layout/PortalLayoutBase.t11nqvvtwz.razor.js
          TypeError: Failed to fetch dynamically imported module: https://memex.systemorph.com/_content/MeshWeaver.Blazor.Portal/Layout/PortalLayoutBase.t11nqvvtwz.razor.js
             at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, JSCallType callType, Object[] args)
             at MeshWeaver.Blazor.Portal.Resize.BrowserDimensionWatcher.OnAfterRenderAsync(Boolean firstRender) in /home/runner/work/MeshWeaver/MeshWeaver/plugins-repo/src/MeshWeaver.Blazor.Portal/Resize/BrowserDimensionWatcher.cs:line 107
             at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
    

    Re-addressed by the current identity function: this incident inherited 9b5a1d7b61c6a731 (Systemorph/MeshWeaver.Plugins#1796). Those nodes are superseded and will not fold, file or comment again.

  5. rbuergi commented on Oct 8, 2026

    @rbuergi
    Contributor

    The defect in the title is fixed: the watcher imports its own module (BrowserDimensionWatcher.cs, since 6260d2967), and window.getWindowDimensions is not a function has not recurred since 2026-08-14.

    The four later recurrences (2026-09-24 ×2, 2026-10-02) are a different defect that shares the fingerprint: Failed to fetch dynamically imported module …PortalLayoutBase.<hash>.razor.js, with a different hash each time. That fits cross-replica static-asset skew during a roll (a page from one build fetching its fingerprinted asset from a replica on another build); not established that a roll was in progress at those minutes. Catching the import failure would hide the skew, so it should be tracked as its own defect. Related, not a duplicate: #6011.

    sev:L sweep, Claude Opus 5.5 (agent session).

  6. rbuergi commented on Oct 9, 2026

    @rbuergi
    Contributor

    Retitled to the defect this issue now tracks. The original shape (window.getWindowDimensions is not a function) is fixed and has been quiet since 2026-08-14. Its incident 9b5a1d7b61c6a731 is Superseded and folded into Admin/_LogIncident/90a20f919178492a, which carries issueNumber: 1572 and routes all recurrences here.

    That incident records 3 occurrences of the new shape:

    • 2026-09-24 13:36Z (×2, pod 56fbdcd48f-cbms9)
    • 2026-10-02 10:54Z (df798b484-47rwr)

    Each one is Failed to fetch dynamically imported module …/PortalLayoutBase.<hash>.razor.js, from BrowserDimensionWatcher.OnAfterRenderAsync, with a different hash each time (oz91uswdy8, t11nqvvtwz).

    Blocker: a design decision on how a pre-roll page recovers from a fingerprinted asset the new build no longer serves. The options are to keep the previous build's _content assets for a grace window, or to reload the page once on a module-fetch failure. Catching the JSException alone would hide the skew. Not established: whether a roll was in progress at those three minutes.

    sev:L sweep, Claude Opus 5.5 (agent session).

  7. changed the title [-]BrowserDimensionWatcher calls window.getWindowDimensions before the JS function is registered[/-] [+]BrowserDimensionWatcher: a page from before a roll fails to import the old hashed PortalLayoutBase.razor.js and the circuit dies[/+] on Oct 9, 2026
  8. rbuergi commented on Oct 11, 2026

    @rbuergi
    Contributor

    Closing: both defects this issue has tracked are fixed and live.

    1. window.getWindowDimensions is not a function (the original shape): the watcher imports its own module since 6260d2967. Quiet since 2026-08-14.
    2. A page from before a roll asks for another build's hashed module (the retitled shape): MeshWeaver.Plugins#3302 (merged 2026-10-10 20:10Z). The decision the 10-09 comment asked for was made there: the page reloads once, so that it matches the build its circuit runs on. The import failure is matched only when the failed URL is this module under a name this build does not serve, so a missing asset of the current build still reaches the renderer. The reload is recorded per tab in sessionStorage and cleared by the next successful import, so two builds coexisting during a roll cannot loop it. DimensionWatcherPageFromAnotherBuildTest covers Chromium's and Firefox's wording, the once-per-tab rule and disposal while the reload is being recorded.

    What is running. /api/version on memex.meshweaver.cloud, memex.systemorph.com and control.systemorph.com reads core e438ab89 (read 2026-10-11 ~11:00Z). memex-cloud has 3/3 replicas on image 3.1.10517, started 10:28–10:31Z (Ops/Status/memex-cloud, sampled 10:57Z), and its /health publication-seal names the Plugins module set 42156f2a (sealed). e84154b14 (#3302's merge) is an ancestor of 42156f2a.

    Reading. Incident ledger: 90a20f919178492a last updated 2026-10-02 10:56Z (3 occurrences: 2026-09-24 ×2, 2026-10-02). Nothing since.

    Ledger control. The incident ledger (Admin/_LogIncident on memex.systemorph.com) is being written: its newest incident update is 2026-10-11 11:03Z. A recurrence of this fingerprint reopens this issue automatically, as it did on #1572.

    What a recurrence would look like now. Not a dead circuit. Either a Warning the page's import map names a module from another build … reloading the page, or an Error carrying the page is not reloaded: and the reason, when the tab was already reloaded once. Safari's wording names no URL and is deliberately not matched, so that shape would still arrive here.

    Not established. No pre-roll tab was held open across a roll on purpose. A direct log read was not possible today: the governed Logs actions Ops/Actions/wV-20261011-* failed on Loki (429 too many outstanding requests, one 45 s budget miss). The reading here is the incident ledger, which is fed by the same log lines.

    issue wave 2026-10-11, Claude Opus 5.5 (agent session).

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:layoutCore subsystem: layout areas and UI compositionbugSomething isn't workingfeature:portal-crashFeature: portal crashsev:LLow - cosmetic, rare edge case, or developer-only

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions