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

Maui Blazor Publish Issue #13279

Closed
QwertyMC opened this issue Feb 11, 2023 · 14 comments
Closed

Maui Blazor Publish Issue #13279

QwertyMC opened this issue Feb 11, 2023 · 14 comments
Labels
area-blazor Blazor Hybrid / Desktop, BlazorWebView platform/iOS 🍎 s/duplicate 2️⃣ This issue or pull request already exists t/bug Something isn't working

Comments

@QwertyMC
Copy link

QwertyMC commented Feb 11, 2023

Description

When using mudblazor in a .NET 7 Maui Blazor iOS app, the app does not work when published to .ipa for use in App Store or Ad Hoc. App runs fine when run in Debug or Release mode on Device. This only seems to occur when trying to run the published version. BlazorWebview control shows the standard "An unhandled error has occurred"

Steps to Reproduce

  1. Create New Maui Blazor App
  2. Add MudBalzor
  3. Add Controls to index.html
  4. Publish ios and sign Ad Hoc / App Store
  5. Install app
  6. Launch

Link to public reproduction project repository

https:/QwertyMC/MauiBlazorTest

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iOS 16

Did you find any workaround?

No response

Relevant log output

Unable to set property 'Required' on object of type 'MudBlazor.MudTextField`1[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]'. 
The error was: Attempting to JIT compile method '(wrapper delegate-invoke) void <Module>:invoke_callvirt_void_MudTextField`1<string>_bool (MudBlazor.MudTextField`1<string>,bool)' while running in aot-only mode. 
See https://docs.microsoft.com/xamarin/ios/internals/limitations for more information.
:    at Microsoft.AspNetCore.Components.Reflection.ComponentProperties.<SetProperties>g__SetProperty|3_0(Object target, PropertySetter writer, String parameterName, Object value)
   at Microsoft.AspNetCore.Components.Reflection.ComponentProperties.SetProperties(ParameterView& parameters, Object target)
   at Microsoft.AspNetCore.Components.ComponentBase.SetParametersAsync(ParameterView parameters)
   at MudBlazor.MudBaseInput`1[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].<>n__1(ParameterView parameters)
   at MudBlazor.MudBaseInput`1.<SetParametersAsync>d__177[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()

IMG_D29C473441AA-1

@QwertyMC QwertyMC added the t/bug Something isn't working label Feb 11, 2023
@SamVanhoutte
Copy link

I have the exact same issue, also with MudTextField and I don't have any clue on how to solve this.
It only fails when deployed through an .ipa file (but I don't seem to be able to catch the exception)

@jsuarezruiz jsuarezruiz added the area-blazor Blazor Hybrid / Desktop, BlazorWebView label Feb 13, 2023
@QwertyMC
Copy link
Author

Any thoughts on this? I've spent quite a bit of time designing this app and not cannot seem to publish it to App Store. Any help would be appreciated! Thank You.

@mkArtakMSFT
Copy link
Member

Thanks for contacting us. Can you try the suggestion here and see if that helps: #12537 (comment)?

@lambdageek what should customers do in these situations?

@lambdageek
Copy link
Member

/cc @dalexsoto

@lambdageek
Copy link
Member

@vargaz Is this related to dotnet/runtime#83003 - from the error it sounds like this is also something about delegate invoke wrappers and callvirt.

@lambdageek
Copy link
Member

On second thought, this might be due to PropertySetter not being AOT friendly https:/dotnet/aspnetcore/blob/7c931425134d8cf54c82b29baba7ff277849f6bf/src/Components/Components/src/Reflection/PropertySetter.cs#L31-L36

I don't think creating delegates like this will work with AOT - is that right, @vargaz ?

@vargaz
Copy link

vargaz commented Mar 6, 2023

Same issue as:
dotnet/runtime#78889

@lambdageek
Copy link
Member

@vargaz How come it only happens in the app store? shouldn't Release builds deployed on device produce the same problem?

@QwertyMC
Copy link
Author

QwertyMC commented Mar 10, 2023

@mkArtakMSFTusing UseInterpreter True` does not help the situation.

@vargaz
Copy link

vargaz commented Mar 10, 2023

@vargaz How come it only happens in the app store? shouldn't Release builds deployed on device produce the same problem?

No idea, but the underlying problem appears the same.

@mkArtakMSFT
Copy link
Member

Closing as a dupe of dotnet/runtime#78889

@vargaz do you plan to patch this fix?

@mkArtakMSFT mkArtakMSFT added the s/duplicate 2️⃣ This issue or pull request already exists label Mar 15, 2023
@vargaz
Copy link

vargaz commented Mar 15, 2023

Its in our queue to fix.

@mkArtakMSFT mkArtakMSFT closed this as not planned Won't fix, can't repro, duplicate, stale Mar 22, 2023
@QwertyMC
Copy link
Author

@mkArtakMSFT What does not planned mean? There is no effort to resolve this issue?

@vargaz
Copy link

vargaz commented Mar 23, 2023

Its a duplicate, the issue will be tracked in:

dotnet/runtime#78889

@ghost ghost locked as resolved and limited conversation to collaborators Apr 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Blazor Hybrid / Desktop, BlazorWebView platform/iOS 🍎 s/duplicate 2️⃣ This issue or pull request already exists t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants