Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to handle caching issues? #2208

Closed
MarvinKlein1508 opened this issue Jun 18, 2024 · 3 comments
Closed

How to handle caching issues? #2208

MarvinKlein1508 opened this issue Jun 18, 2024 · 3 comments
Labels
closed:duplicate Duplicate of another issue triage New issue. Needs to be looked at

Comments

@MarvinKlein1508
Copy link
Contributor

Since the library has been updated to v4.8.0 I'm getting this issue for every user who has visited my site before.

Unhandled exception rendering component: element.addEventListener is not a function
TypeError: element.addEventListener is not a function
    at Module.RegisterKeyCode (https://hstrend.scholzdom.local/_content/Microsoft.FluentUI.AspNetCore.Components/Components/KeyCode/FluentKeyCode.razor.js:47:17)
    at https://hstrend.scholzdom.local/_framework/blazor.web.js?:1:2894
    at new Promise (<anonymous>)
    at v.beginInvokeJSFromDotNet (https://hstrend.scholzdom.local/_framework/blazor.web.js?:1:2851)
    at vn._invokeClientMethod (https://hstrend.scholzdom.local/_framework/blazor.web.js?:1:65711)
    at vn._processIncomingData (https://hstrend.scholzdom.local/_framework/blazor.web.js?:1:63100)
    at connection.onreceive (https://hstrend.scholzdom.local/_framework/blazor.web.js?:1:56741)
    at i.onmessage (https://hstrend.scholzdom.local/_framework/blazor.web.js?:1:80689)
Microsoft.JSInterop.JSException: element.addEventListener is not a function
TypeError: element.addEventListener is not a function
    at Module.RegisterKeyCode (https://hstrend.scholzdom.local/_content/Microsoft.FluentUI.AspNetCore.Components/Components/KeyCode/FluentKeyCode.razor.js:47:17)
    at https://hstrend.scholzdom.local/_framework/blazor.web.js?:1:2894
    at new Promise (<anonymous>)
    at v.beginInvokeJSFromDotNet (https://hstrend.scholzdom.local/_framework/blazor.web.js?:1:2851)
    at vn._invokeClientMethod (https://hstrend.scholzdom.local/_framework/blazor.web.js?:1:65711)
    at vn._processIncomingData (https://hstrend.scholzdom.local/_framework/blazor.web.js?:1:63100)
    at connection.onreceive (https://hstrend.scholzdom.local/_framework/blazor.web.js?:1:56741)
    at i.onmessage (https://hstrend.scholzdom.local/_framework/blazor.web.js?:1:80689)
   at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
   at Microsoft.FluentUI.AspNetCore.Components.FluentKeyCode.OnAfterRenderAsync(Boolean firstRender) in /_/src/Core/Components/KeyCode/FluentKeyCode.razor.cs:line 126
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

A quick look to file shows that the browser holds a cached version of this. Is there any easy way to clear the cache globally for this so I don't need to call every user to manually refresh the cache?

@microsoft-github-policy-service microsoft-github-policy-service bot added the triage New issue. Needs to be looked at label Jun 18, 2024
@Lindsay-Mathieson
Copy link

Dunno if theres a way to globally force a refresh, but I explicitly set the fluentui package version to 4.7.2 and republished to work around this.

@Lindsay-Mathieson
Copy link

nb. This is being worked on for the next version:

#2205 (comment)

@vnbaaij vnbaaij added the closed:duplicate Duplicate of another issue label Jun 18, 2024
@vnbaaij
Copy link
Collaborator

vnbaaij commented Jun 18, 2024

Duplicate of #2205

@vnbaaij vnbaaij marked this as a duplicate of #2205 Jun 18, 2024
@vnbaaij vnbaaij closed this as completed Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed:duplicate Duplicate of another issue triage New issue. Needs to be looked at
Projects
None yet
Development

No branches or pull requests

3 participants