[ ] Checked the logs and have uploaded a log file and provided a link because I found something suspicious there. Please do not post the log file in the topic because very often something important is missing.
[X] Regression (a behavior that stopped working in a new release)
[X] Bug report
[ ] Performance issue
[ ] Documentation issue or request
Current behavior
Hi Sebastian!
I’m using version 4.2.0 docker with authentication via Microsoft and my users are having login issues. In the previous version 4.1.3, this error did not occur. Below the images and logs.
I do rollback to the version 4.1.3 and and the error remained.
I think it is not a login error. I see this in the logs. Seems the apps failed to load because of this:
{
"logLevel": "Error",
"action": "GrainInvoked",
"status": "Failed",
"grain": "Squidex.Domain.Apps.Entities.Apps.AppDomainObjectGrain",
"grainMethod": "System.Threading.Tasks.Task\u00601[Squidex.Infrastructure.Orleans.J\u00601[Squidex.Domain.Apps.Entities.Apps.IAppEntity]] GetStateAsync()",
"app": {
"name": "Squidex",
"version": "4.2.0.0",
"sessionId": "2d64cd0d-bdbe-4cc6-bffb-3df38a4dc6bf"
},
"web": {
"requestId": "|aa1bfa30-43d314bf59ef7f96.",
"requestPath": "/apps",
"requestMethod": "GET",
"routeValues": {
"area": "Api",
"action": "GetApps",
"controller": "Apps"
}
},
"timestamp": "2020-04-02T14:27:25Z",
"exception": {
"type": "System.ArgumentException",
"message": "Id already exists. (Parameter \u0027id\u0027)",
"stackTrace": " at Squidex.Domain.Apps.Core.Apps.AppPatterns.Add(Guid id, String name, String pattern, String message) in /src/src/Squidex.Domain.Apps.Core.Model/Apps/AppPatterns.cs:line 45\n at Squidex.Domain.Apps.Entities.Apps.State.AppState.\u003C\u003Ec.\u003CApplyEvent\u003Eb__48_13(AppPatternAdded ev, AppPatterns p) in /src/src/Squidex.Domain.Apps.Entities/Apps/State/AppState.cs:line 106\n at Squidex.Domain.Apps.Entities.Apps.State.AppState.UpdatePatterns[T](T event, Func\u00603 update) in /src/src/Squidex.Domain.Apps.Entities/Apps/State/AppState.cs:line 186\n at Squidex.Domain.Apps.Entities.Apps.State.AppState.ApplyEvent(IEvent event) in /src/src/Squidex.Domain.Apps.Entities/Apps/State/AppState.cs:line 106\n at Squidex.Domain.Apps.Entities.DomainObjectState\u00601.ApplyEvent(IEvent event, EnvelopeHeaders headers) in /src/src/Squidex.Domain.Apps.Entities/DomainObjectState.cs:line 46\n at Squidex.Domain.Apps.Entities.DomainObjectState\u00601.Apply(Envelope\u00601 event) in /src/src/Squidex.Domain.Apps.Entities/DomainObjectState.cs:line 83\n at Squidex.Infrastructure.Commands.DomainObject\u00601.OnEvent(Envelope\u00601 event) in /src/src/Squidex.Infrastructure/Commands/DomainObject.cs:line 96\n at Squidex.Infrastructure.Commands.DomainObject\u00601.ApplyEvent(Envelope\u00601 event, Boolean isLoading) in /src/src/Squidex.Infrastructure/Commands/DomainObject.cs:line 44\n at Squidex.Infrastructure.Commands.DomainObject\u00601.\u003COnSetup\u003Eb__6_0(Envelope\u00601 x) in /src/src/Squidex.Infrastructure/Commands/DomainObject.cs:line 37\n at Squidex.Infrastructure.States.Persistence\u00602.ReadEventsAsync() in /src/src/Squidex.Infrastructure/States/Persistence{TSnapshot,TKey}.cs:line 112\n at Squidex.Infrastructure.States.Persistence\u00602.ReadAsync(Int64 expectedVersion) in /src/src/Squidex.Infrastructure/States/Persistence{TSnapshot,TKey}.cs:line 83\n at Squidex.Infrastructure.Commands.DomainObject\u00601.ReadAsync() in /src/src/Squidex.Infrastructure/Commands/DomainObject.cs:line 80\n at Squidex.Infrastructure.Commands.DomainObjectBase\u00601.EnsureLoadedAsync(Boolean silent) in /src/src/Squidex.Infrastructure/Commands/DomainObjectBase.cs:line 75\n at Squidex.Domain.Apps.Entities.Apps.AppDomainObjectGrain.GetStateAsync() in /src/src/Squidex.Domain.Apps.Entities/Apps/AppDomainObjectGrain.cs:line 27\n at Squidex.Domain.Apps.Entities.Apps.OrleansCodeGenAppGrainMethodInvoker.Invoke(IAddressable grain, InvokeMethodRequest request) in /src/src/Squidex.Domain.Apps.Entities/obj/Release/netcoreapp3.1/Squidex.Domain.Apps.Entities.orleans.g.cs:line 33\n at Orleans.Runtime.GrainMethodInvoker.Invoke()\n at Squidex.Infrastructure.Orleans.StateFilter.Invoke(IIncomingGrainCallContext context) in /src/src/Squidex.Infrastructure/Orleans/StateFilter.cs:line 51\n at Orleans.Runtime.GrainMethodInvoker.Invoke()\n at Squidex.Infrastructure.Orleans.LoggingFilter.Invoke(IIncomingGrainCallContext context) in /src/src/Squidex.Infrastructure/Orleans/LoggingFilter.cs:line 46"
}
}
You could have a look to the database, I am not sure how this has happened. You can also give me a full backup of your database.
I think it is the error I have mentioned above. Do all your users have access to all apps? Perhaps you can try to identity the app that causes the issues.
I tried to reproduce it locally but I do not have the issue.
I did not understand the relationship between my site and squidex in this case. And why only a few users are getting this error (login on squidex). There are 3 users with problems, where 1 has owner access and 2 to different applications.
Would it be possible for me to remove the user to include it again?
I think it is not a login error. The first thing that happens when you open the UI is that the apps get loaded. But as you can see in your screenshot with the chrome error logs, this fails. My assumption is that one app is kind of broken, but I don’t know which it is because I cannot reproduce it with your backup. I also think that it works for the users who do not have access to this app.
Re-adding the users does not help. You can try to restart squidex, this could work. Or you try to figure out which app it is. You can make a user and then add one app at a time and reload the UI.
1- I gave to 1 user owner access in all applications and includes in the permissions of the user : squidex.admin.* .The result was the same error.
2- I removed another user from all applications and presented the same message. I hoped he could log in but without any application (would this be the correct behavior?).
PS.: My user has access to all applications, and I’m able to log in normally.