Skip to content

[Bug] Large number of C++ exceptions occuring when using publicClientApplication in NativeAOT #5922

@catmanjan

Description

@catmanjan

Library version used

4.83.3

.NET version

10

Scenario

PublicClient - desktop app

Is this a new or an existing app?

None

Issue description and reproduction steps

Description

This doesn't seem to be impacting the behavior of my software, but in the debug window I see a lot of exceptions occuring directly after calling this line of code:

result = await publicClientApplication.AcquireTokenSilent(tenantScope, existingAccount)
    .WithTenantId(tenantId)
    .ExecuteAsync(cancellationToken);
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: std::shared_ptr<Msai::ErrorInternal> at memory location 0x0000009254BFF208.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: std::shared_ptr<Msai::ErrorInternal> at memory location 0x0000009254BFF208.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: std::shared_ptr<Msai::ErrorInternal> at memory location 0x0000009254BFF208.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: std::shared_ptr<Msai::ErrorInternal> at memory location 0x0000009254BFF208.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: std::shared_ptr<Msai::ErrorInternal> at memory location 0x0000009254BFF208.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: std::shared_ptr<Msai::ErrorInternal> at memory location 0x0000009254BFF208.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: std::shared_ptr<Msai::ErrorInternal> at memory location 0x0000009254BFF208.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: std::shared_ptr<Msai::ErrorInternal> at memory location 0x0000009254BFF208.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: std::shared_ptr<Msai::ErrorInternal> at memory location 0x0000009254BFF208.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: std::shared_ptr<Msai::ErrorInternal> at memory location 0x0000009254BFF208.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: std::shared_ptr<Msai::ErrorInternal> at memory location 0x0000009254BFF208.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: std::shared_ptr<Msai::ErrorInternal> at memory location 0x0000009254BFF208.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: std::shared_ptr<Msai::ErrorInternal> at memory location 0x0000009254BFF208.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: std::shared_ptr<Msai::ErrorInternal> at memory location 0x0000009254BFF208.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: std::shared_ptr<Msai::ErrorInternal> at memory location 0x0000009254BFF208.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: std::shared_ptr<Msai::ErrorInternal> at memory location 0x0000009254BFF208.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: std::shared_ptr<Msai::ErrorInternal> at memory location 0x0000009254BFF208.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: std::shared_ptr<Msai::ErrorInternal> at memory location 0x0000009254BFF208.
Exception thrown at 0x00007FFCFF87AFEC in Ingress.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
The thread 6740 has exited with code 0 (0x0).

Relevant code snippets

Expected behavior

No response

Identity provider

Microsoft Entra ID (Work and School accounts and Personal Microsoft accounts)

Regression

No response

Solution and workarounds

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions