maui icon indicating copy to clipboard operation
maui copied to clipboard

Purple Screen When Using Microsoft.Identity.Client

Open maxtsw opened this issue 1 year ago • 8 comments

Description

When Trying To Use Microsoft.Identity.Client I Am Getting A Purple Screen When Using Unpackaged, Release.

This Does Not Happen When Running In Debug Within Visual Studio, Only When Published And Running The .exe From Within The Publish Folder

To Ensure This Is The Library I Created A New .New Maui Blazor Hybrid APP, And Slowly Added The Required Nuget Packages, I Changed Nothing Else

Command: dotnet publish -f net8.0-windows10.0.19041.0 -c Release -p:RuntimeIdentifierOverride=win10-x64 -p:WindowsPackageType=None -p:WindowsAppSDKSelfContained=true

Platform: Windows

Outcome maui-purple-screen

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

8.0.3

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

maxtsw avatar Jan 07 '24 16:01 maxtsw

Hi @maxtsw. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md

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.

ghost avatar Jan 08 '24 04:01 ghost

Could you please create a repro project showing this? I understand that it's "Add Nuget and deploy" but having a standard base project to work from would make it easier to debug should it work for others.

drasticactions avatar Jan 08 '24 04:01 drasticactions

Hi,

I have created this repo https://github.com/maxtsw/ExamplePurpleScreenMauiError

I also noticed I am getting duplicate file Microsoft.Web.WebView2.Core.dll error when publishing that I use <WindowsPackageType Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">None</WindowsPackageType> to mitigate

Kind Regards, Max.

maxtsw avatar Jan 08 '24 09:01 maxtsw

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

ghost avatar Jan 08 '24 15:01 ghost

Hi,

I have created this repo https://github.com/maxtsw/ExamplePurpleScreenMauiError

I also noticed I am getting duplicate file Microsoft.Web.WebView2.Core.dll error when publishing that I use <WindowsPackageType Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">None</WindowsPackageType> to mitigate

Kind Regards, Max.

Hi, it looks like that repo is not available. Is it perhaps non-public?

Eilon avatar Jan 09 '24 21:01 Eilon

@Eilon I was able to repro this. Try: https://github.com/BethMassi/MauiApp3-HybridMSAL

Publish command: dotnet publish -f net8.0-windows10.0.19041.0 -c Release -p:RuntimeIdentifierOverride=win10-x64 -p:WindowsPackageType=None -p:WindowsAppSDKSelfContained=true

Creating an MSIX package and installing that works as expected, looks like it's just a problem with unpackaged.

BethMassi avatar Jan 09 '24 23:01 BethMassi

I also just tried this with a native (non-Hybrid) MAUI app and this also repros so I don't think this is specific to Blazor hybrid.

BethMassi avatar Jan 09 '24 23:01 BethMassi

Hi, I have created this repo https://github.com/maxtsw/ExamplePurpleScreenMauiError I also noticed I am getting duplicate file Microsoft.Web.WebView2.Core.dll error when publishing that I use <WindowsPackageType Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">None</WindowsPackageType> to mitigate Kind Regards, Max.

Hi, it looks like that repo is not available. Is it perhaps non-public?

Appologies this is now public

maxtsw avatar Jan 10 '24 13:01 maxtsw

Do you have any updates on this? This is causing an issue with our application. We cannot release a new version of our application until this is resolved. This is even happening without the usage of Microsoft.Identity.Client

GaurangRLB avatar Apr 02 '24 01:04 GaurangRLB

I had the same problem when I try create using inno setup. The only way i have discovery to fix this, was changed the install folder of the aplication out of C:/Program Files (or C:/Program Files x86), something like C:/newFolderMaui, it works for me

42gabs avatar Apr 30 '24 21:04 42gabs