I have…
- [x] 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.
I’m submitting a…
- [ ] Regression (a behaviour that stopped working in a new release)
- [x] Bug report
- [ ] Performance issue
- [ ] Documentation issue or request
Current behaviour
Tried setting up a new docker instance, using Google OAuth.
Initial run is working fine and able to login and logout.
After restarting an running instance or restarting with an updated docker images, getting below error (Pasted at the end).
Expected behaviour
Instance should work fine with restart and updated images.
Minimal reproduction of the problem
Setup a new docker instance with Google Auth (haven’t tested with other authentication options), create a login with a gmail and restart instance.
Environment
- [x] Self hosted with docker
- [ ] Self hosted with IIS
- [ ] Self hosted with other version
- [ ] Cloud version
Version: 5.3 (Faced same with other 5.x)
Browser:
- [x] Chrome (desktop)
- [ ] Chrome (Android)
- [ ] Chrome (iOS)
- [ ] Firefox
- [ ] Safari (desktop)
- [ ] Safari (iOS)
- [ ] IE
- [ ] Edge
Others:
Below a sample error message, trimmed log file uploaded in OneDrive
Unhandled exception. System.FormatException: An error occurred while deserializing the Logins property of class Squidex.Domain.Users.MongoDb.MongoUser: Element 'Principal' does not match any field or property of class Microsoft.AspNetCore.Identity.UserLoginInfo.
---> System.FormatException: Element 'Principal' does not match any field or property of class Microsoft.AspNetCore.Identity.UserLoginInfo.
at MongoDB.Bson.Serialization.BsonClassMapSerializer`1.DeserializeClass(BsonDeserializationContext context)
at MongoDB.Bson.Serialization.BsonClassMapSerializer`1.Deserialize(BsonDeserializationContext context, BsonDeserializationArgs args)
at MongoDB.Bson.Serialization.IBsonSerializerExtensions.Deserialize[TValue](IBsonSerializer`1 serializer, BsonDeserializationContext context)
at MongoDB.Bson.Serialization.Serializers.EnumerableSerializerBase`2.Deserialize(BsonDeserializationContext context, BsonDeserializationArgs args)
at MongoDB.Bson.Serialization.Serializers.SerializerBase`1.MongoDB.Bson.Serialization.IBsonSerializer.Deserialize(BsonDeserializationContext context, BsonDeserializationArgs args)
at MongoDB.Bson.Serialization.IBsonSerializerExtensions.Deserialize(IBsonSerializer serializer, BsonDeserializationContext context)
at MongoDB.Bson.Serialization.BsonClassMapSerializer`1.DeserializeMemberValue(BsonDeserializationContext context, BsonMemberMap memberMap)
--- End of inner exception stack trace ---
at MongoDB.Driver.Linq.MongoQueryProviderImpl`1.Execute(Expression expression)
at MongoDB.Driver.Linq.MongoQueryProviderImpl`1.Execute[TResult](Expression expression)
at System.Linq.Queryable.Any[TSource](IQueryable`1 source)
at Squidex.Areas.IdentityServer.Config.CreateAdminHost.IsEmpty(UserManager`1 userManager) in /src/src/Squidex/Areas/IdentityServer/Config/CreateAdminHost.cs:line 102
at Squidex.Areas.IdentityServer.Config.CreateAdminHost.StartAsync(ISemanticLog log, CancellationToken ct) in /src/src/Squidex/Areas/IdentityServer/Config/CreateAdminHost.cs:line 53
at Squidex.Config.Startup.SafeHostedService.StartAsync(CancellationToken cancellationToken) in /src/src/Squidex/Config/Startup/SafeHostedService.cs:line 29
at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
at Squidex.Program.Main(String[] args) in /src/src/Squidex/Program.cs:line 24
Guessing to solve this problem might need to add ignore extra elements in MongoUserStore, Still exploring it. Will update request if I find any more information.
map.SetIgnoreExtraElements(true);