Please answer the following questions before submitting an issue.
- What is your product version?
- 8.9.2
- What is your product type (Angular or MVC)?
- Angular
- What is product framework type (.net framework or .net core)? .net core
Xamanrin App: Hi we have an issue with our Xamarin Android App, We have enabled push notification on this and the user stays logged in all the time. The App stops working after about 24-48hrs it just crashes when we click on the icon. We have to clear data in mobile and then it works, but then have to re-enter trenancy and log back in.
Could you advice how to debug this issue, is there a mobile application log? Is it due to Auth token expiring??
31 Answer(s)
-
0
Hi @ismcagdas Exception Log from Mobile
{Flurl.Http.FlurlHttpException: Call failed with status code 500 (Internal Server Error): POST http://10.0.2.2:22742/api/TokenAuth/RefreshToken at Flurl.Http.FlurlRequest.HandleExceptionAsync (Flurl.Http.HttpCall call, System.Exception ex, System.Threading.CancellationToken token) [0x00105] in <7be22aadf26d4808b35d54cc18db202b>:0 at Flurl.Http.FlurlRequest.SendAsync (System.Net.Http.HttpMethod verb, System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken, System.Net.Http.HttpCompletionOption completionOption) [0x003a1] in <7be22aadf26d4808b35d54cc18db202b>:0 at Flurl.Http.FlurlRequest.SendAsync (System.Net.Http.HttpMethod verb, System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken, System.Net.Http.HttpCompletionOption completionOption) [0x004bb] in <7be22aadf26d4808b35d54cc18db202b>:0 at Flurl.Http.HttpResponseMessageExtensions.ReceiveJson[T] (System.Threading.Tasks.Task
1[TResult] response) [0x0006e] in <7be22aadf26d4808b35d54cc18db202b>:0 at Decisively.ApiClient.AccessTokenManager.RefreshTokenAsync () [0x000a1] in C:\Decisively_8.9.2\Solution\Decisively\aspnet-core\src\Decisively.Application.Client\ApiClient\AccessTokenManager.cs:93 at Decisively.Configuration.UserConfigurationService.RefreshAccessTokenAndSendRequestAgain () [0x0003e] in C:\Decisively_8.9.2\Solution\Decisively\aspnet-core\src\Decisively.Application.Client\Configuration\UserConfigurationService.cs:63 at Decisively.Configuration.UserConfigurationService.GetAuthenticatedUserConfig () [0x00178] in C:\Decisively_8.9.2\Solution\Decisively\aspnet-core\src\Decisively.Application.Client\Configuration\UserConfigurationService.cs:46 at Decisively.Configuration.UserConfigurationService.GetAsync (System.Boolean isUserLoggedIn) [0x00036] in C:\Decisively_8.9.2\Solution\Decisively\aspnet-core\src\Decisively.Application.Client\Configuration\UserConfigurationService.cs:27 at Decisively.ViewModels.Base.UserConfigurationManager+<>c__DisplayClass4_0.<GetAsync>b__0 () [0x0002e] in C:\Decisively_8.9.2\Solution\Decisively\aspnet-core\src\Decisively.Mobile.Shared\ViewModels\Base\UserConfigurationManager.cs:41 at Decisively.Core.Threading.WebRequestExecuter.Execute[TResult] (System.Func
1[TResult] func, System.Func2[T,TResult] successCallback, System.Func
2[T,TResult] failCallback, System.Action finallyCallback) [0x002a1] in C:\Decisively_8.9.2\Solution\Decisively\aspnet-core\src\Decisively.Mobile.Shared\Core\Threading\WebRequestExecuter.cs:53 }
API Error Log
INFO 2020-09-25 14:59:19,169 [94 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 POST http://localhost:22742/api/TokenAuth/RefreshToken?refreshToken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aX.IVAwaBWY5IGKkSxHo_pnl4LHlcMFbAvgTW0RkfkIciE application/json 247 INFO 2020-09-25 14:59:19,170 [94 ] uthentication.JwtBearer.JwtBearerHandler - Bearer was not authenticated. Failure message: No SecurityTokenValidator available for token: AIzaSyBd_YpujEtRhFD1cTA9zL9FcWyEV0qACJo INFO 2020-09-25 14:59:19,170 [94 ] ft.AspNetCore.Routing.EndpointMiddleware - Executing endpoint 'Decisively.Web.Controllers.TokenAuthController.RefreshToken (Decisively.Web.Core)' INFO 2020-09-25 14:59:19,191 [94 ] c.Infrastructure.ControllerActionInvoker - Route matched with {action = "RefreshToken", controller = "TokenAuth", area = ""}. Executing controller action with signature System.Threading.Tasks.Task
1[Decisively.Authorization.Accounts.Dto.RefreshTokenResult] RefreshToken(System.String) on controller Decisively.Web.Controllers.TokenAuthController (Decisively.Web.Core). ERROR 2020-09-25 14:59:19,271 [9 ] Mvc.ExceptionHandling.AbpExceptionFilter - Refresh token is not valid! System.ComponentModel.DataAnnotations.ValidationException: Refresh token is not valid! ---> System.InvalidOperationException: Navigation property 'Claims' on entity of type 'User' cannot be loaded because the entity is not being tracked. Navigation properties can only be loaded for tracked entities. at Microsoft.EntityFrameworkCore.Internal.EntityFinder
1.LoadAsync(INavigation navigation, InternalEntityEntry entry, CancellationToken cancellationToken) at Abp.Domain.Repositories.RepositoryExtensions.EnsureCollectionLoadedAsync[TEntity,TPrimaryKey,TProperty](IRepository2 repository, TEntity entity, Expression
1 collectionExpression, CancellationToken cancellationToken) at Abp.Authorization.Users.AbpUserStore2.GetClaimsAsync(TUser user, CancellationToken cancellationToken) at Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation) at Microsoft.AspNetCore.Identity.UserManager
1.GetClaimsAsync(TUser user) at Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation) at Microsoft.AspNetCore.Identity.UserClaimsPrincipalFactory1.GenerateClaimsAsync(TUser user) at Microsoft.AspNetCore.Identity.UserClaimsPrincipalFactory
2.GenerateClaimsAsync(TUser user) at Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation) at Microsoft.AspNetCore.Identity.UserClaimsPrincipalFactory1.CreateAsync(TUser user) at Abp.Authorization.AbpUserClaimsPrincipalFactory
2.CreateAsync(TUser user) at Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation) at Decisively.Web.Controllers.TokenAuthController.RefreshToken(String refreshToken) in C:\Decisively_8.9.2\Solution\Decisively\aspnet-core\src\Decisively.Web.Core\Controllers\TokenAuthController.cs:line 238 --- End of inner exception stack trace --- at Decisively.Web.Controllers.TokenAuthController.RefreshToken(String refreshToken) in C:\Decisively_8.9.2\Solution\Decisively\aspnet-core\src\Decisively.Web.Core\Controllers\TokenAuthController.cs:line 250 at lambda_method(Closure , Object ) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Exception Log from Mobile
{Flurl.Http.FlurlHttpException: Call failed with status code 500 (Internal Server Error): POST http://10.0.2.2:22742/api/TokenAuth/RefreshToken at Flurl.Http.FlurlRequest.HandleExceptionAsync (Flurl.Http.HttpCall call, System.Exception ex, System.Threading.CancellationToken token) [0x00105] in <7be22aadf26d4808b35d54cc18db202b>:0 at Flurl.Http.FlurlRequest.SendAsync (System.Net.Http.HttpMethod verb, System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken, System.Net.Http.HttpCompletionOption completionOption) [0x003a1] in <7be22aadf26d4808b35d54cc18db202b>:0 at Flurl.Http.FlurlRequest.SendAsync (System.Net.Http.HttpMethod verb, System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken, System.Net.Http.HttpCompletionOption completionOption) [0x004bb] in <7be22aadf26d4808b35d54cc18db202b>:0 at Flurl.Http.HttpResponseMessageExtensions.ReceiveJson[T] (System.Threading.Tasks.Task
1[TResult] response) [0x0006e] in <7be22aadf26d4808b35d54cc18db202b>:0 at Decisively.ApiClient.AccessTokenManager.RefreshTokenAsync () [0x000a1] in C:\Decisively_8.9.2\Solution\Decisively\aspnet-core\src\Decisively.Application.Client\ApiClient\AccessTokenManager.cs:93 at Decisively.Configuration.UserConfigurationService.RefreshAccessTokenAndSendRequestAgain () [0x0003e] in C:\Decisively_8.9.2\Solution\Decisively\aspnet-core\src\Decisively.Application.Client\Configuration\UserConfigurationService.cs:63 at Decisively.Configuration.UserConfigurationService.GetAuthenticatedUserConfig () [0x00178] in C:\Decisively_8.9.2\Solution\Decisively\aspnet-core\src\Decisively.Application.Client\Configuration\UserConfigurationService.cs:46 at Decisively.Configuration.UserConfigurationService.GetAsync (System.Boolean isUserLoggedIn) [0x00036] in C:\Decisively_8.9.2\Solution\Decisively\aspnet-core\src\Decisively.Application.Client\Configuration\UserConfigurationService.cs:27 at Decisively.ViewModels.Base.UserConfigurationManager+<>c__DisplayClass4_0.<GetAsync>b__0 () [0x0002e] in C:\Decisively_8.9.2\Solution\Decisively\aspnet-core\src\Decisively.Mobile.Shared\ViewModels\Base\UserConfigurationManager.cs:41 at Decisively.Core.Threading.WebRequestExecuter.Execute[TResult] (System.Func
1[TResult] func, System.Func2[T,TResult] successCallback, System.Func
2[T,TResult] failCallback, System.Action finallyCallback) [0x002a1] in C:\Decisively_8.9.2\Solution\Decisively\aspnet-core\src\Decisively.Mobile.Shared\Core\Threading\WebRequestExecuter.cs:53 }
API Error Log
INFO 2020-09-25 14:59:19,169 [94 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 POST http://localhost:22742/api/TokenAuth/RefreshToken?refreshToken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXeSJ9.IVAwaBWY5IGKkSxHo_pnl4LHlcMFbAvgTW0RkfkIciE application/json 247 INFO 2020-09-25 14:59:19,170 [94 ] uthentication.JwtBearer.JwtBearerHandler - Bearer was not authenticated. Failure message: No SecurityTokenValidator available for token: AIzaSyBd_YpujEtRhFD1cTA9zL9FcWyEV0qACJo INFO 2020-09-25 14:59:19,170 [94 ] ft.AspNetCore.Routing.EndpointMiddleware - Executing endpoint 'Decisively.Web.Controllers.TokenAuthController.RefreshToken (Decisively.Web.Core)' INFO 2020-09-25 14:59:19,191 [94 ] c.Infrastructure.ControllerActionInvoker - Route matched with {action = "RefreshToken", controller = "TokenAuth", area = ""}. Executing controller action with signature System.Threading.Tasks.Task
1[Decisively.Authorization.Accounts.Dto.RefreshTokenResult] RefreshToken(System.String) on controller Decisively.Web.Controllers.TokenAuthController (Decisively.Web.Core). ERROR 2020-09-25 14:59:19,271 [9 ] Mvc.ExceptionHandling.AbpExceptionFilter - Refresh token is not valid! System.ComponentModel.DataAnnotations.ValidationException: Refresh token is not valid! ---> System.InvalidOperationException: Navigation property 'Claims' on entity of type 'User' cannot be loaded because the entity is not being tracked. Navigation properties can only be loaded for tracked entities. at Microsoft.EntityFrameworkCore.Internal.EntityFinder
1.LoadAsync(INavigation navigation, InternalEntityEntry entry, CancellationToken cancellationToken) at Abp.Domain.Repositories.RepositoryExtensions.EnsureCollectionLoadedAsync[TEntity,TPrimaryKey,TProperty](IRepository2 repository, TEntity entity, Expression
1 collectionExpression, CancellationToken cancellationToken) at Abp.Authorization.Users.AbpUserStore2.GetClaimsAsync(TUser user, CancellationToken cancellationToken) at Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation) at Microsoft.AspNetCore.Identity.UserManager
1.GetClaimsAsync(TUser user) at Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation) at Microsoft.AspNetCore.Identity.UserClaimsPrincipalFactory1.GenerateClaimsAsync(TUser user) at Microsoft.AspNetCore.Identity.UserClaimsPrincipalFactory
2.GenerateClaimsAsync(TUser user) at Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation) at Microsoft.AspNetCore.Identity.UserClaimsPrincipalFactory1.CreateAsync(TUser user) at Abp.Authorization.AbpUserClaimsPrincipalFactory
2.CreateAsync(TUser user) at Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation) at Decisively.Web.Controllers.TokenAuthController.RefreshToken(String refreshToken) in C:\Decisively_8.9.2\Solution\Decisively\aspnet-core\src\Decisively.Web.Core\Controllers\TokenAuthController.cs:line 238 --- End of inner exception stack trace --- at Decisively.Web.Controllers.TokenAuthController.RefreshToken(String refreshToken) in C:\Decisively_8.9.2\Solution\Decisively\aspnet-core\src\Decisively.Web.Core\Controllers\TokenAuthController.cs:line 250 at lambda_method(Closure , Object ) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker. -
0
I am pasting the full log....
Exception Log from Mobile
{Flurl.Http.FlurlHttpException: Call failed with status code 500 (Internal Server Error): POST http://10.0.2.2:22742/api/TokenAuth/RefreshToken at Flurl.Http.FlurlRequest.HandleExceptionAsync (Flurl.Http.HttpCall call, System.Exception ex, System.Threading.CancellationToken token) [0x00105] in <7be22aadf26d4808b35d54cc18db202b>:0 at Flurl.Http.FlurlRequest.SendAsync (System.Net.Http.HttpMethod verb, System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken, System.Net.Http.HttpCompletionOption completionOption) [0x003a1] in <7be22aadf26d4808b35d54cc18db202b>:0 at Flurl.Http.FlurlRequest.SendAsync (System.Net.Http.HttpMethod verb, System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken, System.Net.Http.HttpCompletionOption completionOption) [0x004bb] in <7be22aadf26d4808b35d54cc18db202b>:0 at Flurl.Http.HttpResponseMessageExtensions.ReceiveJson[T] (System.Threading.Tasks.Task
1[TResult] response) [0x0006e] in <7be22aadf26d4808b35d54cc18db202b>:0 at Decisively.ApiClient.AccessTokenManager.RefreshTokenAsync () [0x000a1] in C:\Decisively_8.9.2\Solution\Decisively\aspnet-core\src\Decisively.Application.Client\ApiClient\AccessTokenManager.cs:93 at Decisively.Configuration.UserConfigurationService.RefreshAccessTokenAndSendRequestAgain () [0x0003e] in C:\Decisively_8.9.2\Solution\Decisively\aspnet-core\src\Decisively.Application.Client\Configuration\UserConfigurationService.cs:63 at Decisively.Configuration.UserConfigurationService.GetAuthenticatedUserConfig () [0x00178] in C:\Decisively_8.9.2\Solution\Decisively\aspnet-core\src\Decisively.Application.Client\Configuration\UserConfigurationService.cs:46 at Decisively.Configuration.UserConfigurationService.GetAsync (System.Boolean isUserLoggedIn) [0x00036] in C:\Decisively_8.9.2\Solution\Decisively\aspnet-core\src\Decisively.Application.Client\Configuration\UserConfigurationService.cs:27 at Decisively.ViewModels.Base.UserConfigurationManager+<>c__DisplayClass4_0.<GetAsync>b__0 () [0x0002e] in C:\Decisively_8.9.2\Solution\Decisively\aspnet-core\src\Decisively.Mobile.Shared\ViewModels\Base\UserConfigurationManager.cs:41 at Decisively.Core.Threading.WebRequestExecuter.Execute[TResult] (System.Func
1[TResult] func, System.Func2[T,TResult] successCallback, System.Func
2[T,TResult] failCallback, System.Action finallyCallback) [0x002a1] in C:\Decisively_8.9.2\Solution\Decisively\aspnet-core\src\Decisively.Mobile.Shared\Core\Threading\WebRequestExecuter.cs:53 }
API Error Log
INFO 2020-09-25 14:59:19,169 [94 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 POST http://localhost:22742/api/TokenAuth/RefreshToken?refreshToken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjEiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiYWRtaW4iLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IktHU0pNNFMyNkc1QzVaU05FRUZKWU5KV1Q1M0JRU1JWIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjoiQWRtaW4iLCJodHRwOi8vd3d3LmFzcG5ldGJvaWxlcnBsYXRlLmNvbS9pZGVudGl0eS9jbGFpbXMvdGVuYW50SWQiOiIxNSIsInN1YiI6IjEiLCJqdGkiOiI3Mjg0NDZlNS00NWMwLTQxMzItOGY3My02OTY5ZWQzYWJjZGEiLCJpYXQiOjE2MDA5NTMwMDMsInRva2VuX3ZhbGlkaXR5X2tleSI6Ijk2ZTNhM2NjLTZmZGItNGU0MS04MzVmLTc3ZmZjNDRhZGUyZSIsInVzZXJfaWRlbnRpZmllciI6IjFAMTUiLCJ0b2tlbl90eXBlIjoiMSIsIm5iZiI6MTYwMDk1MzAwMywiZXhwIjoxNjMyNDg5MDAzLCJpc3MiOiJEZWNpc2l2ZWx5IiwiYXVkIjoiRGVjaXNpdmVseSJ9.IVAwaBWY5IGKkSxHo_pnl4LHlcMFbAvgTW0RkfkIciE application/json 247 INFO 2020-09-25 14:59:19,170 [94 ] uthentication.JwtBearer.JwtBearerHandler - Bearer was not authenticated. Failure message: No SecurityTokenValidator available for token: AIzaSyBd_YpujEtRhFD1cTA9zL9FcWyEV0qACJo INFO 2020-09-25 14:59:19,170 [94 ] ft.AspNetCore.Routing.EndpointMiddleware - Executing endpoint 'Decisively.Web.Controllers.TokenAuthController.RefreshToken (Decisively.Web.Core)' INFO 2020-09-25 14:59:19,191 [94 ] c.Infrastructure.ControllerActionInvoker - Route matched with {action = "RefreshToken", controller = "TokenAuth", area = ""}. Executing controller action with signature System.Threading.Tasks.Task
1[Decisively.Authorization.Accounts.Dto.RefreshTokenResult] RefreshToken(System.String) on controller Decisively.Web.Controllers.TokenAuthController (Decisively.Web.Core). ERROR 2020-09-25 14:59:19,271 [9 ] Mvc.ExceptionHandling.AbpExceptionFilter - Refresh token is not valid! System.ComponentModel.DataAnnotations.ValidationException: Refresh token is not valid! ---> System.InvalidOperationException: Navigation property 'Claims' on entity of type 'User' cannot be loaded because the entity is not being tracked. Navigation properties can only be loaded for tracked entities. at Microsoft.EntityFrameworkCore.Internal.EntityFinder
1.LoadAsync(INavigation navigation, InternalEntityEntry entry, CancellationToken cancellationToken) at Abp.Domain.Repositories.RepositoryExtensions.EnsureCollectionLoadedAsync[TEntity,TPrimaryKey,TProperty](IRepository2 repository, TEntity entity, Expression
1 collectionExpression, CancellationToken cancellationToken) at Abp.Authorization.Users.AbpUserStore2.GetClaimsAsync(TUser user, CancellationToken cancellationToken) at Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation) at Microsoft.AspNetCore.Identity.UserManager
1.GetClaimsAsync(TUser user) at Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation) at Microsoft.AspNetCore.Identity.UserClaimsPrincipalFactory1.GenerateClaimsAsync(TUser user) at Microsoft.AspNetCore.Identity.UserClaimsPrincipalFactory
2.GenerateClaimsAsync(TUser user) at Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation) at Microsoft.AspNetCore.Identity.UserClaimsPrincipalFactory1.CreateAsync(TUser user) at Abp.Authorization.AbpUserClaimsPrincipalFactory
2.CreateAsync(TUser user) at Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation) at Decisively.Web.Controllers.TokenAuthController.RefreshToken(String refreshToken) in C:\Decisively_8.9.2\Solution\Decisively\aspnet-core\src\Decisively.Web.Core\Controllers\TokenAuthController.cs:line 238 --- End of inner exception stack trace --- at Decisively.Web.Controllers.TokenAuthController.RefreshToken(String refreshToken) in C:\Decisively_8.9.2\Solution\Decisively\aspnet-core\src\Decisively.Web.Core\Controllers\TokenAuthController.cs:line 250 at lambda_method(Closure , Object ) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker. -
0
Hi @Jorahealth
Is it also possible to share the full token via email with [email protected] ? Audiance of the token and refresh token might be different.
-
0
Hi ismcagdas I have sent this to the email....
The Access token validity is for a day, the refresh token 1 year, looks like the access token is not being renewed and the issue is with the refresh token. We reduced the refresh token expiry to 10 mins and then it automatically redirects to the login page on the mobile app.
-
0
We have also this exact problem
"System.InvalidOperationException: Navigation property 'Claims' on entity of type 'User' cannot be loaded because the entity is not being tracked. Navigation properties can only be loaded for tracked entities" there are some issues at Github for this line, for example this Latest maybe related issue, but that is closed without clear description of the fix.
The Xamarin app crashes because:
- On startup, UserConfigurationManager.GetIfNeedsAsync() is called and because AppContext.Value.Configuration is null, it will call GetAsync();
- App notices that login info exists, and uses token.
- Token is expired => RefreshToken
- RefreshToken call fails because of the server side problem
- WebRequestExecuter.Execute will execute inbuild exception handling
- In exception handling, L.Localize("Error") is called to generate Alert
- In L.Localize => LocalizeInternal, there is a check that if appContext.Configuration == null => throw new Exception("Set configuration before using remote localization!");
This exception will crash your app :)
We are building a workaround for the UserConfigurationManager.GetIfNeedsAsync() call to ignore any exceptions and if refresh token fails, we will clear Login info and call GetAsync again to be able to navigate to the LoginView.
For Zero people, you should consider rethinking the startup process and make sure that the app will start on every situation.
-
0
Hi @mika
Thanks. Could you create an issue on GitHub github.com/aspnetzero/aspnet-zero-core/issues/new including reproduction steps ? We can investigate this further.
-
0
-
0
We investigated this further....
We are only getting issue with Refresh token in TENANT. **It works in HOST. **
In Tenant here is the log again....
Refresh Token issue for Tenant ADMIN
Getting StatusCode: 500, ReasonPhrase: 'Internal Server Error' for 'https://10.0.2.2:44301/api/TokenAuth/RefreshToken'
AppData Log
INFO 2021-01-06 14:10:07,486 [109 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 POST https://10.0.2.2:44301/api/TokenAuth/RefreshToken application/x-www-form-urlencoded; charset=utf-8 884 INFO 2021-01-06 14:10:07,501 [109 ] ft.AspNetCore.Routing.EndpointMiddleware - Executing endpoint 'Decisively.Web.Controllers.TokenAuthController.RefreshToken (Decisively.Web.Core)' INFO 2021-01-06 14:10:07,513 [109 ] c.Infrastructure.ControllerActionInvoker - Route matched with {action = "RefreshToken", controller = "TokenAuth", area = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Decisively.Authorization.Accounts.Dto.RefreshTokenResult] RefreshToken(System.String) on controller Decisively.Web.Controllers.TokenAuthController (Decisively.Web.Core). ERROR 2021-01-06 14:10:07,799 [101 ] Mvc.ExceptionHandling.AbpExceptionFilter - Refresh token is not valid!
We chaecked if the Refresh token stored and retried are the same and they are....
Received Refresh Token
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjEiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiYWRtaW4iLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IlJMNEJYN0ZYRURMSUJLM1NPRFlZTUtDSU5BUUxKRDNEIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjoiQWRtaW4iLCJodHRwOi8vd3d3LmFzcG5ldGJvaWxlcnBsYXRlLmNvbS9pZGVudGl0eS9jbGFpbXMvdGVuYW50SWQiOiI4Iiwic3ViIjoiMSIsImp0aSI6IjMxNWUxMzg4LTU1YTMtNDFhOS04MjM4LTczMDBlZTc4ZDQ1YiIsImlhdCI6MTYwOTk0NzUzMSwidG9rZW5fdmFsaWRpdHlfa2V5IjoiZGU2NjIwNmYtZTgwZi00ZjlkLWFlZWEtM2I1NGNhZGQ0NDY1IiwidXNlcl9pZGVudGlmaWVyIjoiMUA4IiwidG9rZW5fdHlwZSI6IjEiLCJuYmYiOjE2MDk5NDc1MzEsImV4cCI6MTY0MTQ4MzUzMSwiaXNzIjoiRGVjaXNpdmVseSIsImF1ZCI6IkRlY2lzaXZlbHkifQ._ThtS4KNnGdzXAydPmPbFcLMMH3DTXtacqJNdAGsKDw"
Refresh Token which passed in api
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjEiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiYWRtaW4iLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IlJMNEJYN0ZYRURMSUJLM1NPRFlZTUtDSU5BUUxKRDNEIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjoiQWRtaW4iLCJodHRwOi8vd3d3LmFzcG5ldGJvaWxlcnBsYXRlLmNvbS9pZGVudGl0eS9jbGFpbXMvdGVuYW50SWQiOiI4Iiwic3ViIjoiMSIsImp0aSI6IjMxNWUxMzg4LTU1YTMtNDFhOS04MjM4LTczMDBlZTc4ZDQ1YiIsImlhdCI6MTYwOTk0NzUzMSwidG9rZW5fdmFsaWRpdHlfa2V5IjoiZGU2NjIwNmYtZTgwZi00ZjlkLWFlZWEtM2I1NGNhZGQ0NDY1IiwidXNlcl9pZGVudGlmaWVyIjoiMUA4IiwidG9rZW5fdHlwZSI6IjEiLCJuYmYiOjE2MDk5NDc1MzEsImV4cCI6MTY0MTQ4MzUzMSwiaXNzIjoiRGVjaXNpdmVseSIsImF1ZCI6IkRlY2lzaXZlbHkifQ._ThtS4KNnGdzXAydPmPbFcLMMH3DTXtacqJNdAGsKDw"
-
0
this is your JWT token
tenantId :8 user: admin
@ismcagdas is this valid?
{ "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier": "1", "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name": "admin", "AspNet.Identity.SecurityStamp": "RL4BX7FXEDLIBK3SODYYMKCINAQLJD3D", "http://schemas.microsoft.com/ws/2008/06/identity/claims/role": "Admin", "http://www.aspnetboilerplate.com/identity/claims/tenantId": "8", "sub": "1", "jti": "315e1388-55a3-41a9-8238-7300ee78d45b", "iat": 1609947531, "token_validity_key": "de66206f-e80f-4f9d-aeea-3b54cadd4465", "user_identifier": "[email protected]", "token_type": "1", "nbf": 1609947531, "exp": 1641483531, "iss": "Decisively", "aud": "Decisively" }
-
0
let's track this issue from the original issue see https://github.com/aspnetzero/aspnet-zero-core/issues/3558#issuecomment-754440061