Activities of "olitrepanier"

The problem is easily reproduced with a newly scaffolded Maui Blazor project. It seems like the token refresh doesn't work at all, or doesn't even occur.

Heres a link to the zipped solution: https://filetransfer.io/data-package/3xvB5DqT#link

  • ABP Framework version: v7.4.2

  • UI Type: Blazor WASM and Maui Blazor

  • Database System: SQL Server

  • Tiered (for MVC) or Auth Server Separated (for Angular): no

  • Exception message and full stack trace: blazor.webview.js:1 Uncaught (in promise) Error: Volo.Abp.Http.Client.AbpRemoteCallException: Unauthorized at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase1.<ThrowExceptionForResponseAsync>d__42[[Entrenou.Pharmacies.IPharmaciesAppService, Entrenou.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext() in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Http.Client\Volo\Abp\Http\Client\ClientProxying\ClientProxyBase.cs:line 258 at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase1.<RequestAsync>d__36[[Entrenou.Pharmacies.IPharmaciesAppService, Entrenou.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext() in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Http.Client\Volo\Abp\Http\Client\ClientProxying\ClientProxyBase.cs:line 161 at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase1.<RequestAsync>d__351[[Entrenou.Pharmacies.IPharmaciesAppService, Entrenou.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[System.Collections.Generic.List1[[Entrenou.Pharmacies.PharmacyInMapDto, Entrenou.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext() in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Http.Client\Volo\Abp\Http\Client\ClientProxying\ClientProxyBase.cs:line 86 at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptorClientProxy1.<CallRequestAsync>d__01[[Entrenou.Pharmacies.IPharmaciesAppService, Entrenou.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[System.Collections.Generic.List1[[Entrenou.Pharmacies.PharmacyInMapDto, Entrenou.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext() in D:\ci\Jenkins\workspace\abp-volo-release\abp\fram

  • Steps to reproduce the issue:

  1. On a Maui Blazor project, have an expired access token
  2. Call the api with expired access token
  3. Api returns an exception with Unauthorized

We noticed a difference between our Blazor and Maui Blazor versions of the app. On Blazor, when the access token is expired, the application attempts to refresh the token before sending a request to the api. Therefore, the api doesn't return an exception and everything is fine.

On the other hand, in Maui Blazor, the app doesn't seem to refresh the expired token before sending a request. Thus, the api returns an unauthorized exception and our application shows us the reload button.

We also noticed that in our Blazor project, there isn't any refresh token and the login flow seems to be triggered instead (without asking the user to reenter credentials). In Maui Blazor, we do have a refresh token. Heres a screenshot of the http requests for the blazor project:

Any chance you could be more precise? We deployed the backend on an App service on Azure.

When I use Kudu to view the content of the service, this is what we find.

If I go into LogFiles

We've looked in every folder and found absolutely nothing.

We connected our backend to AppInsight and the logs we get there aren't giving us that much information:

  • ABP Framework version: v7.4.2
  • UI Type: Blazor WASM and Maui Blazor
  • Database System: SQL Server
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace: No specific stack trace. We just get internal error 500.
  • Steps to reproduce the issue: Any type of 500 error generated by the underlying code of abp.

This question is about improving our ability to debug internal errors more effectively. Occasionally, we encounter 500 internal errors, and it's quite challenging to pinpoint their cause as there is no inner stack trace provided. I'm curious if there's a configuration or a particular action we need to take to consistently obtain a more detailed stack trace whenever an internal server error occurs.

Hello @liangshiwei,

Awesome, with that code at least we get the app to launch on mobile. I can handle the rest.

Thank you!

@liangshiwei any update on this?

I understand that I can show a friendlier error page, but here, I am interested in having the app work despite having no internet connection. Especially on mobile.

The chances of people having no internet access on their mobile is much higher than on a computer. On a Maui Blazor project, the app doesn't even launch. It just crashes.

  • ABP Framework version: v7.4.2
  • UI Type: Blazor WASM and Maui Blazor
  • Database System: SQL Server
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:
  1. Shut down the API or turn off all internet connections on mobile.
  2. Try to open the app
  3. App crashes

It looks like if you do not have access to the internet or if the API is down, the application crashes on launch on both the Blazor and Maui Blazor projects. Is this normal? If you do not have access to the api, an exception is thrown when abp services get injected in the program.cs. This is very breaking on mobile and I think the app should be able to support offline mode.

Thank you for the code,

I also notice that there seems to be two SignalR connections. I doubt this is intended since it triggers the function ReceiveMessageAsync from the ChatHubConnectionService twice.

Is this normal?

This seems to be problematic since the chat sometimes gets Reversed twice, which cancels it out and is ordered wrongly.

Also, this means that calls to the API are made twice.

I'm having these issues both on Blazor and Maui Blazor.

Hello!

Awesome news. I already managed to code it on our end (very similar to the code you're giving). I was wondering if the razor components are also improved?

This is what it looks like with LeptonX:

Showing 1 to 10 of 26 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 01, 2024, 05:35