Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Xamarin App crashes after 24-48hrs #9680


User avatar
0
Jorahealth created

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)
  • User Avatar
    0
    Jorahealth created

    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.eyJodHRwOi8vc2No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Bc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IlJMNEJYN0ZYRURMSUJLM1NPRFlZTUtDSU5BUUxKRDNEIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjoiQWRtaW4iLCJodHRwOi8vd3d3LmFzcG5ldGJvaWxlcnBsYXRlLmNvbS9pZGVudGl0eS9jbGFpbXMvdGVuYW50SWQiOiI4Iiwic3ViIjoiMSIsImp0aSI6IjMxNWUxMzg4LTU1YTMtNDFhOS04MjM4LTczMDBlZTc4ZDQ1YiIsImlhdCI6MTYwOTk0NzUzMSwidG9rZW5fdmFsaWRpdHlfa2V5IjoiZGU2NjIwNmYtZTgwZi00ZjlkLWFlZWEtM2I1NGNhZGQ0NDY1IiwidXNlcl9pZGVudGlmaWVyIjoiMUA4IiwidG9rZW5fdHlwZSI6IjEiLCJuYmYiOjE2MDk5NDc1MzEsImV4cCI6MTY0MTQ4MzUzMSwiaXNzIjoiRGVjaXNpdmVseSIsImF1ZCI6IkRlY2lzaXZlbHkifQ._ThtS4KNnGdzXAydPmPbFcLMMH3DTXtacqJNdAGsKDw"

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @Jorahealth

    Does it happen eveyr time for Tenant users or it happens randomly sometimes ?

  • User Avatar
    0
    Jorahealth created

    HI @ismcagdas

    We are in testing phase and dont have many tenant users. But it happens everytime to all tenant users.

  • User Avatar
    0
    alper created
    Support Team

    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": "1@8",
      "token_type": "1",
      "nbf": 1609947531,
      "exp": 1641483531,
      "iss": "Decisively",
      "aud": "Decisively"
    }
    
  • User Avatar
    0
    Jorahealth created

    Any updates on this? Many Thanks

  • User Avatar
    0
    alper created
    Support Team

    let's track this issue from the original issue see https://github.com/aspnetzero/aspnet-zero-core/issues/3558#issuecomment-754440061