Base solution for your next web application

Activities of "alper"

Can you replace LoadPersistedSession method with the following So that we can understand what's the exception.

Mobile.Shared > App.xaml.cs

        public static void LoadPersistedSession()
        {
            var step = 0;

            try
            {
                var accessTokenManager = DependencyResolver.Resolve<IAccessTokenManager>();
                var dataStorageService = DependencyResolver.Resolve<IDataStorageService>();
                var applicationContext = DependencyResolver.Resolve<IApplicationContext>();
                step = 1;

                accessTokenManager.AuthenticateResult = dataStorageService.RetrieveAuthenticateResult();
                step = 2;

                applicationContext.Load(dataStorageService.RetrieveTenantInfo(), dataStorageService.RetrieveLoginInfo());
                step = 3;

            }
            catch (Exception e)
            {
                UserDialogs.Instance.Alert("Error step: " + step + ". Ex: " + e.ToString());
            }
        }

@chrskrs wrote :

In UserConfigurationManager.GetIfNeedsAsync(), the following code is executed:

        await WebRequestExecuter.Execute(
            async () => await userConfigurationService.GetAsync(AccessTokenManager.IsUserLoggedIn),
            async result =>
            {
                AppContext.Value.Configuration = result;
                SetCurrentCulture();  

RELEASE MODE : result = null !!!! DEBUG MODE: result has a value

The app fails during this call : SetCurrentCulture(); I do not know whether this has to do with the null result in AppContext.Value.Configuration Unfortunately I do not know how to debug SetCurrentCulture(); as iI cannot make the call async and then the messages do not show

But I am fairly sure the error occurs in SetCurrentCulture() . ( UserConfigurationManager.cs)

firstly, you must run in Debug mode. Xamarin needs extra configuration for running in release mode...

Check that you have enabled "Use shared runtime"

result is null because it cannot get a response with the existing token.the host address maybe incorrect!

Did you configure DefaultHostUrl when you run it in Release mode.

check the host address in your device mobile browser that you can reach it.

hi,

you cannot run it in release mode, you can only run it in debug mode. if you want to see it in release mode, then you need to publish it as an APK. See https://support.aspnetzero.com/QA/Questions/5936/Build-Project-in-Release-Mode https://support.aspnetzero.com/QA/Questions/5346/deploying-mobile-app#answer-82a79ec1-b7dd-481b-a888-055862ffdb9a

duplicate of https://github.com/aspnetzero/aspnet-zero-core/issues/3558

don't use WebRequestExecuter in AppDelegate.cs and use it as is.

In AppDelegate.cs class there's no call to UserConfigurationManager.GetAsync()

this code

 ApplicationBootstrapper.InitializeIfNeeds<AbpZeroTemplateXamarinIosModule>();

runs the below


 if (IsInitialized)
            {
                return;
            }

            AbpBootstrapper = AbpBootstrapper.Create<T>(options =>
            {
                //Interceptors (dynamic proxying) are not supported in IOS platform. Also, it's not needed on the client side.
                options.DisableAllInterceptors = true;
            });

            AbpBootstrapper.IocManager.IocContainer.AddFacility<LoggingFacility>(f =>
            {
                f.LogUsing<TraceLoggerFactory>();
            });

            AbpBootstrapper.Initialize();

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"
}

this is a solution but if there's a callback method RegisterForRemoteNotifications() method, you can call FinishLaunching in there. Otherwise 3 sec maybe issue when using slow networks.

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

Showing 1361 to 1370 of 1377 entries