- ABP Framework version: v8.2.3
- UI Type: Blazor Server
- 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:
Hi,
This just started to happen, when I log in to our production (test) environment everything is OK for a few seconds, then I seem to be losing authentication, and getting an 'Unauthorized' exception when calling a service method on the homepage. I have a video of this here:
https://drive.google.com/file/d/1xJpaKd_RJFRgb90Ol0IxINk0oW9c6n6Y/view?usp=drive_link
I have detailed errors on so I can see the exception in the browser console:
Do you know why / how this is happening and how to fix?
Thanks,
Karim Ainsworth
43 Answer(s)
-
0
Hi,
Can I check remotely?
-
0
Hi,
Yes of course, anything you need to do. Though this is deployed to an Azure App Service x 3, Auth / API / Blazor, and that is where I am having the problems. Let me know what you need from me and I will provide to you.
Thanks,
Karim
-
0
Hi,
We can have a meeting to check it, I'm live in UTC8 and my work time is 9am to 6pm, let me know what time good for you
It's better if you can provide a simple project with me to reproduce the problem , so I can check it deeply and get back to you.
-
0
Hi,
I am in UTC + 6.5, free for the next few hours if you want to send a meeting link. We could try at 12pm my time , 1:30pm your time if that works?
This only occurs in a production environment, locally everything is fine. May be helpful to run through the code though to see if there is anything obvious that could be causing this.
Thanks,
Karim
-
0
We could try at 12pm my time , 1:30pm your time if that works? This only occurs in a production environment, locally everything is fine. May be helpful to run through the code though to see if there is anything obvious that could be causing this.
okay, no problem
-
0
There is the link https://us05web.zoom.us/j/5929668302?pwd=UXl2M2RUeG5PazVSY2ZCOW1NMUxtZz09
-
0
ok
-
0
Hi,
I think the problem is you are using the webapp template but change the mode to
Interactiveserver
, so there will be some unexpected problems.I made some changes(sorry for take too long time, because the network latency is very high), but I'm not sure it will work, you can get a try and back to me.
-
0
OK great, yeah I wasn't sure if you could hear me during the ZOOM call. I was following what you did, makes sense. Let me test this out locally, then deploy to our test environment and I will let you know how it goes.
-
0
Hi,
Unfortunately, same AbpRemoteCallException. Ran everything locally, worked fine. I think probably removing the WebAssembly code is the right thing to do, it could cause other problems but unfortunately it didn't help with this one:
Volo.Abp.Http.Client.AbpRemoteCallException: Unauthorized , what is the root cause of this exception ( other than obviously not being properly logged in ) , is there any way to dig into this and determine what we need to look at a bit more closer?
Thanks,
Kariom
-
0
Hi,
Can you share an admin account/password with me?
-
0
Hi,
Sure, what is your email address?
-
0
shiwei.liang@volosoft.com
-
0
Hi,
OK I have sent credentials to that email.
-
0
Hi,
You can try change
Interactiveserver
toInteractiveAuto
to temporarily solve this problem. Or create a new same name project withBlazorServer
UI to replace your existing project and copy your code.I will keep researching this problem.
-
0
Hi,
This project was using InteractiveAuto initially, but I was having issues even in development with Authentication. I had created a support ticket for that 3 months ago that you and I went through, the solution was to change to InteractiveServer mode.
I just did try and go back to InteractiveAuto earlier today, but got some different auth related exceptions in development so I have moved it back.
Or create a new same name project with BlazorServer UI to replace your existing project and copy your code.
This could knock me back a month, we have been working through various issues and it feels like we are so close. Everything is working fine in development, there is just this Auth exception in the test environment.
Any other suggestions on how to focus and fix that particular issue would be great, really need to get past this so that I can continue working on this project.
Thanks,
Karim
-
0
Hi,
Can you add the following code and re-deploy project and share the result.
public partial class Index { [Inject] public IAbpAccessTokenProvider AbpAccessTokenProvider { get; set; } [Inject] public IRemoteServiceHttpClientAuthenticator ServiceHttpClientAuthenticator { get; set; } public string Token { get; set; } protected async override Task OnInitializedAsync() { Token = await AbpAccessTokenProvider.GetTokenAsync(); } }
<h3>AccessTokenProvder Type is : @AbpAccessTokenProvider.GetType().FullName</h3> <h3>ServiceHttpClientAuthenticator Type is @ServiceHttpClientAuthenticator.GetType().FullName</h3> <h3>Current token @Token</h3>
-
0
Hi,
This was a problem with my WebSockets config on Azure. I had set it correctly initially, so I didn't think to go back and check that setting. I spent some time over the weekend going over every single config setting and I found that it was not set correctly. Once I set it, then everything is working fine.
I really do appreciate your help and your patience with this one, I think some of the changes we made will make things more stable also so that is a good thing.
Will close this now. Thanks again for your support.
Karim