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!
I’m trying to call the DocumentService from the InvoiceService and have been following this guide: https://abp.io/docs/latest/guides/synchronous-interservice-communication I suspect that some parts of the guide are either incorrect or outdated — especially the module dependency part referencing typeof(ProductServiceHttpApiClientModule), which I can’t find in our solution. Could it actually refer to ProductServiceContractsModule instead? Anyway, I’m getting an error in the deployment logs in the InvoiceService (seems that DocumentService endpoints are not found?):
[20:29:57 INF] Found 2 events in the inbox.
[20:29:57 ERR] An exception was thrown while activating InvoiceService.TicketCompletedEventHandler -> Castle.Proxies.InvoiceManagerProxy.
Autofac.Core.DependencyResolutionException: An exception was thrown while activating InvoiceService.TicketCompletedEventHandler -> Castle.Proxies.InvoiceManagerProxy.
---> Autofac.Core.DependencyResolutionException: None of the constructors found on type 'Castle.Proxies.InvoiceManagerProxy' can be invoked with the available services and parameters:
Cannot resolve parameter 'DocumentService.Documents.IDocumentsAppService documentsAppService' of constructor 'Void .ctor(Castle.DynamicProxy.IInterceptor[], InvoiceService.Invoices.IInvoiceRepository, InvoiceService.Resources.IResourceRepository, InvoiceService.Customers.ICustomerRepository, InvoiceService.Invoices.IInvoiceResourceRepository, InvoiceService.PlaceOfPayments.IPlaceOfPaymentRepository, Volo.Abp.EventBus.Distributed.IDistributedEventBus, Volo.Abp.Data.IDataFilter, DocumentService.Documents.IDocumentsAppService, Microsoft.Extensions.Logging.ILogger`1[InvoiceService.Invoices.InvoiceManager])'.
See https://autofac.rtfd.io/help/no-constructors-bindable for more info.
at Autofac.Core.Activators.Reflection.ReflectionActivator.<>c__DisplayClass14_0.<UseSingleConstructorActivation>b__0(ResolveRequestContext context, Action`1 next)
at Autofac.Core.Resolving.Middleware.DisposalTrackingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
at Autofac.Builder.RegistrationBuilder`3.<>c__DisplayClass41_0.<PropertiesAutowired>b__0(ResolveRequestContext context, Action`1 next)
at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
--- End of inner exception stack trace ---
at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
at Autofac.Core.Resolving.Middleware.SharingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
at Autofac.Core.Resolving.Middleware.CircularDependencyDetectorMiddleware.Execute(ResolveRequestContext context, Action`1 next)
at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, ResolveRequest& request)
at Autofac.Core.Resolving.ResolveOperation.ExecuteOperation(ResolveRequest& request)
at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance)
at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at Volo.Abp.EventBus.IocEventHandlerFactory.GetHandler()
at Volo.Abp.EventBus.EventBusBase.TriggerHandlerAsync(IEventHandlerFactory asyncHandlerFactory, Type eventType, Object eventData, List`1 exceptions, InboxConfig inboxConfig)
at Volo.Abp.EventBus.EventBusBase.TriggerHandlersAsync(Type eventType, Object eventData, List`1 exceptions, InboxConfig inboxConfig)
at Volo.Abp.EventBus.Distributed.DistributedEventBusBase.TriggerHandlersFromInboxAsync(Type eventType, Object eventData, List`1 exceptions, InboxConfig inboxConfig)
at Volo.Abp.EventBus.RabbitMq.RabbitMqDistributedEventBus.ProcessFromInboxAsync(IncomingEventInfo incomingEvent, InboxConfig inboxConfig)
at Volo.Abp.EventBus.Distributed.InboxProcessor.RunAsync()
at Volo.Abp.EventBus.Distributed.InboxProcessor.RunAsync()
at Volo.Abp.EventBus.Distributed.InboxProcessor.TimerOnElapsed(AbpAsyncTimer arg)
at Volo.Abp.Threading.AbpAsyncTimer.Timer_Elapsed()
[20:29:57 ERR] ---------- Exception Data ----------
ActivatorChain = InvoiceService.TicketCompletedEventHandler -> Castle.Proxies.InvoiceManagerProxy
Do you have any tips or ideas about what might be causing this issue? Best regards
How do I tell the auth server to allow React Native? I’m getting the following error message, which results in a 400 status from the auth server:
[17:43:38 INF] The request URI matched a server endpoint: Authorization. [17:43:38 INF] The authorization request was successfully extracted: { "code_challenge": "Bxxxxxxx_jOizOFD0mqQ1zH7lCiR_JGcsrWN0KrThqE", "code_challenge_method": "S256", "redirect_uri": "exp://192.168.0.21:19000/", "client_id": "ReactNative", "response_type": "code", "state": "QNwPeeEtds", "scope": "offline_access AuthServer IdentityService AdministrationService SaasService" }. [17:43:38 INF] Client validation failed because 'exp://192.168.0.21:19000/' was not a valid redirect_uri for ReactNative. [17:43:38 INF] The authorization request was rejected because the redirect_uri was invalid: 'exp://192.168.0.21:19000/'.
Is this only an issue when simulating/running Expo? What will it be like once we have a real app in the App Store/Play?
I’ve deployed my microservice solution on a staging Kubernetes cluster at our cloud provider, and it works fine when accessing the Blazor WebAssembly app via the domain name. To avoid having to start all the services locally when developing the Blazor app, we previously added "App__CorsOrigins": "https://localhost:44346" in the Helm Chart. This worked fine in ABP 9.0.x but not in 9.2.3. In that case, the web browser shows the following message: Refused to display 'https://auth.staging.mydomain.com/Error?httpStatusCode=400' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'. Is there a good and convenient way to configure this, with minimal impact on the services and Blazor?
Why am I getting the following error in the browser (Chrome and Safari) when calling my Blazor web app?
[Warning] [blocked] The page at https://staging.mydomain.io/ requested insecure content from http://auth.staging.mydomain.io/connect/authorize?client_id=Blazor&redirect_uri=https%3A%2F%2Fstaging.mydomain.io%2Fauthentication%2Flogin-callback&response_type=code&scope=openid%20profile%20roles%20email%20phone%20AuthServer%20IdentityService%20AdministrationService%20SaasService%20AuditLoggingService%20GdprService%20LanguageService%20ChatService%20CustomerService%20TicketService%20DocumentService%20InvoiceService&state=c81ecdee975347efbec0130e23432ee0&code_challenge=o7sBN0mlemkSHHOvWYE_wZhJ9i9d6RB1vRhsHac39oA&code_challenge_method=S256&prompt=none&response_mode=query. This content was blocked and must be served over HTTPS.
Which variable is responsible for generating http://auth.staging.mydomain.io/connect (i.e., why is it using http:// instead of https://)?
What works: Logging in directly via auth.staging.mydomain.io Using https://gateway-web.staging.mydomain.io and running Swagger against the services' endpoints.
It’s a microservice solution created with ABP 9.0.4, and only minimal changes have been made to the Helm charts compared to the ABP generator output.
Thanks in advance.
exceptionWe have problem to get https://abp.io/docs/latest/framework/ui/blazor/authorization to work in our Blazor project. This is what we have:
@page "/"
@using Microsoft.AspNetCore.Authorization
@attribute [Authorize("CustomerService.Customers")]
@inherits MyProjectComponentBase
@* https://abp.io/docs/latest/framework/ui/blazor/authorization *@
#AuthorizeView Policy="CustomerService.Customers.Create">
<p>You can only see this if you satisfy the "CustomerService.Customers.Create" policy.</p>
#/AuthorizeView>
The # is instead of < since CB does render it? A bug in the Write component maybe?
This is the MyProject_Administration database, AbpPermissions table:

I have deployed my service using the provided Helm charts. But once testing it in Swagger (the authentication seems be ok) I got the following error from server.
[20:24:45 INF] Request starting HTTP/1.1 POST http://myproject-ticket/api/ticket/tickets - application/json 333
[20:24:45 INF] CORS policy execution successful.
[20:24:45 INF] Executing endpoint 'myproject.TicketService.Tickets.TicketsAppService.CreateAsync (myproject.TicketService)'
[20:24:45 INF] Route matched with {action = "Create", controller = "Tickets", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[myproject.TicketService.Tickets.TicketDto] CreateAsync(myproject.TicketService.Tickets.TicketCreateDto) on controller myproject.TicketService.Tickets.TicketsAppService (myproject.TicketService).
[20:24:45 WRN] The required antiforgery cookie ".AspNetCore.Antiforgery.Pqki2eFce9s" is not present.
[20:24:45 INF] Authorization failed for the request at filter 'Volo.Abp.AspNetCore.Mvc.AntiForgery.AbpAutoValidateAntiforgeryTokenAuthorizationFilter'.
[20:24:45 INF] Executing StatusCodeResult, setting HTTP status code 400
[20:24:45 INF] Executed action myproject.TicketService.Tickets.TicketsAppService.CreateAsync (myproject.TicketService) in 1.4636ms
[20:24:45 INF] Executed endpoint 'myproject.TicketService.Tickets.TicketsAppService.CreateAsync (myproject.TicketService)'
[20:24:45 INF] Request finished HTTP/1.1 POST http://myproject-ticket/api/ticket/tickets - 400 0 null 28.3141ms
Do you have any idea what the problem is?
Thanks
The ETO class:
using Volo.Abp.EventBus;
namespace MyProject.CustomerService.Customers;
[EventName("MyProject.CustomerService.Customers.CustomerUpdated")]
public class CustomerUpdatedEto
{
public Guid Id { get; set; }
public string Name { get; set; } = null!;
public string Street { get; set; } = null!;
public string ZipCode { get; set; } = null!;
public string City { get; set; } = null!;
public string PhoneNumber { get; set; } = null!;
public string Email { get; set; }
public bool IsCompany { get; set; }
public string? IdentificationNumber { get; set; }
public string? AttName { get; set; }
}
That's everything I have done in the CustomerService. In the subscriber, InvoiceService is only one added class CustomerServiceEventHandler
using MyProject.CustomerService.Customers;
using Volo.Abp.DependencyInjection;
using Volo.Abp.EventBus.Distributed;
namespace MyProject.InvoiceService;
public class CustomerServiceEventHandler : IDistributedEventHandler<CustomerUpdatedEto>, ITransientDependency
{
public async Task HandleEventAsync(CustomerUpdatedEto eventData)
{
var customerId = eventData.Id;
}
}
Now, I have started the both services, CustomerService and the InvoiceService, and the RabbitMQ queues are listed by using the RabbitMQ CLI:
$ docker exec -it rabbitmq rabbitmqctl list_queues
Timeout: 60.0 seconds ...
Listing queues for vhost / ...
name messages
AbpBackgroundJobsDelayed.Volo.Abp.Emailing.BackgroundEmailSendingJobArgs 0
MyProject_AuthServer 0
MyProject_IdentityService 0
MyProject_CustomerService 0
AbpBackgroundJobs.Volo.Abp.Emailing.BackgroundEmailSendingJobArgs 0
MyProject_InvoiceService 0
So the queues seems to be registered. However, I can't see that any message is published, nor received at the subscribe. Notice that the receiver has a binding to the ETO class MyProject.CustomerService.Customers.CustomerUpdated.
$ docker exec -it rabbitmq rabbitmqctl list_bindings | grep MyProject_CustomerService
exchange MyProject_CustomerService queue MyProject_CustomerService []
MyProject exchange MyProject_CustomerService queue Volo.Abp.Localization.LanguageChangedEto []
MyProject exchange MyProject_CustomerService queue Volo.Payment.RecurringPaymentUpdated []
MyProject exchange MyProject_CustomerService queue Volo.Payment.SubscriptionCanceled []
MyProject exchange MyProject_CustomerService queue Volo.Payment.SubscriptionCreated []
MyProject exchange MyProject_CustomerService queue abp.data.apply_database_migrations []
MyProject exchange MyProject_CustomerService queue abp.multi_tenancy.tenant.connection_string.updated []
MyProject exchange MyProject_CustomerService queue abp.multi_tenancy.tenant.created []
$ docker exec -it rabbitmq rabbitmqctl list_bindings | grep MyProject_InvoiceService
exchange MyProject_InvoiceService queue MyProject_InvoiceService []
MyProject exchange MyProject_InvoiceService queue MyProject.CustomerService.Customers.CustomerUpdated []
MyProject exchange MyProject_InvoiceService queue Volo.Abp.Localization.LanguageChangedEto []
MyProject exchange MyProject_InvoiceService queue Volo.Payment.RecurringPaymentUpdated []
MyProject exchange MyProject_InvoiceService queue Volo.Payment.SubscriptionCanceled []
MyProject exchange MyProject_InvoiceService queue Volo.Payment.SubscriptionCreated []
MyProject exchange MyProject_InvoiceService queue abp.data.apply_database_migrations []
MyProject exchange MyProject_InvoiceService queue abp.multi_tenancy.tenant.connection_string.updated []
MyProject exchange MyProject_InvoiceService queue abp.multi_tenancy.tenant.created []
How can one seed the Language Management ? I would like to include new words that is not included default. This is what is generated:
using Volo.Abp.DependencyInjection;
using Volo.Abp.LanguageManagement.Data;
using Volo.Abp.Uow;
using Volo.Abp.MultiTenancy;
namespace GeoTicket.LanguageService.Data;
public class LanguageServiceDataSeeder : ITransientDependency
{
private readonly ILogger<LanguageServiceDataSeeder> _logger;
private readonly ICurrentTenant _currentTenant;
private readonly IUnitOfWorkManager _unitOfWorkManager;
private readonly LanguageManagementDataSeeder _languageManagementDataSeeder;
public LanguageServiceDataSeeder(
ILogger<LanguageServiceDataSeeder> logger,
ICurrentTenant currentTenant,
IUnitOfWorkManager unitOfWorkManager,
LanguageManagementDataSeeder languageManagementDataSeeder)
{
_logger = logger;
_unitOfWorkManager = unitOfWorkManager;
_currentTenant = currentTenant;
_languageManagementDataSeeder = languageManagementDataSeeder;
}
public async Task SeedAsync(Guid? tenantId = null)
{
using (_currentTenant.Change(tenantId))
{
using (var uow = _unitOfWorkManager.Begin(requiresNew: true, isTransactional: true))
{
await SeedLanguagesAsync(tenantId);
await uow.CompleteAsync();
}
}
}
private async Task SeedLanguagesAsync(Guid? tenantId)
{
if (tenantId != null)
{
/* Language list is not multi-tenant */
return;
}
await _languageManagementDataSeeder.SeedAsync();
}
}
How do you edit the base UI itself? For example, how do we access the code for the login page if we want to add things to that page? Or if we want to use our own spinner in the main layout?
We want to be able to edit the existing layout as it is. If that’s the best way to do it?? Can you run some command in the ABP CLI to extract the layout from the DLLs? The layout we're using is LeptonX SideMenu.