question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MudSelect - throws JsException (6.0.2 works fine, 6.0.2 > throws error)

See original GitHub issue

Bug 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

  1. open a page where the component <MudSelect> is used
  2. 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:closed
  • Created 4 months ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
Mr-Techniciancommented, May 12, 2023

What if you clear all files from the publish folder on the Linux server? They should be overwritten but it’s worth a shot.

1reaction
Flogoat01commented, May 12, 2023

@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. 🥇

Read more comments on GitHub >

github_iconTop Results From Across the Web

MudSelect Issue in Blazor WASM
I want to display the department's name in MudSelect. However, I need to bind DepartmentID . The code that below works partially, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found