- 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)
-
0
hi
Can you share the logs of API and auth server?
liming.ma@volosoft.com
-
0
Email sent.
-
0
Thanks. The logs didn't help much, can you share a username and password to reproduce it online?
liming.ma@volosoft.com
-
0
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; });
-
0
Hi Maliming,
It didn't change, I'm still getting the same issue.
-
0
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.
-
0
Thanks. I will check it online first.
-
0
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 theabp install-libs
command to update the libs. -
0
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.
-
0
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" } }
-
0
It is exactly equal to the fresh new template.
Yes
when published it doesn't.
How did you publish the website?
-
0
The script in production and local is different.
-
0
Ok, have run "abp install-libs" and I'm publishing again. I always publish in a local folder and copy the files to IIS.
-
0
You can remove the
Configure<AbpBundlingOptions>
code after fixing this.Configure<AbpBundlingOptions>(options => { options.Mode = BundlingMode.None; });
-
0
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.
-
0
hi
You can copy the entire
wwwroot
from local to production. -
0
Ok, indeed, the published and my local wwwroot are different. Where is abp.js copied when publishing? It should be the same.
-
0
It copies from node_modues.
-
0
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.
-
0
Maybe the publish has some cache mechanism, and it uses a cache version.
-
0
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.
-
0
Good news.
-
0
It worked. Thank you for your catch!