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.04k stars 1.73k forks source link

Deploying MAUI app on iOS Device throws error : ASN1 corrupted data. #21569

Open ot-ashish-jain opened 6 months ago

ot-ashish-jain commented 6 months ago

Description

I am trying to deploy my MAUI app (.Net7) on iPhone (iOS 17.4) but it throws error : ASN1 corrupted data. Even with a blank new app the same issue occurs. When I try to deploy the Xamarin app using the same provisioning profile it works fine. This issue started occurring when I updated the Visual Studio for Mac to 17.6.10. I was able to deploy MAUI app before the update.

Steps to Reproduce

  1. Create a blank MAUI app
  2. Try to run it on iPhone

Link to public reproduction project repository

No response

Version with bug

7.0.101

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

7.0.101

Affected platforms

iOS

Affected platform versions

17.4

Did you find any workaround?

No response

Relevant log output

Target ProcessMauiSplashScreens:
  Skipping target "ProcessMauiSplashScreens" because all output files are up-to-date with respect to the input files.
Target ResizetizeImages:
  Skipping target "ResizetizeImages" because all output files are up-to-date with respect to the input files.
Target ProcessMauiFonts:
  Skipping target "ProcessMauiFonts" because all output files are up-to-date with respect to the input files.
Target _DetectDebugNetworkConfiguration:
      DebugIPAddresses: <null>
Target _BeforeCoreCompileImageAssets:
    Directory "obj/Debug/net7.0-ios/ios-arm64/actool" doesn't exist. Skipping.
Target _DetectSigningIdentity:
    /usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/16.4.7141/tools/msbuild/iOS/Xamarin.Shared.targets(1725,3): error : ASN1 corrupted data.
Done building target "_DetectSigningIdentity" in project "MAUI_With_UI.csproj" -- FAILED.

Done building project "MAUI_With_UI.csproj" -- FAILED.

Build FAILED.

/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/16.4.7141/tools/msbuild/iOS/Xamarin.Shared.targets(1725,3): error : ASN1 corrupted data.
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:00.39

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Build: 1 error, 0 warnings
RoiChen001 commented 6 months ago

@ot-ashish-jain Did you encounter the same problem on iOS 17.4 simulator?

ot-ashish-jain commented 6 months ago

@ot-ashish-jain Did you encounter the same problem on iOS 17.4 simulator?

I am able to run the app on iOS 17.4 simulator, but I face this crash issue on simulator.

ot-ashish-jain commented 6 months ago

reproduction project

I am using Visual Studio for Mac 2022 (17.6.10), can you try to reproduce on that?

ot-ashish-jain commented 6 months ago

Hi @ot-ashish-jain. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version.

You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository.

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

Could you provide link to download Visual Studio for Mac (Preview)?

RoiChen001 commented 6 months ago

Can't repro this issue at iOS device(iOS17.4.1) on the latest 17.6.10(build 428)(.NET SDK:7.0.314). net7mac

drasticactions commented 6 months ago

Could you also try using .NET 8? Also, could you try deploying a .NET iOS App that doesn't implement that MAUI UI Framework? You can do that by running dotnet new ios from the command line. I have a feeling you'll have a similar issue with deploying any .NET iOS app, not just one from the MAUI Template.

ot-ashish-jain commented 5 months ago

Can't repro this issue at iOS device(iOS17.4.1) on the latest 17.6.10(build 428)(.NET SDK:7.0.314). net7mac

Could you please mention the MacOS version as well? I am using MacOS Sonoma 14.4.1.

RoiChen001 commented 5 months ago

Can't repro this issue at iOS device(iOS17.4.1) on the latest 17.6.10(build 428)(.NET SDK:7.0.314). net7mac

Could you please mention the MacOS version as well? I am using MacOS Sonoma 14.4.1.

Sonoma 14.4.

ot-ashish-jain commented 5 months ago

Could you also try using .NET 8? Also, could you try deploying a .NET iOS App that doesn't implement that MAUI UI Framework? You can do that by running dotnet new ios from the command line. I have a feeling you'll have a similar issue with deploying any .NET iOS app, not just one from the MAUI Template.

Tried the .NET iOS app, same issue.

ot-ashish-jain commented 5 months ago

Could you also try using .NET 8? Also, could you try deploying a .NET iOS App that doesn't implement that MAUI UI Framework? You can do that by running dotnet new ios from the command line. I have a feeling you'll have a similar issue with deploying any .NET iOS app, not just one from the MAUI Template.

Tried .NET 8 as well, same issue.

ot-ashish-jain commented 5 months ago

I tried to deploy using Windows machine and I was able to run the app on iPhone. When I use the same Developer certificate and provisioning profile on Mac I get ASN1 corrupted data issue. I have tried this on three different Mac systems and I get the same issue.

ot-ashish-jain commented 5 months ago

Any update on this?