-
ABP Framework version: v9.0.x
-
Database System: EF Core (PostgreSQL)
-
Exception message and full stack trace:
-
[22:51:05 ERR] There is no such an entity. Entity type: Volo.Abp.Identity.IdentityUser, id: 3a173a2b-c7d5-efa2-a1a7-ea8c589cbbff
Volo.Abp.Domain.Entities.EntityNotFoundException: There is no such an entity. Entity type: Volo.Abp.Identity.IdentityUser, id: 3a173a2b-c7d5-efa2-a1a7-ea8c589cbbff
at Volo.Abp.Domain.Repositories.EntityFrameworkCore.EfCoreRepository3.GetAsync(TKey id, Boolean includeDetails, CancellationToken cancellationToken) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue
1.ProceedAsync()
at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func
3 proceed)
at Volo.Abp.Identity.Gdpr.IdentityGdprEventHandler.HandleEventAsync(GdprUserDataRequestedEto eventData)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync()
at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func
3 proceed)
at Volo.Abp.EventBus.EventHandlerInvoker.InvokeAsync(IEventHandler eventHandler, Object eventData, Type eventType)
at Volo.Abp.EventBus.EventBusBase.TriggerHandlerAsync(IEventHandlerFactory asyncHandlerFactory, Type eventType, Object eventData, List1 exceptions, InboxConfig inboxConfig) at System.AbpExceptionExtensions.ReThrow(Exception exception) at Volo.Abp.EventBus.EventBusBase.ThrowOriginalExceptions(Type eventType, List
1 exceptions)
at Volo.Abp.EventBus.EventBusBase.TriggerHandlersAsync(Type eventType, Object eventData)
at Volo.Abp.EventBus.Distributed.DistributedEventBusBase.TriggerHandlersDirectAsync(Type eventType, Object eventData)
at Volo.Abp.EventBus.RabbitMq.RabbitMqDistributedEventBus.ProcessEventAsync(IModel channel, BasicDeliverEventArgs ea)
at Volo.Abp.RabbitMQ.RabbitMqMessageConsumer.HandleIncomingMessageAsync(Object sender, BasicDeliverEventArgs basicDeliverEventArgs)
Hello i have these users in my database.
whenever i click prepare button for gdpr it throws an error on the background. It couldn't find the user in the database and since rabbitmq is the distributed message handler it always retries again and again. So it is full of errors repeating again maybe in the modules that participates for the event it is better to use try catch instead of throwing error. Is it possible to change that? and why the identity module can not find the id that's kind of weird. is it a bug?
17 Answer(s)
-
0
Hi, can you confirm that the relevant users have not been soft-deleted?
-
0
nope it is not.
-
0
This is really weird as you said. I'll ask our QA Team to test with Postgresql.
-
0
Reopenning the question again (it was closed by our support bot). Our QA team tested with PostgreSQL but we could not reproduce the problem.
Can you provide more information to us for reproducing the problem? Unfortunately, currently, we are unable to reproduce your problem.
Regards.
-
0
Ok I will try to do it on an empty template I couldn’t find the time yet can you give little bit more time and keep this open.
-
0
Ok I will try to do it on an empty template I couldn’t find the time yet can you give little bit more time and keep this open.
Sure, I'll reopen the question if our support bot closes it automatically. I'll keep the question open.
-
0
Hello Engincan,
I managed to produce the problem from a new empty template, i can send you the project if you want also. i will try to give the instructions step by step.-
First create a new project with this command
abp new Acme.BookStore -u angular --tiered -dbms PostgreSQL -csf --version 9.0.2
it doesn't have to be postgresql but i tried with this that's why.
2) Then change the connection strings and migrate database.
3) Add this to appsettings.json of HttpApi.Host project"RabbitMQ": { "Connections": { "Default": { "HostName": "localhost", "Port": "5672" } }, "EventBus": { "ClientName": "BookStore", "ExchangeName": "BookStore" } }
-
Add this to appsettings.json to AuthServer project
"RabbitMQ": { "Connections": { "Default": { "HostName": "localhost", "Port": "5672" } }, "EventBus": { "ClientName": "AuthServer", "ExchangeName": "BookStore" } },
-
Configure both projects (AuthServer and HttpApi.Host) to use Distributed Event Bus with RabbitMq.
run both projects.
-
Create a tenant and impersonate with that tenant. Then try to request gdpr data with that user.
now you should see the error in your console.
ps: you should use the package
<PackageReference Include="Volo.Abp.EventBus.RabbitMQ" Version="9.1.0" />
-
-
0
Hi @cangunaydin, thanks for the detailed step-by-step explanation. I'll try it and write you back asap.
-
0
Hello EngincanV,
Is there any progress on this one? I think the bot closed the thread again. -
0
Hello EngincanV,
Is there any progress on this one? I think the bot closed the thread again.Hi, sorry for the late response. Indeed the support bot closed this thread multiple times.
Both I and our QA team tried to reproduce the problem with your exact steps, but unfortunately, we are unable to reproduce it.
So, if you can share your solution via email (to support@abp.io with the ticket number), then our QA team can test it using your own solution. Please let me know if you can share your solution or not.
-
0
Hello EngincanV,
It is little weird that it does not behave the same. I use docker images for rabbitmq, postgresql and redis cache.
I have shared the solution and sent an email with the link so that you can download the sample project. -
0
Hello EngincanV,
It is little weird that it does not behave the same. I use docker images for rabbitmq, postgresql and redis cache.
I have shared the solution and sent an email with the link so that you can download the sample project.Thanks, I got your email and will check your solution asap.
-
0
Hello EngincanV,
It is little weird that it does not behave the same. I use docker images for rabbitmq, postgresql and redis cache.
I have shared the solution and sent an email with the link so that you can download the sample project.Hi, do you get the
BrokerUnreachableException
exception in the background? Is there any log related to that?Because I was only able to reproduce the problem after making the RabbitMQ server unreachable by stopping the RabbitMQ container. Otherwise, it's working as expected:
-
0
Hello Engincan,
It is weird that it does not throw an error for you. From the image i have seen you do not impersonate yourself as one of the tenants admin user.
Did you try with the impersonation? I believe error is related with unitofwork. According to error it can not find the entity, i believe it is related with tenantid is null while you are trying to get the value. But of course i am not so sure.
I am getting the error when the docker image is running.
I was thinking if it is sth related with my environment. I deleted also the volume of rabbitmq with the image and spin it up again, it is behaving the same.
I am trying this on my mac, i can try it on windows machine and let you know but i don't think it is going to change.
Can you confirm that you tested and requested the gdpr data with an impersonation with one of tenant's users? -
0
Did you try with the impersonation? I believe error is related with unitofwork. According to error it can not find the entity, i believe it is related with tenantid is null while you are trying to get the value. But of course i am not so sure.
Yes, I’ve tested that. I tried both with an admin user and a newly created user, as well as by creating a new tenant and using tenant impersonation. All attempts resulted in the same outcome — I couldn’t reproduce the issue.
Then, I stopped the RabbitMQ container and clicked the prepare data button again. This time, an exception was thrown, but it wasn’t a NotFoundException. Instead, it was a
BrokerUnreachableException
, indicating a failure to connect to RabbitMQ.I was thinking if it is sth related with my environment. I deleted also the volume of rabbitmq with the image and spin it up again, it is behaving the same.
This does seem environment-specific, since both I and our QA team tested it in different environments and were unable to reproduce the issue.
Can you confirm that you tested and requested the gdpr data with an impersonation with one of tenant's users?
Yes, I confirmed this as well — I tested the GDPR data request using tenant impersonation with a tenant user, and still couldn’t reproduce the issue.
If possible, could you try it in a fresh environment or check if your colleagues are experiencing the same issue?
-
0
Hello ok,
I will try it on a different environment. But what can be different on different environment it does not make sense. So weird i will let you know when i try it. -
0
Hello ok,
I will try it on a different environment. But what can be different on different environment it does not make sense. So weird i will let you know when i try it.Thanks, waiting for your response.