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

net7 - Auth bez Emailu (InvalidOperationExcepotion ApplicationAuthenticationService.GetCurrentEmployeeAsync()) #33

Open
hakenr opened this issue Nov 9, 2022 · 1 comment
Assignees

Comments

@hakenr
Copy link
Member

hakenr commented Nov 9, 2022

občas

Unhandled exception rendering component: Status(StatusCode="Unknown", Detail="System.InvalidOperationException: Sequence contains no matching element
         at System.Linq.ThrowHelper.ThrowNoMatchException()
         at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate)
         at Havit.Bonusario.Web.Server.Infrastructure.Security.ApplicationAuthenticationService.GetCurrentUserEmail() in W:\BuildAgents\BuildAgent2\669\s\Web.Server\Infrastructure\Security\ApplicationAuthenticationService.cs:line 39
         at Havit.Bonusario.Web.Server.Infrastructure.Security.ApplicationAuthenticationService.GetCurrentEmployeeAsync(CancellationToken cancellationToken) in W:\BuildAgents\BuildAgent2\669\s\Web.Server\Infrastructure\Security\ApplicationAuthenticationService.cs:line 34
         at Havit.Bonusario.Facades.EntryFacade.GetMyGivenEntriesAsync(Dto`1 periodId, CancellationToken cancellationToken) in W:\BuildAgents\BuildAgent2\669\s\Facades\EntryFacade.cs:line 54
         at Grpc.Shared.Server.UnaryServerMethodInvoker`3.ResolvedInterceptorInvoker(TRequest resolvedRequest, ServerCallContext resolvedContext)
         at Grpc.Shared.Server.UnaryServerMethodInvoker`3.ResolvedInterceptorInvoker(TRequest resolvedRequest, ServerCallContext resolvedContext)
         at ProtoBuf.Grpc.Configuration.ServerExceptionsInterceptorBase.UnaryServerHandler[TRequest,TResponse](TRequest request, ServerCallContext context, UnaryServerMethod`2 continuation) in /_/src/protobuf-net.Grpc/Configuration/SimpleRpcExceptionsInterceptor.cs:line 75")
Grpc.Core.RpcException: Status(StatusCode="Unknown", Detail="System.InvalidOperationException: Sequence contains no matching element
   at System.Linq.ThrowHelper.ThrowNoMatchException()
   at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate)
   at Havit.Bonusario.Web.Server.Infrastructure.Security.ApplicationAuthenticationService.GetCurrentUserEmail() in W:\BuildAgents\BuildAgent2\669\s\Web.Server\Infrastructure\Security\ApplicationAuthenticationService.cs:line 39
   at Havit.Bonusario.Web.Server.Infrastructure.Security.ApplicationAuthenticationService.GetCurrentEmployeeAsync(CancellationToken cancellationToken) in W:\BuildAgents\BuildAgent2\669\s\Web.Server\Infrastructure\Security\ApplicationAuthenticationService.cs:line 34
   at Havit.Bonusario.Facades.EntryFacade.GetMyGivenEntriesAsync(Dto`1 periodId, CancellationToken cancellationToken) in W:\BuildAgents\BuildAgent2\669\s\Facades\EntryFacade.cs:line 54
   at Grpc.Shared.Server.UnaryServerMethodInvoker`3.ResolvedInterceptorInvoker(TRequest resolvedRequest, ServerCallContext resolvedContext)
   at Grpc.Shared.Server.UnaryServerMethodInvoker`3.ResolvedInterceptorInvoker(TRequest resolvedRequest, ServerCallContext resolvedContext)
   at ProtoBuf.Grpc.Configuration.ServerExceptionsInterceptorBase.UnaryServerHandler[TRequest,TResponse](TRequest request, ServerCallContext context, UnaryServerMethod`2 continuation) in /_/src/protobuf-net.Grpc/Configuration/SimpleRpcExceptionsInterceptor.cs:line 75")
   at Havit.Blazor.Grpc.Client.WebAssembly.AuthorizationGrpcClientInterceptor.<HandleAsyncUnaryResponse>d__1`1[[System.Collections.Generic.List`1[[Havit.Bonusario.Contracts.EntryDto, Havit.Bonusario.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
   at Havit.Blazor.Grpc.Client.Cancellation.CancellationWorkaroundGrpcClientInterceptor.<HandleResponseAsync>d__1`1[[System.Collections.Generic.List`1[[Havit.Bonusario.Contracts.EntryDto, Havit.Bonusario.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
   at Havit.Blazor.Grpc.Client.ServerExceptions.ServerExceptionsGrpcClientInterceptor.<HandleResponseAsync>d__5`1[[System.Collections.Generic.List`1[[Havit.Bonusario.Contracts.EntryDto, Havit.Bonusario.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
   at Havit.Blazor.Grpc.Client.ServerExceptions.ServerExceptionsGrpcClientInterceptor.<HandleResponseAsync>d__5`1[[System.Collections.Generic.List`1[[Havit.Bonusario.Contracts.EntryDto, Havit.Bonusario.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
   at ProtoBuf.Grpc.Internal.Reshape.<UnaryTaskAsyncImpl>d__16`2[[Havit.Bonusario.Contracts.Dto`1[[System.Int32, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], Havit.Bonusario.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[System.Collections.Generic.List`1[[Havit.Bonusario.Contracts.EntryDto, Havit.Bonusario.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
   at Havit.Bonusario.Web.Client.Components.MyEntriesFeed.LoadData()
   at Havit.Bonusario.Web.Client.Components.MyEntriesFeed.OnParametersSetAsync()
   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
   at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task , ComponentState )
@hakenr hakenr self-assigned this Nov 9, 2022
@hakenr
Copy link
Member Author

hakenr commented Nov 9, 2022

Problém je, že jsem se omylem přihlásil na Microsoft Account, který je guest accountem do AAD.
Trochu se to tam popralo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant