Base solution for your next web application

Activities of "mika"

Any updates on this case?

Hi @ismcagdas I don't think so.. We run service in Azure as App service, and have the setting "Allways on" set on.

Also, since this problem does not happen on every user/device, I don't believe it is related to that.

For us, the workaround helped to prevent app crash, but we still get the refresh token failure. Now after 24h, some users must login again because refresh token fails to get new access token.

Hi @ismcagdas

This happens only on some users/tenants/sometimes. I have not experienced this, but my collegue has and multiple users are complaining about this. We also use Appcenter to log errors and this has caused several crashes since we updated to V7.3.1

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:

  1. On startup, UserConfigurationManager.GetIfNeedsAsync() is called and because AppContext.Value.Configuration is null, it will call GetAsync();
  2. App notices that login info exists, and uses token.
  3. Token is expired => RefreshToken
  4. RefreshToken call fails because of the server side problem
  5. WebRequestExecuter.Execute will execute inbuild exception handling
  6. In exception handling, L.Localize("Error") is called to generate Alert
  7. 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.

Hi **@ismcagdas **

Could you tell me how did you test this as you said 4 months ago?

What is changed in latest version that should affect this problem?

Don't know why you closed this.. We use app center and we updated our app last sunday and I have seen one time this since but there was no log in app center.

Problem still exists and if next time problem happens to me and there is no log in our appcenter account, we need more hepl to pinpoint the problem.

Newer mind..

I tested app against my staging server and then changed base url to localhost and then I had staging server tenancy details so I think it messed things up..

I reinstalled app to my ios phone and now that api call works.

Hi

Angular + Core, v7.0.0 Android works, Angular client works, Postman api call from another computer works.

I try to debug my iOS mobile app but when I try to check if tenant is awailable I get this error on server:

:11,393 [172  ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 POST http://192.168.1.108:22742/api/services/app/Account/IsTenantAvailable application/json; charset=utf-8 27
INFO  2019-10-08 19:18:11,394 [172  ] ft.AspNetCore.Routing.EndpointMiddleware - Executing endpoint 'MyCompany.MyApp.Authorization.Accounts.AccountAppService.IsTenantAvailable (MyCompany.MyApp.Application)'
INFO  2019-10-08 19:18:11,403 [172  ] ore.Mvc.Internal.ControllerActionInvoker - Route matched with {area = "app", action = "IsTenantAvailable", controller = "Account"}. Executing action MyCompany.MyApp.Authorization.Accounts.AccountAppService.IsTenantAvailable (MyCompany.MyApp.Application)
ERROR 2019-10-08 19:18:11,435 [172  ] Mvc.ExceptionHandling.AbpExceptionFilter - Padding is invalid and cannot be removed.
System.Security.Cryptography.CryptographicException: Padding is invalid and cannot be removed.
   at Internal.Cryptography.UniversalCryptoDecryptor.DepadBlock(Byte[] block, Int32 offset, Int32 count)
   at Internal.Cryptography.UniversalCryptoDecryptor.UncheckedTransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
   at Internal.Cryptography.UniversalCryptoTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
   at System.Security.Cryptography.CryptoStream.FlushFinalBlock()
   at System.Security.Cryptography.CryptoStream.Dispose(Boolean disposing)
   at Abp.Runtime.Security.SimpleStringCipher.Decrypt(String cipherText, String passPhrase, Byte[] salt) in D:\Github\aspnetboilerplate\src\Abp\Runtime\Security\SimpleStringCipher_NetStandard.cs:line 132
   at Abp.MultiTenancy.TenantCache`2.CreateTenantCacheItem(TTenant tenant) in D:\Github\aspnetboilerplate\src\Abp.Zero.Common\MultiTenancy\TenantCache.cs:line 91
   at Castle.Proxies.Invocations.TenantCache`2_CreateTenantCacheItem.InvokeMethodOnTarget()
   at Castle.DynamicProxy.AbstractInvocation.Proceed()
   at Castle.DynamicProxy.AbstractInvocation.Proceed()
   at Castle.Proxies.TenantCache`2Proxy.CreateTenantCacheItem(Tenant tenant)
   at Abp.Runtime.Caching.CacheExtensions.&lt;&gt;c__DisplayClass5_0`2.<Get>b__0(String k) in D:\Github\aspnetboilerplate\src\Abp\Runtime\Caching\CacheExtensions.cs:line 40
   at Abp.Runtime.Caching.CacheBase.Get(String key, Func`2 factory) in D:\Github\aspnetboilerplate\src\Abp\Runtime\Caching\CacheBase.cs:line 68
   at Abp.Runtime.Caching.CacheExtensions.Get[TKey,TValue](ICache cache, TKey key, Func`2 factory) in D:\Github\aspnetboilerplate\src\Abp\Runtime\Caching\CacheExtensions.cs:line 40
   at Castle.Proxies.Invocations.ITenantCache_GetOrNull.InvokeMethodOnTarget()
   at Castle.DynamicProxy.AbstractInvocation.Proceed()
   at Castle.DynamicProxy.AbstractInvocation.Proceed()
   at Castle.Proxies.TenantCache`2Proxy.GetOrNull(Int32 tenantId)
   at Abp.MultiTenancy.TenantStore.Find(Int32 tenantId) in D:\Github\aspnetboilerplate\src\Abp.Zero.Common\MultiTenancy\TenantStore.cs:line 14
   at Abp.MultiTenancy.TenantResolver.GetTenantIdFromContributors() in D:\Github\aspnetboilerplate\src\Abp\MultiTenancy\TenantResolver.cs:line 88
   at Abp.MultiTenancy.TenantResolver.ResolveTenantId() in D:\Github\aspnetboilerplate\src\Abp\MultiTenancy\TenantResolver.cs:line 59
   at Abp.Runtime.Session.ClaimsAbpSession.get_TenantId() in D:\Github\aspnetboilerplate\src\Abp\Runtime\Session\ClaimsAbpSession.cs:line 62
   at Abp.Auditing.AuditingHelper.CreateAuditInfo(Type type, MethodInfo method, IDictionary`2 arguments) in D:\Github\aspnetboilerplate\src\Abp\Auditing\AuditingHelper.cs:line 104
   at Abp.AspNetCore.Mvc.Auditing.AbpAuditActionFilter.OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next) in D:\Github\aspnetboilerplate\src\Abp.AspNetCore\AspNetCore\Mvc\Auditing\AbpAuditActionFilter.cs:line 34
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextExceptionFilterAsync()

Any adwise?

Showing 1 to 10 of 36 entries