Error occurs when enabling the dynamic user level

Error occurs when enabling the dynamic user level level. What may be causing such a problem?An unhandled exception occurred while processing the request.
NullReferenceException: Object reference not set to an instance of an object.
ASPNETMaker2023.Models.ead2024+AdvancedSecurityBase.SetupUserLevels() in AdvancedSecurityBase.cs, line 639DependencyResolutionException: An exception was thrown while invoking the constructor ‘Void .ctor()’ on type ‘AdvancedSecurity’.
Autofac.Core.Activators.Reflection.BoundConstructor.Instantiate()DependencyResolutionException: An exception was thrown while activating ASPNETMaker2023.Models.ead2024+AdvancedSecurity.
Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action next)

NullReferenceException: Object reference not set to an instance of an object.
ASPNETMaker2023.Models.ead2024+AdvancedSecurityBase.SetupUserLevels() in AdvancedSecurityBase.cs
+
            QueryBuilder qb1 = privTbl.GetQueryBuilder()
ASPNETMaker2023.Models.ead2024+AdvancedSecurityBase.SetupUserLevel() in AdvancedSecurityBase.cs
+
            SetupUserLevels().GetAwaiter().GetResult(); // Load all user levels
ASPNETMaker2023.Models.ead2024+AdvancedSecurityBase.LoadUserLevel() in AdvancedSecurityBase.cs
+
                SetupUserLevel();
ASPNETMaker2023.Models.ead2024+AdvancedSecurityBase..ctor() in AdvancedSecurityBase.cs
+
            LoadUserLevel();
ASPNETMaker2023.Models.ead2024+AdvancedSecurity..ctor() in AdvancedSecurity.cs
+
        public AdvancedSecurity() : base()
lambda_method448(Closure , object[] )
Autofac.Core.Activators.Reflection.BoundConstructor.Instantiate()

Make sure that you have generated the User Levels / User Level Permissions tables.

Thank you very much!!! I found that the permission table was just loaded without being marked to generate file. Problem solved!!!thanks