Activities of "michael.sudnik"

This appears to still be an issue in v4.0.0-rc.4

If you hit F5 enough, it will go away eventually. When the first one appears, I have been disabling that type of exception until the application has started and then restore it again.

The exception does not appear to be causing any problems with actually running the application.

Hi,

When i perform the same steps as you to create a new solution (using EF), I can confirm that it works and I can logout and log back in again repeatedly without any problems.

However, when I create a new app using the MongoDB database provider, I then see the incorrect behaviour.

abp new MyApp -t app-pro -u mvc --mobile none --database-provider mongodb --csf --preview

Thanks for looking into it.

This appears to work without any problems now that I have upgraded to v4.0.0-rc3

This appears to work without any problems now that I have upgraded to v4.0.0-rc3

I have now created a brand new v4.0.0-rc3 version and made only a single modification to the code.

.AddMicrosoftAccount(MicrosoftAccountDefaults.AuthenticationScheme, "Company", options =>
                {
                    options.AuthorizationEndpoint = "https://login.microsoftonline.com/[###MY TENENT ID###]/oauth2/v2.0/authorize";
                    options.TokenEndpoint = "https://login.microsoftonline.com/[##MY TENENT ID###]/oauth2/v2.0/token";
                })

The problem occurs when running locally, without publishing to azure.

The inclusion of the following code, fixes the problem for some reason:

 [Dependency(ReplaceServices = true)]
    [ExposeServices(typeof(RegisterModel))]
    public class CustomRegisterModel : RegisterModel
    {
        protected override async Task RegisterExternalUserAsync(ExternalLoginInfo externalLoginInfo, string emailAddress)
        {
            var user = new IdentityUser(GuidGenerator.Create(), emailAddress, emailAddress, CurrentTenant.Id);

            (await UserManager.CreateAsync(user)).CheckErrors();
            (await UserManager.AddDefaultRolesAsync(user)).CheckErrors();

            var userLoginAlreadyExists = user.Logins.Any(x =>
                x.TenantId == user.TenantId &&
                x.LoginProvider == externalLoginInfo.LoginProvider &&
                x.ProviderKey == externalLoginInfo.ProviderKey);

            if (!userLoginAlreadyExists)
            {
                (await UserManager.AddLoginAsync(user, new UserLoginInfo(
                    externalLoginInfo.LoginProvider,
                    externalLoginInfo.ProviderKey,
                    externalLoginInfo.ProviderDisplayName
                ))).CheckErrors();
            }

            await SignInManager.SignInAsync(user, isPersistent: true);
        }
    }
  • ABP Framework version: v4.0.0-rc.3
  • UI type: MVC
  • Tiered (MVC) or Identity Server Seperated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:

2020-11-18 08:31:07.204 +00:00 [DBG] Started background worker: Volo.Abp.BackgroundJobs.BackgroundJobWorker 2020-11-18 08:31:07.207 +00:00 [DBG] Started background worker: Volo.Abp.IdentityServer.Tokens.TokenCleanupBackgroundWorker 2020-11-18 08:32:32.487 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.470 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.471 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.471 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.471 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.471 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.471 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.472 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.472 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.489 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.491 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.492 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.497 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.497 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.499 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.500 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.501 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.509 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.510 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.515 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.516 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.517 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.519 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.531 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.563 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.581 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.585 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.585 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.588 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.603 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.620 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.621 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.636 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.640 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.640 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.649 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:06.663 +00:00 [ERR] ABP-LIC-0021 - Object reference not set to an instance of an object. 2020-11-18 08:33:07.126 +00:00 [INF] Starting IdentityServer4 version 4.1.1+cebd52f5bc61bdefc262fd20739d4d087c6f961f 2020-11-18 08:33:07.575 +00:00 [INF] Using the default authentication scheme Identity.Application for IdentityServer 2020-11-18 08:33:07.575 +00:00 [DBG] Using Identity.Application as default ASP.NET Core scheme for authentication 2020-11-18 08:33:07.575 +00:00 [DBG] Using Identity.External as default ASP.NET Core scheme for sign-in 2020-11-18 08:33:07.575 +00:00 [DBG] Using Identity.External as default ASP.NET Core scheme for sign-out 2020-11-18 08:33:07.575 +00:00 [DBG] Using Identity.Application as default ASP.NET Core scheme for challenge 2020-11-18 08:33:07.575 +00:00 [DBG] Using Identity.Application as default ASP.NET Core scheme for forbid

ABP Framework version: v3.3.1 UI type: MVC Tiered (MVC) or Identity Server Seperated (Angular): MVC Exception message and stack trace: Steps to reproduce the issue:

I have added the file management module to a solution and have managed to get it to upload files to azure or the database. I can upload very small files of approx 5 KBs, but when I try to upload any files larger, it is displaying an error saying that the upload stalled and was aborted. I cannot see anything in the logs to indicate why this has happened. Or, is there somewhere in code that I can try to investigate?

This slightly larger file seemed to upload quickly, but then got stuck

Note: this might be related to this: https://support.abp.io/QA/Questions/565/Azure-and-Microsoft-Authentication-intermittently-breaking-logins. And it happens if I include or exclude my "hack".

Mike

How do I get this escalated to the support team?

  • ABP Framework version: v3.3.1
  • UI type: MVC
  • Tiered (MVC) or Identity Server Seperated (Angular): MVC
  • Exception message and stack trace:
  • Steps to reproduce the issue:

Hi,

I have spent more than a day working through this problem and can reproduce the problem reliably using an unmodified solution created using the abp suite.

With the Microsoft external provider enabled, the Log In button will sometimes timeout (after 230 seconds, as defined by azure app services with no response). It normally happens the 3rd or 4th time after clicking log out and logging back in again. I have seen it freeze in both ways, when using a username and password or when using the now enabled microsoft login. It just times out after an arbitrary number of attempts.

  1. Create new solution using abp suite (application, MVC, no mobile, mongodb, not tiered, not preview)
  2. Publish it to a new azure app service
  3. Access the website through the ...azurewebsites.net url
  4. Enable the Microsoft external provider within the account settings UI
  5. Log out, Log in, Log out, log in, ... a few more times maybe... then timeout on loggin in

This only appears to be a problem with running within azure. I do not have the same problem when running locally.

I am using MongoDB Atlas, but do not see anything in the logs to indicate a problem with this communication. I event extended the MongoDB code to ensure that the Client was created with logging capabilities (it would be useful to have a way to create a MongoDB Client through a factory somewhere) and did not see any problems

I have enabled every log that I know how to, and do not see anything after the post request is started to be handled. This led me to add my own middleware to try and capture more information to verify that there were no problems with the request. By doing this, I managed to find a "hack" which appears to work as a temporary fix and may help to identify the real cause. I am not sure if the hack works as a result of it forcing the request body to be read before moving on to the next request delegate, or if it works because of the minor additional time that this middleware is taking. I tried just explicitly adding an "await Task.Delay(50)", but this did not fix the problem. I am unable to dig any deeper and at the limit of my knowledge.

public class RequestResponseLoggingMiddleware
    {
        private readonly RequestDelegate _next;

        public RequestResponseLoggingMiddleware(RequestDelegate next)
        {
            _next = next;
        }

        public async Task Invoke(HttpContext httpContext)
        {
            if (httpContext == null)
                throw new ArgumentNullException(nameof(httpContext));

            httpContext.Request.EnableBuffering();
            Stream body = httpContext.Request.Body;
            body.Seek(0, SeekOrigin.Begin);
            byte[] buffer = new byte[Convert.ToInt32(httpContext.Request.ContentLength)];
            await body.ReadAsync(buffer, 0, buffer.Length);
            body.Seek(0, SeekOrigin.Begin);
            httpContext.Request.Body = body;

            await _next(httpContext);
        }
    }
Showing 41 to 50 of 56 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11