Base solution for your next web application

Activities of "Jorahealth"

Thank you this is now resolved

Answer

Resolved, Thanks

Any updates on this? Many Thanks

Yes you are right, there is no call to UserConfigurationManager.GetAsync() in AppDelegate.cs. On the further investigation we found that UserConfigurationManager.GetAsync() method is calling from App.Xamal.cs file. And it returns reult as null.

So to solve this issue, we did some code modifications in AppDelegate.cs

  1. Removed delay from RegisterForRemoteNotifications() method
  2. Added a 30 seconds delay before calling return base.FinishedLaunching(app, options); in FinishedLaunching() method.

The app then works perfectly and got expected result for UserConfigurationManager.GetAsync() method. Also received FCM test notification too.

**Is this the best way to solve this? **

HI @ismcagdas

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

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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3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IlJMNEJYN0ZYRURMSUJLM1NPRFlZTUtDSU5BUUxKRDNEIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjoiQWRtaW4iLCJodHRwOi8vd3d3LmFzcG5ldGJvaWxlcnBsYXRlLmNvbS9pZGVudGl0eS9jbGFpbXMvdGVuYW50SWQiOiI4Iiwic3ViIjoiMSIsImp0aSI6IjMxNWUxMzg4LTU1YTMtNDFhOS04MjM4LTczMDBlZTc4ZDQ1YiIsImlhdCI6MTYwOTk0NzUzMSwidG9rZW5fdmFsaWRpdHlfa2V5IjoiZGU2NjIwNmYtZTgwZi00ZjlkLWFlZWEtM2I1NGNhZGQ0NDY1IiwidXNlcl9pZGVudGlmaWVyIjoiMUA4IiwidG9rZW5fdHlwZSI6IjEiLCJuYmYiOjE2MDk5NDc1MzEsImV4cCI6MTY0MTQ4MzUzMSwiaXNzIjoiRGVjaXNpdmVseSIsImF1ZCI6IkRlY2lzaXZlbHkifQ._ThtS4KNnGdzXAydPmPbFcLMMH3DTXtacqJNdAGsKDw"

Thank you @alper

We are tried with commenting the the codes which use WebRequestExecuter directly in AppDelegate.cs class.** But it did not work. ** On Further investigation we understand that When we work with FCM, the code in AppDelegate.cs class "ApplicationBootstrapper.InitializeIfNeeds<DecisivelyXamarinIosModule>();" calling the method "userConfigurationService.GetAsync(AccessTokenManager.IsUserLoggedIn)". And retuns null as result in Decisively.ViewModels.Base.UserConfigurationManager.cs class. And it throwing null object reference exception and calling App.ExitApplication(); method.

Without FCM integration code it works perfectly and got result.

Any response? I would reaaly appreciate it if you could come back to me on this one quickly....

This is still not working for us and the app crashes after expriry of the token.

I had not replied earlier as I felt this issue would be addressed, Could you please suggest a solution or work around?

Many Thanks

Hi ismcagdas

I am adding screen shots of the application log ...where it says the refresh token is not valid! I have sent the token to the email as requested but have had no response?? Could you please provide a response for this?

Showing 1 to 10 of 31 entries