MudSelect - throws JsException (6.0.2 works fine, 6.0.2 > throws error)
See original GitHub issueBug type
Component
Component name
MudSelect
What happened?
I created this issue, because the issues i have found are only regarding Blazor WASM and the provided solution (clearing the cache) has not worked for me.
I am using Blazor Server for my project and develop with Jetbrains Rider on Windows 10. The strange thing is, that when you run the project locally (localhost) then it works as it should. I build the project with “dotnet publish -r linux-x64 --self-contained” and run it on a CentOS 8 server.
As soon as I try to click the MudSelect an error is raised.
Here is the MudBlazor code: <MudSelect T="string" Label="Coffee" AnchorOrigin="Origin.BottomCenter"> <MudSelectItem Value=“@(“Cappuccino”)” /> <MudSelectItem Value=“@(“Cafe Latte”)” /> <MudSelectItem Value=“@(“Espresso”)” /> </MudSelect>
Expected behavior
Microsoft.JSInterop.JSException: Could not find ‘mudKeyInterceptor.updatekey’ (‘updatekey’ was undefined).
Reproduction link
N/A
Reproduction steps
- open a page where the component <MudSelect> is used
- click the “dropdown” (MudSelect)
Relevant log output
Error: Microsoft.JSInterop.JSException: Could not find 'mudKeyInterceptor.updatekey' ('updatekey' was undefined).
Error: Could not find 'mudKeyInterceptor.updatekey' ('updatekey' was undefined).
at http://{server_url}/_framework/blazor.server.js:1:497
at Array.forEach (<anonymous>)
at i.findFunction (http://{server_url}/_framework/blazor.server.js:1:465)
at E (http://{server_url}/_framework/blazor.server.js:1:2606)
at http://{server_url}/_framework/blazor.server.js:1:3494
at new Promise (<anonymous>)
at kt.beginInvokeJSFromDotNet (http://{server_url}/_framework/blazor.server.js:1:3475)
at http://{server_url}/_framework/blazor.server.js:1:72086
at Array.forEach (<anonymous>)
at kt._invokeClientMethod (http://{server_url}/_framework/blazor.server.js:1:72072)
at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
at MudBlazor.Services.KeyInterceptor.UpdateKey(KeyOptions option)
at MudBlazor.MudSelect`1.OpenMenu()
at MudBlazor.MudSelect`1.ToggleMenu()
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
Version (bug)
6.2.3
Version (working)
6.0.2
What browsers are you seeing the problem on?
Chrome
On what operating system are you experiencing the issue?
Linux
Pull Request
- I would like to do a Pull Request
Code of Conduct
- I agree to follow this project’s Code of Conduct
Issue Analytics
- State:
- Created 4 months ago
- Comments:6 (4 by maintainers)
What if you clear all files from the publish folder on the Linux server? They should be overwritten but it’s worth a shot.
@Mr-Technician the “wwwroot” folder is not overwritten in our case, because there lies a lot of data. after taking a closer look and comparing the files, i noticed, that the “_content” folder was not present. In this “_content” folder, there lies the MudBlazor.min.js.
So basically this problem was self inflicted, because i did not update the contents of the “wwwroot” folder. After updating the contents of “wwwroot” everything works!
Thank you very much for your help and for the quick answers. 🥇