Mendix chat app runtime error

0
Hi, I am working on a chat app refering the webinar using mendix version 9.7.0, there are no errors showing, but after running it shows the following error. Please help.       System.AggregateException: One or more errors occurred. ---> System.Exception: Sorting cannot have a reference to another entity    at Mendix.Modeler.WebUI.Export.Nanoflows.NanoflowInstructionWriter.<>c__DisplayClass16_0.<WriteSort>b__0(SortItem item) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Modeler.WebUI.Export\Nanoflows\NanoflowInstructionWriter.cs:line 215    at Mendix.Common.Util.EnumerableUtil.ForEach[T](IEnumerable`1 source, Action`1 action) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Common\Util\EnumerableUtil.cs:line 50    at Mendix.Modeler.WebUI.Export.Nanoflows.NanoflowInstructionWriter.WriteSort(String resultVariable, String sourceVariable, SortItemList sortItemList, JsonWriter writer, Nullable`1 label) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Modeler.WebUI.Export\Nanoflows\NanoflowInstructionWriter.cs:line 220    at Mendix.Modeler.WebUI.Export.Nanoflows.NanoflowWriter.HandleActionActivity(JsonWriter writer, INanoflowExportContext context, ActionActivity actionActivity, IEnumerator`1 labels) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Modeler.WebUI.Export\Nanoflows\NanoflowWriter.cs:line 250    at Mendix.Modeler.WebUI.Export.Nanoflows.NanoflowWriter.WriteNanoflow(MicroflowObject startingPoint, JsonWriter writer, INanoflowExportContext context) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Modeler.WebUI.Export\Nanoflows\NanoflowWriter.cs:line 124    at Mendix.Modeler.WebUI.Forms.NanoflowSettings.NanoflowSettingsUtil.WriteNanoflow(Nanoflow nanoflow, JsonWriter writer, INanoflowExportContext context) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Modeler.WebUI\Forms\NanoflowSettings\NanoflowSettingsUtil.cs:line 96    at Mendix.Modeler.Common.ResolveCache.TrackResolves(Action code) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Modeler.Core\Common\Problems\ResolveCache.cs:line 91    at Mendix.Modeler.WebUI.Deployment.Native.NativeNanoflowWriter.Write(Nanoflow nanoflow, TextWriter writer) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Modeler.WebUI\Deployment\Native\NativeNanoflowWriter.cs:line 26    at Mendix.Modeler.Common.ResolveCache.TrackResolves(Action code) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Modeler.Core\Common\Problems\ResolveCache.cs:line 91    at Mendix.Modeler.WebUI.Export.Native.NativeAppExporter.WriteNanoflow(IProject project, Nanoflow nanoflow) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Modeler.WebUI.Export\Native\NativeAppExporter.cs:line 124    at Mendix.Modeler.Projects.Changes.ChangedDocumentsProcessor`1.<>c__DisplayClass5_0.<ProcessChangedDocuments>g__DoProcess|5(IDocument document) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Modeler.Core\Projects\Changes\ChangedDocumentsProcessor.cs:line 70    at System.Linq.Parallel.ForAllOperator`1.ForAllEnumerator`1.MoveNext(TInput& currentElement, Int32& currentKey)    at System.Linq.Parallel.ForAllSpoolingTask`2.SpoolingWork()    at System.Linq.Parallel.SpoolingTaskBase.Work()    at System.Linq.Parallel.QueryTask.BaseWork(Object unused)    at System.Threading.Tasks.Task.Execute()    --- End of inner exception stack trace ---    at System.Linq.Parallel.QueryTaskGroupState.QueryEnd(Boolean userInitiatedDispose)    at System.Linq.Parallel.DefaultMergeHelper`2.System.Linq.Parallel.IMergeHelper<TInputOutput>.Execute()    at System.Linq.Parallel.MergeExecutor`1.Execute[TKey](PartitionedStream`2 partitions, Boolean ignoreOutput, ParallelMergeOptions options, TaskScheduler taskScheduler, Boolean isOrdered, CancellationState cancellationState, Int32 queryId)    at System.Linq.Parallel.PartitionedStreamMerger`1.Receive[TKey](PartitionedStream`2 partitionedStream)    at System.Linq.Parallel.ForAllOperator`1.WrapPartitionedStream[TKey](PartitionedStream`2 inputStream, IPartitionedStreamRecipient`1 recipient, Boolean preferStriping, QuerySettings settings)    at System.Linq.Parallel.UnaryQueryOperator`2.UnaryQueryOperatorResults.ChildResultsRecipient.Receive[TKey](PartitionedStream`2 inputStream)    at System.Linq.Parallel.ScanQueryOperator`1.ScanEnumerableQueryOperatorResults.GivePartitionedStream(IPartitionedStreamRecipient`1 recipient)    at System.Linq.Parallel.UnaryQueryOperator`2.UnaryQueryOperatorResults.GivePartitionedStream(IPartitionedStreamRecipient`1 recipient)    at System.Linq.Parallel.QueryOperator`1.GetOpenedEnumerator(Nullable`1 mergeOptions, Boolean suppressOrder, Boolean forEffect, QuerySettings querySettings)    at System.Linq.Parallel.ForAllOperator`1.RunSynchronously()    at Mendix.Modeler.Projects.Changes.ChangedDocumentsProcessor`1.ProcessChangedDocuments(IProject project, ProjectChanges projectChanges, Func`2 processDocument) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Modeler.Core\Projects\Changes\ChangedDocumentsProcessor.cs:line 62    at Mendix.Modeler.WebUI.Export.Native.NativeAppExporter.Export(IProject project, Boolean updateRunningProject) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Modeler.WebUI.Export\Native\NativeAppExporter.cs:line 71    at Mendix.Modeler.WebUI.Deployment.Native.NativeDeploymentWorker.ExportNativeApp(IProject project, IProgressInfo info, DeploymentSettings settings) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Modeler.WebUI\Deployment\Native\NativeDeploymentWorker.cs:line 176    at Mendix.Modeler.Deployment.DeploymentProcessBuilder.<>c__DisplayClass13_0.<AddBuildStepsForPhase>b__0(IProgressInfo info) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Modeler.Core\Deployment\DeploymentProcessBuilder.cs:line 135    at Mendix.Modeler.Deployment.FileIOExceptionHandlingProcess.CatchDiskException(Action action) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Modeler.Core\Deployment\FileIOExceptionHandlingProcess.cs:line 28    at Mendix.Modeler.Deployment.FileIOExceptionHandlingProcess.<>c__DisplayClass1_0.<AddStep>b__0(IProgressInfo info) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Modeler.Core\Deployment\FileIOExceptionHandlingProcess.cs:line 19    at Mendix.Modeler.UIFramework.Progress.ProcessRunner.RunStep(Step step) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Modeler.UIFramework\Progress\ProcessRunner.cs:line 101    at Mendix.Modeler.UIFramework.Progress.ProcessRunner.OnDoWork(Object sender, DoWorkEventArgs e) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Modeler.UIFramework\Progress\ProcessRunner.cs:line 74    at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)    at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument) ---> (Inner Exception #0) System.Exception: Sorting cannot have a reference to another entity    at Mendix.Modeler.WebUI.Export.Nanoflows.NanoflowInstructionWriter.<>c__DisplayClass16_0.<WriteSort>b__0(SortItem item) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Modeler.WebUI.Export\Nanoflows\NanoflowInstructionWriter.cs:line 215    at Mendix.Common.Util.EnumerableUtil.ForEach[T](IEnumerable`1 source, Action`1 action) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Common\Util\EnumerableUtil.cs:line 50    at Mendix.Modeler.WebUI.Export.Nanoflows.NanoflowInstructionWriter.WriteSort(String resultVariable, String sourceVariable, SortItemList sortItemList, JsonWriter writer, Nullable`1 label) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Modeler.WebUI.Export\Nanoflows\NanoflowInstructionWriter.cs:line 220    at Mendix.Modeler.WebUI.Export.Nanoflows.NanoflowWriter.HandleActionActivity(JsonWriter writer, INanoflowExportContext context, ActionActivity actionActivity, IEnumerator`1 labels) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Modeler.WebUI.Export\Nanoflows\NanoflowWriter.cs:line 250    at Mendix.Modeler.WebUI.Export.Nanoflows.NanoflowWriter.WriteNanoflow(MicroflowObject startingPoint, JsonWriter writer, INanoflowExportContext context) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Modeler.WebUI.Export\Nanoflows\NanoflowWriter.cs:line 124    at Mendix.Modeler.WebUI.Forms.NanoflowSettings.NanoflowSettingsUtil.WriteNanoflow(Nanoflow nanoflow, JsonWriter writer, INanoflowExportContext context) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Modeler.WebUI\Forms\NanoflowSettings\NanoflowSettingsUtil.cs:line 96    at Mendix.Modeler.Common.ResolveCache.TrackResolves(Action code) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Modeler.Core\Common\Problems\ResolveCache.cs:line 91    at Mendix.Modeler.WebUI.Deployment.Native.NativeNanoflowWriter.Write(Nanoflow nanoflow, TextWriter writer) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Modeler.WebUI\Deployment\Native\NativeNanoflowWriter.cs:line 26    at Mendix.Modeler.Common.ResolveCache.TrackResolves(Action code) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Modeler.Core\Common\Problems\ResolveCache.cs:line 91    at Mendix.Modeler.WebUI.Export.Native.NativeAppExporter.WriteNanoflow(IProject project, Nanoflow nanoflow) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Modeler.WebUI.Export\Native\NativeAppExporter.cs:line 124    at Mendix.Modeler.Projects.Changes.ChangedDocumentsProcessor`1.<>c__DisplayClass5_0.<ProcessChangedDocuments>g__DoProcess|5(IDocument document) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Modeler.Core\Projects\Changes\ChangedDocumentsProcessor.cs:line 70    at System.Linq.Parallel.ForAllOperator`1.ForAllEnumerator`1.MoveNext(TInput& currentElement, Int32& currentKey)    at System.Linq.Parallel.ForAllSpoolingTask`2.SpoolingWork()    at System.Linq.Parallel.SpoolingTaskBase.Work()    at System.Linq.Parallel.QueryTask.BaseWork(Object unused)    at System.Threading.Tasks.Task.Execute()<---  
asked
1 answers
1

Hello, i found the problem.

You have to delete the last sort of the nanoflow “DS_GetAllChats”:

I think the problem is because we are taking the list by association but i don´t know really.

If you take out that sort the server will run ok but the list of chats will be in disorder.

 

answered