Base solution for your next web application
Open Closed

Local and Staging login has randomly started to fail #9369


User avatar
0
tinytownsoftware created

I was happily running the website locally this morning, but all of a sudden, it cannot log in anymore, using any account. I checked my change history and nothing has really changed that could cause this. I also reverted back to the code that is in Production and that doesn't work either. Production on Azure thankfully works, but my Staging slot in Azure does not work even though it worked just fine this morning (I did not change the code). Furthermore, I have another laptop that has code that is about 2 weeks old. I just ran that and it does not log in, so something very shady is going on. Something somewhere on the internet is down, but I don't know what.

I stepped through the AccountController's Login method and it works fine, it returns success. Putting in the wrong password returns failure. But something is not working as far as maybe setting the AbpSession, as /api/services/app/Session/GetCurrentLoginInformations returns a null user. The cookie itself is there in the browser, I checked. I am not too familiar with how AbpSession works, so if you tell me where to set a breakpoint to see if it's getting set properly, I can do it.

So, there must be something external that either Abp or AspNetZero are accessing that stopped working between now and this morning.


7 Answer(s)
  • User Avatar
    0
    tinytownsoftware created

    Never mind, I think the problem is with Chrome caching. I have no idea what it's going, but it's using some aggressive caching techniques. I tried Private Mode and the issue persists. Then I tried IE and it works completely fine. Anyone else seen this issue?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @tinytownsoftware,

    Yes, Chrome sometimes does that. Do you work on any other AspNetBoilerplate based project ? Since all ABP based projects are using sane cookie names, the problem might be related to this.

    Another reason might be the returnUrl query string parameter. If your login url contains a host page as return URL and if you are trying to login as a tenant user, you will be redirected back to login page. Same is valid for tenant page and tryying to login as host.

  • User Avatar
    0
    tinytownsoftware created

    No, this is the only ABP project I am working on. Good to know about Chrome. It's not the first time I have seen something weird like this with Chrome.

  • User Avatar
    0
    sneddo created

    Hi @tinytownsoftware

    Did you work out why chrome was / is doing this?

    Im having a similar issue.

    Works on Edge, and version of Chrome below v84.

    But it will not no matter what I do in terms of cleaning cookies or anything else. It will not log into the latest version of chrome: Version 84.0.4147.89 (Official Build) (64-bit) On Windows 10.

  • User Avatar
    0
    tinytownsoftware created

    I was not able to figure it out. What's most confusing is that it works fine for the my Production website in the same version of Chrome. Smells like some weird Chrome bug.

  • User Avatar
    0
    sneddo created

    I worked out what this was for my environment.

    Im running my app on a kubernetes setup using nginx ingress controller. This controller terminates ssl. This would normally be fine, but in front of that I have a load balancer which is set up as a proxy to the ingress controller. The issue is that my hosts load balancer doesnt pass through x-forward headers when in proxy pass though configuration. This is a bit poor.

    So my solution to this has been to force the app to https with a little middleware that sets the request scheme.

    The app now works on latest chrome.

  • User Avatar
    0
    tinytownsoftware created

    This is starting to look like this issue, which also randomly started happening: https://support.aspnetzero.com/QA/Questions/8783/Login-Loop---Chrome-Fails---IE-Working---Hosted-In-IIS