fretje / heroplate

A template with a blazor frontend and a separate aspnetcore api backend
MIT License
36 stars 14 forks source link

[BUG] Phone number in Self Register flow is null #8

Closed 274188A closed 1 year ago

274188A commented 1 year ago

Describe the bug User tries to self Register https://localhost:5002/users/self-register

To Reproduce Fill out form for a new Registered user, click save

Exception

System.NullReferenceException HResult=0x80004003 Message=Object reference not set to an instance of an object. Source=Microsoft.EntityFrameworkCore StackTrace: at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.ExecuteAsync[TResult](Expression query, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.ExecuteAsync[TResult](Expression expression, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ExecuteAsync[TSource,TResult](MethodInfo operatorMethodInfo, IQueryable1 source, Expression expression, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ExecuteAsync[TSource,TResult](MethodInfo operatorMethodInfo, IQueryable1 source, LambdaExpression expression, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.FirstOrDefaultAsync[TSource](IQueryable1 source, Expression1 predicate, CancellationToken cancellationToken) at Microsoft.AspNetCore.Identity.EntityFrameworkCore.UserStore9.FindByNameAsync(String normalizedUserName, CancellationToken cancellationToken) at Microsoft.AspNetCore.Identity.UserManager1.d76.MoveNext() at Microsoft.AspNetCore.Identity.UserValidator`1.d6.MoveNext() at Microsoft.AspNetCore.Identity.UserValidator1.<ValidateAsync>d__5.MoveNext() at Microsoft.AspNetCore.Identity.UserManager1.d174.MoveNext() at Microsoft.AspNetCore.Identity.UserManager`1.d72.MoveNext() at Microsoft.AspNetCore.Identity.UserManager`1.d77.MoveNext() at Heroplate.Api.Infrastructure.Identity.UserService.d2.MoveNext() in D:\repos\heroplate\src\Api\Api.Infrastructure\Identity\UserService.CreateUpdate.cs:line 26

274188A commented 1 year ago

line 24: ..\src\Api\Api.Infrastructure\Identity\UserService.CreateUpdate.cs

274188A commented 1 year ago

obviously i needed to set up the tenant first