Open Closed

Error loading Manage page #5089


User avatar
0
Leonardo.Willrich created
  • ABP Framework version: v7.2.1
  • UI type: Blazor WASM
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes / no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

When loading the page Manage (ManageYourProfile menu), it is not loading correctly the scripts when the application is deployed. Running in the localhost it works well. For example, the method abp.auth.isGranted() always returns false. Also, I'm getting this warning in the console: "Could not find localization source: AbpUi".

Any idea what could be wrong? I've already deployed again, and have cleaned the application data, and cache, but, I'm still getting this error.

The abp.auth.isGranted() is also not working in another application with same template, but, I'm not getting the warn message in the console.


23 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you share the logs of API and auth server?

    liming.ma@volosoft.com

  • User Avatar
    0
    Leonardo.Willrich created

    Email sent.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Thanks. The logs didn't help much, can you share a username and password to reproduce it online?

    liming.ma@volosoft.com

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Hi

    Please try to set the Mode of AbpBundlingOptions as None for your https://sbc.host.dev.xxx.com/ project and re-publish it online.

    I will continue to check it.

    Thanks

    Configure<AbpBundlingOptions>(options =>
    {
        options.Mode = BundlingMode.None;
    });
    
  • User Avatar
    0
    Leonardo.Willrich created

    Hi Maliming,

    It didn't change, I'm still getting the same issue.

  • User Avatar
    0
    Leonardo.Willrich created

    Maliming,

    I have got a fresh new template, BlazorWASM 7.2.1, I have published and it is working. In the other project that I've mentioned it wasn't working, it is actually working. It is only this project, sbc.dev, that is not working. Let me know if you want me to send all project if required.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Thanks. I will check it online first.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I found the problem.

    The abp.js of your website/project is not up to date.

    https://github.com/abpframework/abp/blob/dev/npm/packs/core/src/abp.js

    Please try to update it in package.json of API/AuthServer project and re-run the abp install-libs command to update the libs.

  • User Avatar
    0
    Leonardo.Willrich created

    Hi,

    That is weird, why when running locally it works and when published it doesn't. How should I update in package.json? It is exactly equal to the fresh new template.

  • User Avatar
    0
    Leonardo.Willrich created

    That is my package.json:

    { "version": "1.0.0", "name": "my-app", "private": true, "dependencies": { "@volo/abp.aspnetcore.mvc.ui.theme.lepton": "^7.2.1", "@volo/account": "~7.2.1" } }

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    It is exactly equal to the fresh new template.

    Yes

    when published it doesn't.

    How did you publish the website?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    The script in production and local is different.

  • User Avatar
    0
    Leonardo.Willrich created

    Ok, have run "abp install-libs" and I'm publishing again. I always publish in a local folder and copy the files to IIS.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    You can remove the Configure<AbpBundlingOptions> code after fixing this.

    Configure<AbpBundlingOptions>(options =>
    {
        options.Mode = BundlingMode.None;
    });
    
  • User Avatar
    0
    Leonardo.Willrich created

    Ok, thank you for the reminder. Unfortunately, it is still not working. I'll try to copy my local abp.js just to be sure.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can copy the entire wwwroot from local to production.

  • User Avatar
    0
    Leonardo.Willrich created

    Ok, indeed, the published and my local wwwroot are different. Where is abp.js copied when publishing? It should be the same.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    It copies from node_modues.

  • User Avatar
    0
    Leonardo.Willrich created

    That is what I know too. But, wwwroot and node_modules are exactly the same, only the one created in the publish folder is different. That is weird.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Maybe the publish has some cache mechanism, and it uses a cache version.

  • User Avatar
    0
    Leonardo.Willrich created

    I've deleted all publish folder, have restarted Visual Studio 2022, and like magic, it seems that it is getting the right abp.js. I'll publish and will see it if is working.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Good news.

  • User Avatar
    0
    Leonardo.Willrich created

    It worked. Thank you for your catch!

Made with ❤️ on ABP v9.1.0-preview. Updated on December 05, 2024, 12:19