System.ArgumentNullException: Value cannot be null when changing security to production

1
When i change security to production this error comes up. Any ideas how to solve this?: System.AggregateException: One or more errors occurred. (Value cannot be null. (Parameter 'context'))  ---> System.ArgumentNullException: Value cannot be null. (Parameter 'context')    at Mendix.Modeler.Common.IdentifierUtil.Resolve[T](IIdentifier`1 identifier, IHasContext context) in Mendix.Modeler.Core\Common\Usages\IdentifierUtil.cs:line 17    at Mendix.Modeler.WebUI.Export.Security.AccessChecker.CheckEntityPath(EntityPath entityPath, IEntity enclosingEntity, IUserRole userRole) in Mendix.Modeler.WebUI.Export\Security\AccessChecker.cs:line 22    at Mendix.Modeler.WebUI.Export.Security.SecurityCheckVisitor.Process(IDocumentObject obj, Trace trace) in Mendix.Modeler.WebUI.Export\Security\SecurityCheckVisitor.cs:line 0    at Mendix.Common.Util.EnumerableUtil.ForEach[T](IEnumerable`1 source, Action`1 action) in Mendix.Common\Util\EnumerableUtil.cs:line 51    at Mendix.Modeler.WebUI.Export.Visitors.ProjectVisitor.Process(IDocumentObject obj, Trace trace) in Mendix.Modeler.WebUI.Export\Visitors\ProjectVisitor.cs:line 0    at Mendix.Modeler.WebUI.Export.Security.SecurityCheckVisitor.Process(IDocumentObject obj, Trace trace) in Mendix.Modeler.WebUI.Export\Security\SecurityCheckVisitor.cs:line 109    at Mendix.Common.Util.EnumerableUtil.ForEach[T](IEnumerable`1 source, Action`1 action) in Mendix.Common\Util\EnumerableUtil.cs:line 51    at Mendix.Modeler.WebUI.Export.Visitors.ProjectVisitor.Process(IDocumentObject obj, Trace trace) in Mendix.Modeler.WebUI.Export\Visitors\ProjectVisitor.cs:line 0    at Mendix.Modeler.WebUI.Export.Security.SecurityCheckVisitor.Process(IDocumentObject obj, Trace trace) in Mendix.Modeler.WebUI.Export\Security\SecurityCheckVisitor.cs:line 109    at Mendix.Common.Util.EnumerableUtil.ForEach[T](IEnumerable`1 source, Action`1 action) in Mendix.Common\Util\EnumerableUtil.cs:line 51    at Mendix.Modeler.WebUI.Export.Visitors.ProjectVisitor.Process(IDocumentObject obj, Trace trace) in Mendix.Modeler.WebUI.Export\Visitors\ProjectVisitor.cs:line 0    at Mendix.Modeler.WebUI.Export.Security.SecurityCheckVisitor.Process(IDocumentObject obj, Trace trace) in Mendix.Modeler.WebUI.Export\Security\SecurityCheckVisitor.cs:line 109    at Mendix.Common.Util.EnumerableUtil.ForEach[T](IEnumerable`1 source, Action`1 action) in Mendix.Common\Util\EnumerableUtil.cs:line 51    at Mendix.Modeler.WebUI.Export.Visitors.ProjectVisitor.Process(IDocumentObject obj, Trace trace) in Mendix.Modeler.WebUI.Export\Visitors\ProjectVisitor.cs:line 0    at Mendix.Modeler.WebUI.Export.Security.SecurityCheckVisitor.Process(IDocumentObject obj, Trace trace) in Mendix.Modeler.WebUI.Export\Security\SecurityCheckVisitor.cs:line 109    at Mendix.Common.Util.EnumerableUtil.ForEach[T](IEnumerable`1 source, Action`1 action) in Mendix.Common\Util\EnumerableUtil.cs:line 51    at Mendix.Modeler.WebUI.Export.Visitors.ProjectVisitor.Process(IDocumentObject obj, Trace trace) in Mendix.Modeler.WebUI.Export\Visitors\ProjectVisitor.cs:line 0    at Mendix.Modeler.WebUI.Export.Security.SecurityCheckVisitor.Process(IDocumentObject obj, Trace trace) in Mendix.Modeler.WebUI.Export\Security\SecurityCheckVisitor.cs:line 109    at Mendix.Modeler.WebUI.Export.Security.SecurityCheckVisitor.Process(IDocumentObject obj, Trace trace) in Mendix.Modeler.WebUI.Export\Security\SecurityCheckVisitor.cs:line 75    at Mendix.Common.Util.EnumerableUtil.ForEach[T](IEnumerable`1 source, Action`1 action) in Mendix.Common\Util\EnumerableUtil.cs:line 51    at Mendix.Modeler.WebUI.Export.Visitors.ProjectVisitor.Process(IDocumentObject obj, Trace trace) in Mendix.Modeler.WebUI.Export\Visitors\ProjectVisitor.cs:line 0    at Mendix.Modeler.WebUI.Export.Security.SecurityCheckVisitor.Process(IDocumentObject obj, Trace trace) in Mendix.Modeler.WebUI.Export\Security\SecurityCheckVisitor.cs:line 109    at Mendix.Common.Util.EnumerableUtil.ForEach[T](IEnumerable`1 source, Action`1 action) in Mendix.Common\Util\EnumerableUtil.cs:line 51    at Mendix.Modeler.WebUI.Export.Visitors.ProjectVisitor.Process(IDocumentObject obj, Trace trace) in Mendix.Modeler.WebUI.Export\Visitors\ProjectVisitor.cs:line 0    at Mendix.Modeler.WebUI.Export.Security.SecurityCheckVisitor.Process(IDocumentObject obj, Trace trace) in Mendix.Modeler.WebUI.Export\Security\SecurityCheckVisitor.cs:line 109    at Mendix.Common.Util.EnumerableUtil.ForEach[T](IEnumerable`1 source, Action`1 action) in Mendix.Common\Util\EnumerableUtil.cs:line 51    at Mendix.Modeler.WebUI.Export.Visitors.ProjectVisitor.Process(IDocumentObject obj, Trace trace) in Mendix.Modeler.WebUI.Export\Visitors\ProjectVisitor.cs:line 0    at Mendix.Modeler.WebUI.Export.Security.SecurityCheckVisitor.Process(IDocumentObject obj, Trace trace) in Mendix.Modeler.WebUI.Export\Security\SecurityCheckVisitor.cs:line 109    at Mendix.Common.Util.EnumerableUtil.ForEach[T](IEnumerable`1 source, Action`1 action) in Mendix.Common\Util\EnumerableUtil.cs:line 51    at Mendix.Modeler.WebUI.Export.Visitors.ProjectVisitor.Process(IDocumentObject obj, Trace trace) in Mendix.Modeler.WebUI.Export\Visitors\ProjectVisitor.cs:line 0    at Mendix.Modeler.WebUI.Export.Security.SecurityCheckVisitor.Process(IDocumentObject obj, Trace trace) in Mendix.Modeler.WebUI.Export\Security\SecurityCheckVisitor.cs:line 109    at Mendix.Modeler.WebUI.Export.Security.SecurityCheckVisitor.Process(IDocumentObject obj, Trace trace) in Mendix.Modeler.WebUI.Export\Security\SecurityCheckVisitor.cs:line 0    at Mendix.Common.Util.EnumerableUtil.ForEach[T](IEnumerable`1 source, Action`1 action) in Mendix.Common\Util\EnumerableUtil.cs:line 51    at Mendix.Modeler.WebUI.Export.Visitors.ProjectVisitor.Process(IDocumentObject obj, Trace trace) in Mendix.Modeler.WebUI.Export\Visitors\ProjectVisitor.cs:line 0    at Mendix.Modeler.WebUI.Export.Security.SecurityCheckVisitor.Process(IDocumentObject obj, Trace trace) in Mendix.Modeler.WebUI.Export\Security\SecurityCheckVisitor.cs:line 109    at Mendix.Modeler.WebUI.Export.Visitors.ObjectVisitor.Visit(IDocumentObject startingPoint, Trace initialTrace) in Mendix.Modeler.WebUI.Export\Visitors\ObjectVisitor.cs:line 34    at Mendix.Modeler.WebUI.Export.Security.SecurityCheck.<>c__DisplayClass2_0.<Check>b__2(NavigationProfileBase p) in Mendix.Modeler.WebUI.Export\Security\SecurityCheck.cs:line 38    at Mendix.Common.Util.EnumerableUtil.ForEach[T](IEnumerable`1 source, Action`1 action) in Mendix.Common\Util\EnumerableUtil.cs:line 51    at Mendix.Modeler.WebUI.Export.Security.SecurityCheck.Check(IProject project, ProjectChanges changes, IProblems problems, CancellationToken cancellationToken) in Mendix.Modeler.WebUI.Export\Security\SecurityCheck.cs:line 34    at Mendix.Modeler.Projects.Checks.ProjectChecker.<>c__DisplayClass6_0.<RunProjectChecks>b__1(ProjectChanges changes) in Mendix.Modeler.Core\Projects\Checks\ProjectChecker.cs:line 61    at Mendix.Modeler.Projects.Changes.ChangedDocumentTracker.TryProcessChangesSync(Action`1 changeProcessor) in Mendix.Modeler.Core\Projects\Changes\ChangedDocumentTracker.cs:line 35    at Mendix.Modeler.Projects.Checks.ProjectChecker.<>c__DisplayClass6_0.<RunProjectChecks>b__0() in Mendix.Modeler.Core\Projects\Checks\ProjectChecker.cs:line 70    at Mendix.Modeler.Common.ResolveCache.<>c__DisplayClass10_0.<WithCache>b__0() in Mendix.Modeler.Core\Common\Problems\ResolveCache.cs:line 46    at Mendix.Modeler.Common.ResolveCache.WithCache[T](IProject project, Func`1 action) in Mendix.Modeler.Core\Common\Problems\ResolveCache.cs:line 73    at Mendix.Modeler.Common.ResolveCache.WithCache(IProject project, Action action) in Mendix.Modeler.Core\Common\Problems\ResolveCache.cs:line 48    at Mendix.Modeler.Projects.Checks.ProjectChecker.RunProjectChecks(IProject project, CancellationToken cancellationToken) in Mendix.Modeler.Core\Projects\Checks\ProjectChecker.cs:line 72    at Mendix.Modeler.ProtectedModules.ProtectedModulesUnlocker.ExecuteInContext[T](Boolean unlockImplementation, Func`1 code) in Mendix.Modeler.Core\ProtectedModules\ProtectedModulesUnlocker.cs:line 48    at Mendix.Modeler.Projects.Checks.ProjectChecker.Check(IProject project, CancellationToken cancellationToken) in Mendix.Modeler.Core\Projects\Checks\ProjectChecker.cs:line 43    at Mendix.Modeler.Core.View.Problems.BackgroundCheckRunner.Check(IProject project, CancellationToken cancellationToken) in Mendix.Modeler.Core.View.CrossPlatform\Problems\BackgroundCheckRunner.cs:line 41    at Mendix.Modeler.Core.View.Problems.BackgroundCheckRunner.Check(IProject project, CancellationToken cancellationToken) in Mendix.Modeler.Core.View.CrossPlatform\Problems\BackgroundCheckRunner.cs:line 50    --- End of inner exception stack trace ---
asked
2 answers
0

I have the same Bug, I deleted the “User” Role in my module, because I only wanted specific roles, but I’m not sure if this is related.

answered
0

This is unfortunately a bug in combination with security, caused by the support for source variables on various data source types that was added starting with Mx10, a fix is coming in 10.2.0. But probably somewhere in the app there’s a page having a data widget using an association data source from a page or snippet parameter, wrapping it inside a data view should be a work around.

answered