dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.06k stars 1.73k forks source link

Maui Blazor App :in (release process: "ipa" file ) project crashes on showing a nuget control #13016

Closed shaden-kwaik closed 1 year ago

shaden-kwaik commented 1 year ago

Description

I have created .Net Maui Blazor App project and added the nuget package :(Radzen.Blazor version 4.6.3) to use different components.

Everything went fine in the Debug process: tested on Windows Machine, MacCatalyst, ipad

When I released the project and used the ipa file in the ipad :

RadzenButton worked fine but it crashed when the RadzenDropDown appeared.

i thought its the package problem , so i used instead the nuget package: (MudBlazor version 6.1.8) the project also crashed when MudSelect appeared in the Released project.

Operating System: Windows

.NET runtime version: .NET 7

Visual Studio Enterprise 2022 : 17.4.3

(Mac used to create ipa file):

Model Name: Mac mini

MacOS: Ventura 13.0.1

Visual Studio for Mac: 17.4.3

(Ipad used to view the app):

Model Name: ipad (9th generation)

iPadOS: 16.2

Steps to Reproduce

  1. Create new project > .Net MAUI Blazor App
  2. Add nuget package Radzen.Blazor
  3. Follow the steps in https://blazor.radzen.com/get-started to add all Required feature to let it work in the project.
  4. Add RadzenDropdown as described in https://blazor.radzen.com/dropdown
  5. Debug the project either in Windows Machine, IOS (Macatalyst or ipad), or Android device; everthing went fine.
  6. Release the project by creating the.ipa file
  7. Project crashes when the dropdown appears (the yellow default Blazor error appears: An unhandled error has occurred.)

Link to public reproduction project repository

https://blazor.radzen.com/dropdown

Version with bug

7.0 (current)

Last version that worked well

7.0 (current)

Affected platforms

iOS

Affected platform versions

ipadOS:16.2

Did you find any workaround?

No

Relevant log output

No response

shaden-kwaik commented 1 year ago

a reminder to check my issue because i cant publish my project on IOS

mkArtakMSFT commented 1 year ago

@rolfbjarne does this seem to be an AoT issue? And if yes, what would be the next step? It just feels unlikely that this is Blazor specific issue.

rolfbjarne commented 1 year ago

Does the Mac Catalyst release version work as well (would be interesting to test on an M1 machine in particular if you can)?

Any crash reports from the device would also be helpful in figuring out what happens.

shaden-kwaik commented 1 year ago

@rolfbjarne yes i have tested my app on MacCatalyst, Android, and Windows Machine ; where all worked fine in Release mode. My current problem exists while releasing the project on iPad and iPhone

rolfbjarne commented 1 year ago

Can you try enabling the interpreter for all configurations, and see if that fixes your release build?

<PropertyGroup>
    <UseInterpreter>true</UseInterpreter>
</PropertyGroup>
shaden-kwaik commented 1 year ago

Thank you @rolfbjarne After enabling the interpreter, the IOS didn't crash in release mode