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

Is ThemeManager Broken in version 7? MissingMethodException: Method not found: 'MudBlazor.Palette MudBlazor.MudTheme.get_Palette()'. #25

Closed
aarondglover opened this issue Jun 6, 2024 · 19 comments

Comments

@aarondglover
Copy link

I'm using

  • MudBlazor v7 preview 4
  • MudBlazor.ThemeManager1.1.0

When running my application I recieve the following exception.

MissingMethodException: Method not found: 'MudBlazor.Palette MudBlazor.MudTheme.get_Palette()'.

Question
Is this a problem with version 7 where they changed "Palette" to "LightPallet" to match the "DarkPallet" naming scheme?

Thanks In Advance

image

@ScarletKuro
Copy link
Member

Hi. Yes, it's obviously not supported for now as many things changed, ThemeManager is referencing v6, not v7. The update will happen probably after v7 release.

@aarondglover
Copy link
Author

Yep forked it and kind of got it working. Just an issue to resolve regarding MudColor and conversion to hexStr... The RGBA colors etc... is some refactoring since the Palette class was made abstract.

Nice work.

@ScarletKuro
Copy link
Member

Yep forked it and kind of got it working. Just an issue to resolve regarding MudColor and conversion to hexStr... The RGBA colors etc... is some refactoring since the Palette class was made abstract.

Maybe you want to PR your changes? Since we need that anyway.

@Eagle3386
Copy link

@ScarletKuro Did you find the time to work on this, yet?
Because ce5ceec's commit message, Add MudBlazor v7 support suggests that it works while in reality, it gives:

Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
    Unhandled exception rendering component: Method not found: MudBlazor.Palette MudBlazor.MudTheme.get_Palette()
System.MissingMethodException: Method not found: MudBlazor.Palette MudBlazor.MudTheme.get_Palette()
    at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
    at Microsoft.AspNetCore.Components.ErrorBoundaryBase.Microsoft.AspNetCore.Components.IErrorBoundary.HandleException(Exception exception)
    at Microsoft.AspNetCore.Components.RenderTree.Renderer.HandleExceptionViaErrorBoundary(Exception error, ComponentState errorSourceOrNull)

… and that's while I'm on latest .NET 8.0.8 & MudBlazor 7.7.0! 😞

@ScarletKuro
Copy link
Member

ScarletKuro commented Sep 4, 2024

@Eagle3386 Did you update ThemeManager to 2.0.0?

@Eagle3386
Copy link

Of course! 😎

@ScarletKuro
Copy link
Member

ScarletKuro commented Sep 4, 2024

Of course! 😎

Can you upload the project? I tested, and the test app from this repo is working just fine with the 7.7.0 mud. If there was method missing, it wouldn't compile.

@Eagle3386
Copy link

I can't due to IP of the source code.
It only happens when I enable these 2 lines within my MainLayout.razor file:

<MudThemeManagerButton OnClick="_ => OpenThemeManager(true)" />
<MudThemeManager Open="IsThemeManagerOpen" OpenChanged="OpenThemeManager" Theme="ThemeManager" ThemeChanged="UpdateTheme" />

At the top, there's of course

<MudThemeProvider @ref="ThemeProvider" Theme="ThemeManager.Theme" @bind-IsDarkMode="IsThemeDarkMode" />

and the code for the mentioned methods looks like this:

protected override async Task OnAfterRenderAsync(bool isFirstRender)
{
  if (isFirstRender)
  {
    await Task.WhenAll(OnIsDarkModeChangedAsync(null), ThemeProvider.WatchSystemPreference(OnPreferenceChangedAsync));
  }

  await base.OnAfterRenderAsync(isFirstRender);
}

/// … left out for brevity

private static MudTheme Theme { get; } = new()
{
  LayoutProperties = new() { DefaultBorderRadius = "6px" },
  PaletteLight = new()
  {
    AppbarBackground      = new(""),
    Primary               = new(""),
    Secondary             = new(""),
    SecondaryContrastText = new(""),
    Tertiary              = new(""),
    TextSecondary         = new("")
  },
  ZIndex = new() { Popover = new ZIndex().AppBar + 1 } // Workaround until MudBlazor/#6909 is fixed
};

private static ThemeManagerTheme ThemeManager { get; set; } = new()
{
  AppBarElevation     = 5,
  DefaultBorderRadius = int.Parse(Theme.LayoutProperties.DefaultBorderRadius[..^2]),
  DrawerClipMode      = DrawerClipMode.Always,
  DrawerElevation     = 5,
  Theme = Theme
};

private static MudThemeProvider ThemeProvider { get; set; }

private async Task OnIsDarkModeChangedAsync(bool? newValue) =>
  await OnPreferenceChangedAsync((IsDarkMode = newValue) ?? await ThemeProvider!.GetSystemPreference());

private Task OnPreferenceChangedAsync(bool newValue)
{
  IsThemeDarkMode = newValue;

  return InvokeAsync(StateHasChanged);
}

private static Task<bool> OpenThemeManager(bool isOpen) => Task.FromResult(IsThemeManagerOpen = isOpen);

private Task UpdateTheme(ThemeManagerTheme theme)
{
  ThemeManager = theme;

  return InvokeAsync(StateHasChanged);
}

@ScarletKuro
Copy link
Member

I can't due to IP of the source code.

Make a small reproduction from what you got, otherwise can't help you or fix it if there is a problem indeed.

@Eagle3386
Copy link

Eagle3386 commented Sep 6, 2024

I actually supposed - given my snippets above - you're able to create it yourself, but meanwhile found out that the problem must lay somewhere else as it even works with my original MainLayout now.

Besides, after having a hard time & multiple headaches, I finally found the culprit: for some reason, VS didn't really rebuild the solution after upgrading both MudBlazor packages.
Only after Clean Solution & then (re) building the solution, everything worked as expected - even with my previously "faulty" code.. 🙈😅

@Eagle3386
Copy link

Have to add: while in Debug builds everything runs just fine, I do get an exception that sounds like what @aarondglover mentioned earlier:

System.NotSupportedException: ConstructorContainsNullParameterNames, MudBlazor.Utilities.MudColor
  at System.Text.Json.ThrowHelper.ThrowNotSupportedException_ConstructorContainsNullParameterNames(Type )
  at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.PopulateParameterInfoValues(JsonTypeInfo )
  at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.CreateTypeInfoCore(Type , JsonConverter , JsonSerializerOptions )
  at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.CreateJsonTypeInfo(Type , JsonSerializerOptions )
  at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.GetTypeInfo(Type , JsonSerializerOptions )
  at System.Text.Json.JsonSerializerOptions.GetTypeInfoNoCaching(Type )
  at System.Text.Json.JsonSerializerOptions.CachingContext.CreateCacheEntry(Type type, CachingContext context)
--- End of stack trace from previous location ---
at System.Text.Json.JsonSerializerOptions.CachingContext.CacheEntry.GetResult()
at System.Text.Json.JsonSerializerOptions.CachingContext.GetOrAddTypeInfo(Type , Boolean )
at System.Text.Json.JsonSerializerOptions.GetTypeInfoInternal(Type , Boolean , Nullable`1 , Boolean , Boolean )
at System.Text.Json.Serialization.Metadata.JsonPropertyInfo.Configure()
at System.Text.Json.Serialization.Metadata.JsonTypeInfo.ConfigureProperties()
at System.Text.Json.Serialization.Metadata.JsonTypeInfo.Configure()
at System.Text.Json.Serialization.Metadata.JsonTypeInfo.<EnsureConfigured>g__ConfigureSynchronized|172_0()
at System.Text.Json.Serialization.Metadata.JsonTypeInfo.EnsureConfigured()
at System.Text.Json.JsonSerializerOptions.GetTypeInfoInternal(Type , Boolean , Nullable`1 , Boolean , Boolean )
at System.Text.Json.Serialization.Metadata.JsonPropertyInfo.Configure()
at System.Text.Json.Serialization.Metadata.JsonTypeInfo.ConfigureProperties()
at System.Text.Json.Serialization.Metadata.JsonTypeInfo.Configure()
at System.Text.Json.Serialization.Metadata.JsonTypeInfo.<EnsureConfigured>g__ConfigureSynchronized|172_0()
at System.Text.Json.Serialization.Metadata.JsonTypeInfo.EnsureConfigured()
at System.Text.Json.JsonSerializerOptions.GetTypeInfoInternal(Type , Boolean , Nullable`1 , Boolean , Boolean )
at System.Text.Json.JsonSerializerOptions.GetTypeInfoForRootType(Type , Boolean )
at System.Text.Json.JsonSerializer.GetTypeInfo(JsonSerializerOptions , Type )
at System.Text.Json.JsonSerializer.GetTypeInfo[MudTheme](JsonSerializerOptions )
at System.Text.Json.JsonSerializer.Serialize[MudTheme](MudTheme , JsonSerializerOptions )
at MudBlazor.ThemeManager.Extensions.Extension.DeepClone[MudTheme](MudTheme )
at MudBlazor.ThemeManager.MudThemeManager.OnInitialized()
at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
at MudBlazor.State.ParameterContainer.SetParametersAsync(Func`2 , ParameterView )

System.NotSupportedException: ConstructorContainsNullParameterNames, MudBlazor.Utilities.MudColor
  at System.Text.Json.ThrowHelper.ThrowNotSupportedException_ConstructorContainsNullParameterNames(Type )
  at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.PopulateParameterInfoValues(JsonTypeInfo )
  at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.CreateTypeInfoCore(Type , JsonConverter , JsonSerializerOptions )
  at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.CreateJsonTypeInfo(Type , JsonSerializerOptions )
  at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.GetTypeInfo(Type , JsonSerializerOptions )
  at System.Text.Json.JsonSerializerOptions.GetTypeInfoNoCaching(Type )
  at System.Text.Json.JsonSerializerOptions.CachingContext.CreateCacheEntry(Type type, CachingContext context)
--- End of stack trace from previous location ---
at System.Text.Json.JsonSerializerOptions.CachingContext.CacheEntry.GetResult()
at System.Text.Json.JsonSerializerOptions.CachingContext.GetOrAddTypeInfo(Type , Boolean )
at System.Text.Json.JsonSerializerOptions.GetTypeInfoInternal(Type , Boolean , Nullable`1 , Boolean , Boolean )
at System.Text.Json.Serialization.Metadata.JsonPropertyInfo.Configure()
at System.Text.Json.Serialization.Metadata.JsonTypeInfo.ConfigureProperties()
at System.Text.Json.Serialization.Metadata.JsonTypeInfo.Configure()
at System.Text.Json.Serialization.Metadata.JsonTypeInfo.<EnsureConfigured>g__ConfigureSynchronized|172_0()
at System.Text.Json.Serialization.Metadata.JsonTypeInfo.EnsureConfigured()
at System.Text.Json.JsonSerializerOptions.GetTypeInfoInternal(Type , Boolean , Nullable`1 , Boolean , Boolean )
at System.Text.Json.Serialization.Metadata.JsonPropertyInfo.Configure()
at System.Text.Json.Serialization.Metadata.JsonTypeInfo.ConfigureProperties()
at System.Text.Json.Serialization.Metadata.JsonTypeInfo.Configure()
at System.Text.Json.Serialization.Metadata.JsonTypeInfo.<EnsureConfigured>g__ConfigureSynchronized|172_0()
at System.Text.Json.Serialization.Metadata.JsonTypeInfo.EnsureConfigured()
at System.Text.Json.JsonSerializerOptions.GetTypeInfoInternal(Type , Boolean , Nullable`1 , Boolean , Boolean )
at System.Text.Json.JsonSerializerOptions.GetTypeInfoForRootType(Type , Boolean )
at System.Text.Json.JsonSerializer.GetTypeInfo(JsonSerializerOptions , Type )
at System.Text.Json.JsonSerializer.GetTypeInfo[MudTheme](JsonSerializerOptions )
at System.Text.Json.JsonSerializer.Serialize[MudTheme](MudTheme , JsonSerializerOptions )
at MudBlazor.ThemeManager.Extensions.Extension.DeepClone[MudTheme](MudTheme )
at MudBlazor.ThemeManager.MudThemeManager.OnInitialized()
at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
at MudBlazor.State.ParameterContainer.SetParametersAsync(Func`2 , ParameterView ) 

dotnet.runtime.8.0.8.80cvijctdx.js:3:177838
  S https://dev.example.net/_framework/dotnet.runtime.8.0.8.80cvijctdx.js:3
  Ll https://dev.example.net/_framework/dotnet.runtime.8.0.8.80cvijctdx.js:3
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:0
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:90403
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:75256
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:23044
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:79877
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:790398
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:625222
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:625110
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:489431
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:90535
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:75256
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:23044
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:79877
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:790398
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:625222
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:627513
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:637339
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:1006992
  _mono_wasm_invoke_method_bound https://dev.example.net/_framework/

dotnet.native.8.0.8.8pc09axbdm.js:8
  kr https://dev.example.net/_framework/dotnet.runtime.8.0.8.80cvijctdx.js:3
  call_entry_point https://dev.example.net/_framework/dotnet.runtime.8.0.8.80cvijctdx.js:3
  Fc https://dev.example.net/_framework/dotnet.runtime.8.0.8.80cvijctdx.js:3
  callEntryPoint https://dev.example.net/_framework/blazor.webassembly.js:1
  mn https://dev.example.net/_framework/blazor.webassembly.js:1

@ScarletKuro
Copy link
Member

I do get an exception that sounds like what @aarondglover mentioned earlier:

This is totally two different unrelated exceptions.
I would try to disable trimming dotnet/aspnetcore#52947

@Eagle3386
Copy link

But I neither publish with enabled AOT nor did I enable trimming within my Blazor WASM project file nor the Directory.Build.props one:

<!--<PublishTrimmed>true</PublishTrimmed>
<PublishAot>false</PublishAot>

🤷🏻‍♂️🤔

@ScarletKuro
Copy link
Member

But I neither publish with enabled AOT nor did I enable trimming within my Blazor WASM project file nor the Directory.Build.props one:

Trimming is the default behavior starting from net8.

@Eagle3386
Copy link

Eagle3386 commented Sep 6, 2024

Now, everything is FUBAR:
{A5DFD2DC-24BD-4390-A8E7-7252316218D1}

And that's with PublishTrimmed set to false & <_ExtraTrimmerArgs>--keep-metadata parametername</_ExtraTrimmerArgs> added to both, project file as well as publish profile!
Yet, without ThemeManager, none of that is needed & everything runs as expected?!

@ScarletKuro
Copy link
Member

System.NotSupportedException: ConstructorContainsNullParameterNames, MudBlazor.Utilities.MudColor
  at System.Text.Json.ThrowHelper.ThrowNotSupportedException_ConstructorContainsNullParameterNames(Type )
  at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.PopulateParameterInfoValues(JsonTypeInfo )
  at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.CreateTypeInfoCore(Type , JsonConverter , JsonSerializerOptions )
  at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.CreateJsonTypeInfo(Type , JsonSerializerOptions )
  at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.GetTypeInfo(Type , JsonSerializerOptions )
  at System.Text.Json.JsonSerializerOptions.GetTypeInfoNoCaching(Type )
  at System.Text.Json.JsonSerializerOptions.CachingContext.CreateCacheEntry(Type type, CachingContext context)
--- End of stack trace from previous location ---
at System.Text.Json.JsonSerializerOptions.CachingContext.CacheEntry.GetResult()
at System.Text.Json.JsonSerializerOptions.CachingContext.GetOrAddTypeInfo(Type , Boolean )
at System.Text.Json.JsonSerializerOptions.GetTypeInfoInternal(Type , Boolean , Nullable`1 , Boolean , Boolean )
at System.Text.Json.Serialization.Metadata.JsonPropertyInfo.Configure()
at System.Text.Json.Serialization.Metadata.JsonTypeInfo.ConfigureProperties()
at System.Text.Json.Serialization.Metadata.JsonTypeInfo.Configure()
at System.Text.Json.Serialization.Metadata.JsonTypeInfo.<EnsureConfigured>g__ConfigureSynchronized|172_0()
at System.Text.Json.Serialization.Metadata.JsonTypeInfo.EnsureConfigured()
at System.Text.Json.JsonSerializerOptions.GetTypeInfoInternal(Type , Boolean , Nullable`1 , Boolean , Boolean )
at System.Text.Json.Serialization.Metadata.JsonPropertyInfo.Configure()
at System.Text.Json.Serialization.Metadata.JsonTypeInfo.ConfigureProperties()
at System.Text.Json.Serialization.Metadata.JsonTypeInfo.Configure()
at System.Text.Json.Serialization.Metadata.JsonTypeInfo.<EnsureConfigured>g__ConfigureSynchronized|172_0()
at System.Text.Json.Serialization.Metadata.JsonTypeInfo.EnsureConfigured()
at System.Text.Json.JsonSerializerOptions.GetTypeInfoInternal(Type , Boolean , Nullable`1 , Boolean , Boolean )
at System.Text.Json.JsonSerializerOptions.GetTypeInfoForRootType(Type , Boolean )
at System.Text.Json.JsonSerializer.GetTypeInfo(JsonSerializerOptions , Type )
at System.Text.Json.JsonSerializer.GetTypeInfo[MudTheme](JsonSerializerOptions )
at System.Text.Json.JsonSerializer.Serialize[MudTheme](MudTheme , JsonSerializerOptions )
at MudBlazor.ThemeManager.Extensions.Extension.DeepClone[MudTheme](MudTheme )
at MudBlazor.ThemeManager.MudThemeManager.OnInitialized()
at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
at MudBlazor.State.ParameterContainer.SetParametersAsync(Func`2 , ParameterView )

System.NotSupportedException: ConstructorContainsNullParameterNames, MudBlazor.Utilities.MudColor
  at System.Text.Json.ThrowHelper.ThrowNotSupportedException_ConstructorContainsNullParameterNames(Type )
  at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.PopulateParameterInfoValues(JsonTypeInfo )
  at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.CreateTypeInfoCore(Type , JsonConverter , JsonSerializerOptions )
  at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.CreateJsonTypeInfo(Type , JsonSerializerOptions )
  at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.GetTypeInfo(Type , JsonSerializerOptions )
  at System.Text.Json.JsonSerializerOptions.GetTypeInfoNoCaching(Type )
  at System.Text.Json.JsonSerializerOptions.CachingContext.CreateCacheEntry(Type type, CachingContext context)
--- End of stack trace from previous location ---
at System.Text.Json.JsonSerializerOptions.CachingContext.CacheEntry.GetResult()
at System.Text.Json.JsonSerializerOptions.CachingContext.GetOrAddTypeInfo(Type , Boolean )
at System.Text.Json.JsonSerializerOptions.GetTypeInfoInternal(Type , Boolean , Nullable`1 , Boolean , Boolean )
at System.Text.Json.Serialization.Metadata.JsonPropertyInfo.Configure()
at System.Text.Json.Serialization.Metadata.JsonTypeInfo.ConfigureProperties()
at System.Text.Json.Serialization.Metadata.JsonTypeInfo.Configure()
at System.Text.Json.Serialization.Metadata.JsonTypeInfo.<EnsureConfigured>g__ConfigureSynchronized|172_0()
at System.Text.Json.Serialization.Metadata.JsonTypeInfo.EnsureConfigured()
at System.Text.Json.JsonSerializerOptions.GetTypeInfoInternal(Type , Boolean , Nullable`1 , Boolean , Boolean )
at System.Text.Json.Serialization.Metadata.JsonPropertyInfo.Configure()
at System.Text.Json.Serialization.Metadata.JsonTypeInfo.ConfigureProperties()
at System.Text.Json.Serialization.Metadata.JsonTypeInfo.Configure()
at System.Text.Json.Serialization.Metadata.JsonTypeInfo.<EnsureConfigured>g__ConfigureSynchronized|172_0()
at System.Text.Json.Serialization.Metadata.JsonTypeInfo.EnsureConfigured()
at System.Text.Json.JsonSerializerOptions.GetTypeInfoInternal(Type , Boolean , Nullable`1 , Boolean , Boolean )
at System.Text.Json.JsonSerializerOptions.GetTypeInfoForRootType(Type , Boolean )
at System.Text.Json.JsonSerializer.GetTypeInfo(JsonSerializerOptions , Type )
at System.Text.Json.JsonSerializer.GetTypeInfo[MudTheme](JsonSerializerOptions )
at System.Text.Json.JsonSerializer.Serialize[MudTheme](MudTheme , JsonSerializerOptions )
at MudBlazor.ThemeManager.Extensions.Extension.DeepClone[MudTheme](MudTheme )
at MudBlazor.ThemeManager.MudThemeManager.OnInitialized()
at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
at MudBlazor.State.ParameterContainer.SetParametersAsync(Func`2 , ParameterView ) 

dotnet.runtime.8.0.8.80cvijctdx.js:3:177838
  S https://dev.example.net/_framework/dotnet.runtime.8.0.8.80cvijctdx.js:3
  Ll https://dev.example.net/_framework/dotnet.runtime.8.0.8.80cvijctdx.js:3
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:0
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:90403
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:75256
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:23044
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:79877
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:790398
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:625222
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:625110
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:489431
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:90535
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:75256
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:23044
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:79877
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:790398
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:625222
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:627513
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:637339
  <anonymous> https://dev.example.net/_framework/dotnet.native.wasm:1006992
  _mono_wasm_invoke_method_bound https://dev.example.net/_framework/

dotnet.native.8.0.8.8pc09axbdm.js:8
  kr https://dev.example.net/_framework/dotnet.runtime.8.0.8.80cvijctdx.js:3
  call_entry_point https://dev.example.net/_framework/dotnet.runtime.8.0.8.80cvijctdx.js:3
  Fc https://dev.example.net/_framework/dotnet.runtime.8.0.8.80cvijctdx.js:3
  callEntryPoint https://dev.example.net/_framework/blazor.webassembly.js:1
  mn https://dev.example.net/_framework/blazor.webassembly.js:1

I guess this stacktrace will be "won't fix" for now. We need to use source generation to resolve the trimming issue in the DeepClone method (see #32). However, there is one issue that cannot be overcome at this time: MudBlazor/MudBlazor#9434 (comment), without introducing a breaking change to the core.

This is also a good opportunity to remind everyone that the README for ThemeManager explicitly states that this component is not suitable for production applications. Therefore, you shouldn't publish an app using it. It’s intended for use in debug mode to experiment with settings and find what works best for your theme.

@Eagle3386
Copy link

Thanks for your explanation & insights, Artyom. Much appreciated! 👏🏻👍🏻

However, I'm not shipping the app with the ThemeManager, except for the staging/testing environment where the UI / UX folks are meant to do their experiments - and besides "pure" developers, debug builds shouldn't be used by anyone else.
That's what brought me to this kinda "dilemma".. 🙈😅

@ScarletKuro
Copy link
Member

Try 2.1.0 https://www.nuget.org/packages/MudBlazor.ThemeManager/2.1.0
Found an ugly way to ship #32

@Eagle3386
Copy link

Sorry for the delay, but can finally confirm the "ugly way" is working. 😅👍🏻
Thanks a lot, Artyom! 👏🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants