Thanks!
That worked, I now can generate new 9.2.3 solutions :-)
Thanks,
Sorry, I don't understand how to install a nupkg file. I thought it was ABP Studio, desktop application I need to download and install?
Thanks,
I will try to generate a new solution with ABP Studio 1.1.2 instead. However, I need an URL for MacOS (Intel chip).. can you give me that url instead?
Thanks,
The thing is that we started from the Blazor WebApp template without any code from our Blazor Wasm solution.
Then we started the required Redis instance on the local development machine. We also did the changes in appsettings.json to use our staging environment on Kubernetes cloud.
Hence, the code is unmodified from the code generator, and we use (same version as all our services and apps, Microservice template 9.2.3).
The only changes, is the blazor/MyProject.Blazor/Properties/launchSettings.json and */appsettings.json (to get the same port numbers as our old Wasm app).
However, when we use ABP Studio, it seems it generats for dotnet 10 / ABP 10. Despite "Change version to 9.2.3" in the studio. I guess that can generate problems. How can we generate with Dotnet 9 and 9.2.3?
Trying to replace our Blazor Wasm application to WebApp and gets this in the local dev of Blazor WebApp:
11:29:02 ERR] Exception occurred while processing message.
System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (Unauthorized).
at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.GetUserInformationAsync(OpenIdConnectMessage message, JwtSecurityToken jwt, ClaimsPrincipal principal, AuthenticationProperties properties)
at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleRemoteAuthenticateAsync()
[11:29:02 INF] Error from RemoteAuthentication: Response status code does not indicate success: 401 (Unauthorized)..
[11:29:02 ERR] An unhandled exception has occurred while executing the request.
Microsoft.AspNetCore.Authentication.AuthenticationFailureException: An error was encountered while handling the remote login.
---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (Unauthorized).
at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.GetUserInformationAsync(OpenIdConnectMessage message, JwtSecurityToken jwt, ClaimsPrincipal principal, AuthenticationProperties properties)
at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleRemoteAuthenticateAsync()
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler`1.HandleRequestAsync()
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Volo.Abp.AspNetCore.Security.AbpSecurityHeadersMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Volo.Abp.AspNetCore.Tracing.AbpCorrelationIdMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.RequestLocalization.AbpRequestLocalizationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
[11:29:02 INF] Setting culture and ui-culture to the response. culture: sv, ui-culture: sv
And the log from the auth server gives:
[10:29:02 INF] The request URI matched a server endpoint: Token.
[10:29:02 INF] The token request was successfully extracted: {
"client_id": "BlazorWebApp",
"client_secret": "[redacted]",
"code": "[redacted]",
"grant_type": "authorization_code",
"redirect_uri": "https://localhost:44346/signin-oidc"
}.
[10:29:02 INF] The token request was successfully validated.
[10:29:02 INF] Executing endpoint 'Volo.Abp.OpenIddict.Controllers.TokenController.HandleAsync (Volo.Abp.OpenIddict.AspNetCore)'
[10:29:02 INF] Route matched with {action = "Handle", controller = "Token", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] HandleAsync() on controller Volo.Abp.OpenIddict.Controllers.TokenController (Volo.Abp.OpenIddict.AspNetCore).
[10:29:02 INF] Skipping the execution of current filter as its not the most effective filter implementing the policy Microsoft.AspNetCore.Mvc.ViewFeatures.IAntiforgeryPolicy
[10:29:02 INF] Executing SignInResult with authentication scheme (OpenIddict.Server.AspNetCore) and the following principal: System.Security.Claims.ClaimsPrincipal.
[10:29:02 INF] The token '3a1e7bd4-5293-5f82-8180-a638db5cb5fa' was successfully marked as redeemed.
[10:29:02 INF] The response was successfully returned as a JSON document: {
"access_token": "[redacted]",
"token_type": "Bearer",
"expires_in": 3599,
"scope": "openid profile roles email phone AuthServer IdentityService AdministrationService SaasService AuditLoggingService GdprService ChatService",
"id_token": "[redacted]"
}.
[10:29:02 INF] Executed action Volo.Abp.OpenIddict.Controllers.TokenController.HandleAsync (Volo.Abp.OpenIddict.AspNetCore) in 62.1836ms
[10:29:02 INF] Executed endpoint 'Volo.Abp.OpenIddict.Controllers.TokenController.HandleAsync (Volo.Abp.OpenIddict.AspNetCore)'
[10:29:02 INF] Request finished HTTP/1.1 POST http://auth.staging.myproject.io/connect/token - 200 3079 application/json;charset=UTF-8 147.4217ms
[10:29:02 INF] Request starting HTTP/1.1 GET http://auth.staging.myproject.io/connect/userinfo - null null
[10:29:02 WRN] Unknown proxy: [::ffff:10.244.1.23]:38956
[10:29:02 INF] The request URI matched a server endpoint: UserInfo.
[10:29:02 INF] The userinfo request was successfully extracted: {}.
[10:29:02 INF] The userinfo request was rejected because the mandatory 'access_token' parameter was missing.
[10:29:02 INF] The response was successfully returned as a challenge response: {
"error": "missing_token",
"error_description": "The mandatory 'access_token' parameter is missing.",
"error_uri": "https://documentation.openiddict.com/errors/ID2029"
}.
[10:29:02 INF] Request finished HTTP/1.1 GET http://auth.staging.myproject.io/connect/userinfo - 302 0 null 1.6405ms
[10:29:02 INF] Request starting HTTP/1.1 GET http://auth.staging.myproject.io/Error?httpStatusCode=401 - null null
Thanks, the AI solution was good enough. Thanks for your help :-)
I am using ABP 9.2.3 microservice template.
Everything works well for Blazor WebAssemby. However, for the generated React Native app, it always return 400 when trying to login.
[19:48:48 INF] Request starting HTTP/1.1 GET http://auth.staging.myproject.io/__bundles/LeptonX.Global.AFCBFDDBAFF29B1A0580323089206430.js?_v=639019426904413149 - null null
[19:48:48 WRN] Unknown proxy: [::ffff:10.244.1.23]:60176
[19:48:48 INF] The file /__bundles/LeptonX.Global.AFCBFDDBAFF29B1A0580323089206430.js was not modified
[19:48:48 INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController.GetAll (Volo.Abp.AspNetCore.Mvc)'
[19:48:48 INF] Route matched with {area = "Abp", action = "GetAll", controller = "AbpServiceProxyScript", page = ""}. Executing controller action with signature Microsoft.AspNetCore.Mvc.ActionResult GetAll(Volo.Abp.AspNetCore.Mvc.ProxyScripting.ServiceProxyGenerationModel) on controller Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController (Volo.Abp.AspNetCore.Mvc).
[19:48:48 INF] Identity.Application was not authenticated. Failure message: Unprotect ticket failed
[19:48:48 INF] Executing ContentResult with HTTP Response ContentType of application/javascript
[19:48:48 INF] Executed action Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController.GetAll (Volo.Abp.AspNetCore.Mvc) in 2.4121ms
[19:48:48 INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController.GetAll (Volo.Abp.AspNetCore.Mvc)'
[19:48:48 INF] Request starting HTTP/1.1 GET http://auth.staging.myproject.io/libs/timeago/locales/jquery.timeago.sv.js?_v=638925170426700683 - null null
[19:48:48 INF] Request finished HTTP/1.1 GET http://auth.staging.myproject.io/Abp/ServiceProxyScript - 200 3003 application/javascript 7.6018ms
Thanks,
Sorry for late reply. Don’t know what the problem is. However, I was restoring the database back in time and then it worked.
I’m a bit unsure why this phenomenon has occurred.
It’s always possible to authenticate via the auth server using https://auth.myproject.com
However, when trying to log in through the Blazor app or React Native, it doesn’t work — it usually times out after 100 seconds. "An error occurred during the ABP remote HTTP request. (net_http_request_timedout, 100) See the inner exception for details."
Got this log from myproject-administration pod:
[20:59:27 INF] Request finished HTTP/1.1 GET http://myproject-administration:80/metrics - 200 null application/openmetrics-text; version=1.0.0; charset=utf-8 8.3176ms
[20:59:31 WRN] Failed to refresh remote claims for user: 3a1be950-5cd9-cf87-11ea-182bd6c62a4b
System.Threading.Tasks.TaskCanceledException: The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.
---> System.TimeoutException: A task was canceled.
---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionWaiter`1.WaitForConnectionWithTelemetryAsync(HttpRequestMessage request, HttpConnectionPool pool, Boolean async, CancellationToken requestCancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.Metrics.MetricsHandler.SendAsyncWithMetrics(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.<SendCoreAsync>g__Core|4_0(HttpRequestMessage request, Boolean useAsync, CancellationToken cancellationToken)
at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.<SendCoreAsync>g__Core|4_0(HttpRequestMessage request, Boolean useAsync, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at System.Net.Http.HttpClient.HandleFailure(Exception e, Boolean telemetryStarted, HttpResponseMessage response, CancellationTokenSource cts, CancellationToken cancellationToken, CancellationTokenSource pendingRequestsCts)
at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
at Volo.Abp.AspNetCore.Authentication.JwtBearer.DynamicClaims.WebRemoteDynamicClaimsPrincipalContributorCache.RefreshAsync(Guid userId, Nullable`1 tenantId)
at Volo.Abp.Security.Claims.RemoteDynamicClaimsPrincipalContributorCacheBase`1.GetAsync(Guid userId, Nullable`1 tenantId)
[20:59:31 WRN] Failed to refresh remote claims for user: 3a1be950-5cd9-cf87-11ea-182bd6c62a4b
System.Threading.Tasks.TaskCanceledException: The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.
---> System.TimeoutException: A task was canceled.
---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionWaiter`1.WaitForConnectionWithTelemetryAsync(HttpRequestMessage request, HttpConnectionPool pool, Boolean async, CancellationToken requestCancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.Metrics.MetricsHandler.SendAsyncWithMetrics(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.<SendCoreAsync>g__Core|4_0(HttpRequestMessage request, Boolean useAsync, CancellationToken cancellationToken)
at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.<SendCoreAsync>g__Core|4_0(HttpRequestMessage request, Boolean useAsync, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at System.Net.Http.HttpClient.HandleFailure(Exception e, Boolean telemetryStarted, HttpResponseMessage response, CancellationTokenSource cts, CancellationToken cancellationToken, CancellationTokenSource pendingRequestsCts)
at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
at Volo.Abp.AspNetCore.Authentication.JwtBearer.DynamicClaims.WebRemoteDynamicClaimsPrincipalContributorCache.RefreshAsync(Guid userId, Nullable`1 tenantId)
at Volo.Abp.Security.Claims.RemoteDynamicClaimsPrincipalContributorCacheBase`1.GetAsync(Guid userId, Nullable`1 tenantId)
at Volo.Abp.Security.Claims.RemoteDynamicClaimsPrincipalContributorBase`2.ContributeAsync(AbpClaimsPrincipalContributorContext context)
Some known issue?
Thanks for great support!