Open Closed

‘Authorizing...’ text flash after a few seconds on page load, then the page resets #7541


User avatar
0
okains created
  • ABP Framework version: v8.2.0
  • UI Type: Blazor Web App
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

This happens every time I load / refresh a page. I can login fine, currently logged in here as admin:

After a few seconds I get this:

And then the page resets. My MainHeaderBranding override gets reset, 3rd party Syncfusion control loses databinding etc.

Any idea how to prevent this from happening?

Thanks,

Karim


19 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    This is not related to ABP, this is the Blazor design. When you refresh the page it is equivalent to restarting the application.

  • User Avatar
    0
    okains created

    This isn't happening due to a refresh, it happens after a few seconds, after the page had loaded. I can recreate it using a refresh, then wait a few seconds and Authenticating... then I lose my Custom Components ( MainHeaderBranding ) and 3rd party control binding.

    If this was just the application restarting then I would expect it to then be in an initial state, custom components fine, databound controls etc.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    could you share a video?

  • User Avatar
    0
    okains created

    Sure, here you go:

    https://drive.google.com/file/d/1l1bohNn4z8NCVQVn-HbSQPET_CLUE_wT/view?usp=sharing

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    thanks, i will check it

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    I could not reproduce the problem.

    Could you share the full steps? thanks. https://drive.google.com/file/d/1dVSJKFSvl_BDT7B83SpYfOjq97YqfVj9/view?usp=sharing

  • User Avatar
    0
    okains created

    Hi,

    This seems to be happening on all projects I have created after the 8.2 upgrade. Here is another video of a test solution that is brand new created, 8.2, tiered solution. The same ABP configuration as my last solution for which I shared the last video.

    https://drive.google.com/file/d/1Ipi_gjmyuhM0kTfRKXzjLKfttyaW8uEO/view?usp=sharing

    I can give you access to this repo if you can give me your GitHub username. I think that will make it easier to troubleshoot.

    Thanks,

    Karim

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    HI,

    My github username is realLiangshiwei thanks

  • User Avatar
    0
    okains created

    Hi,

    I have given you acces.

    Thanks

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    I can reproduce the problem, but this is how the Blazor web app works. I have no idea now; there may be a better way to improve it, I will continue to investigate

  • User Avatar
    0
    okains created

    OK please continue to investigate. Even if that Authorizing call is normal, we are losing the binding of our ABP Custom Components and other page level data binding. That can't be correct. This is making it extremely difficult for us to even do any dev work on the UI.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    okay :)

  • User Avatar
    0
    okains created

    Hi,

    Just some more info on this. On initial page load everything is fine, binding our control using OnInitializedAsync(). After the 5 second pause, then the Authenticating... message none of the page lifecycle methods are being hit. This happens on every page, so it is not really possible to do any UI work now.

    Looking around on Chat GPT for general solutions and seems this might be related to an issue in middleware:

    "Additionally, ensure that your authentication service or middleware is configured correctly and doesn't inadvertently trigger a full page reload or component reinitialization. This behavior can often be controlled via configuration settings or by using specific authentication mechanisms that work well with Blazor's SPA nature."

    Hopefully this gives you an idea on where to look.

    Thanks,

    Karim

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    ok, thanks for the info

  • User Avatar
    0
    okains created

    Hi, let met provide an update on this. I have a workaround for now.

    This is happening with InteractiveAuto rendering, which is the default rendering mode on the ABP Suite generated Blazor Web App. Once the WASM code has finished downloading, and the app is switching from the socket connection to WASM that is when the 'Authorizing...' text is shown and things are rebinding.

    At this point I lose the binding to my overridden ABP Components, even though they are in the Client Project, which is the main problem. Also, this WASM download is happening on every route, so this behavior repeats constantly.

    So, the workaround is the change the global rendering mode to InteractiveServer and not use WASM at this point, which is fine for me and everything works perfectly. So I will stick with that until I know that the WASM experience has been fixed / improved.

    I am OK to close this now, I will go with this workaround on this project.

    Can I get credit back for the question?

    Thanks,

    Karim

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    okay

  • User Avatar
    0
    okains created

    what does okay mean? Are you okay with the workaround? Are you okay with giving me the question credit back? Can you be more specific please so I understand the outcome of this ticket?

    Thanks,

    Karim

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    already refunded.

  • User Avatar
    0
    okains created

    OK, great, thank you!

Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09