Synchronization error of Interviewer and data loss

Dear all, we are collecting information nationally with the “Interviewer” and we have been facing an “attached exception” error in many devices (literal translation from Spanish). Could you guide us regarding the source of the error and how to solve it? since it has led to data loss.

Looking forward to your comments

Regards, Felipe J

One or more handlers failed when publishing 94 events. First event source id: b0b14ef8a51044ffbf29a6a0144a8615. (EventHandlerException: Exception has been thrown by the target of an invocation.) at WB.Core.Infrastructure.Implementation.EventDispatcher.NcqrCompatibleEventDispatcher.Publish(IEnumerable1 eventMessages) at WB.Core.Infrastructure.CommandBus.Implementation.CommandExecutor.ExecuteEventSourcedCommand(ICommand command, String origin, Type aggregateType, Guid aggregateId, IEnumerable1 validators, IEnumerable1 preProcessors, IEnumerable1 postProcessors, Action2 commandHandler, CancellationToken cancellationToken) at WB.Core.Infrastructure.CommandBus.Implementation.CommandExecutor.ExecuteCommand(ICommand command, String origin, CancellationToken cancellationToken, Guid aggregateId) at WB.Core.Infrastructure.CommandBus.Implementation.CommandService.<>c__DisplayClass14_0.b__1(ICommandExecutor ce) at WB.Core.BoundedContexts.Headquarters.Implementation.UnitOfWorkInScopeExecutor.Execute(Action1 action, String workspace)
at WB.Core.GenericSubdomains.Portable.NamedLocker.RunWithLock(String name, Action body)
at WB.Core.Infrastructure.CommandBus.Implementation.CommandService.ExecuteImpl(ICommand command, String origin, CancellationToken cancellationToken)
at WB.Core.Infrastructure.CommandBus.Implementation.CommandService.Execute(ICommand command, String origin)
at WB.Core.BoundedContexts.Headquarters.Implementation.Synchronization.InterviewPackagesService.<>c__DisplayClass22_0.b__0(IServiceLocator serviceLocator)
at WB.Core.BoundedContexts.Headquarters.Implementation.UnitOfWorkInScopeExecutor.Execute(Action1 action, String workspace) at WB.Core.BoundedContexts.Headquarters.Implementation.Synchronization.InterviewPackagesService.ProcessPackage(InterviewPackage interview) EventHandlerException: Exception has been thrown by the target of an invocation. Exception has been thrown by the target of an invocation. at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at WB.Core.Infrastructure.EventHandlers.AbstractCompositeFunctionalEventHandler2.ApplyEventOnEntity(IPublishableEvent evt, TEntity currentState)
at WB.Core.Infrastructure.EventHandlers.AbstractFunctionalEventHandler2.Handle(IPublishableEvent evt, IReadSideStorage1 storage)
at WB.Core.Infrastructure.EventHandlers.AbstractFunctionalEventHandler2.Handle(IEnumerable1 publishableEvents)
at WB.Core.Infrastructure.Implementation.EventDispatcher.NcqrCompatibleEventDispatcher.Publish(IEnumerable1 eventMessages) Object reference not set to an instance of an object. at WB.Core.BoundedContexts.Headquarters.EventHandler.InterviewDynamicReportAnswersDenormalizer.Update(InterviewSummary state, IPublishedEvent1 event)

Hello Felipe,

sorry to hear about the trouble.

WB.Core.BoundedContexts.Headquarters.Implementation.Synchronization.InterviewPackagesService

^^ is evidence that the error occurred during the data being processed by the server. This is not yet data loss, as the data has arrived to the server and is there, but the HQ component is experiencing troubles ‘unwrapping the package’ and inserting it into the data stored on the server. Whether that will lead to an actual data loss, or this is repairable is unknown to me.

The log, I believe, is a fragment that is missing e.g. the Inner Exception details, such as those mentioned in

and possibly other lines, which could be of relevance.

Could you please review the error log and retain more information than the shown portion?

Best, Sergiy

Dear, Attached we could collect more information from the log files on the device used by interviewer 21.06, as a major antecedent the interview returns to the started state

[Error][Failed to synchronize interview]WB.Core.SharedKernels.Enumerator.Implementation.Services.SynchronizationException: Error del servidor. Por favor, Comuníquese con el administrador de su servidor. —> WB.Core.Infrastructure.HttpServices.HttpClient.RestException: Internal Server Error —> WB.Core.Infrastructure.HttpServices.HttpClient.ExtendedMessageHandlerException: Request POST https://xxx.cl/xxx/api/interviewer/v3/interviews/b4cdf14e-2978-477c-9125-9fe293cb6cba failed with status code 500 (Internal Server Error).
at WB.Core.Infrastructure.HttpServices.HttpClient.ExtendedMessageHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x0011e] in <2676430ce90942ddb6691febf783f8c6>:0
at System.Net.Http.HttpClient.FinishSendAsyncUnbuffered (System.Threading.Tasks.Task1[TResult] sendTask, System.Net.Http.HttpRequestMessage request, System.Threading.CancellationTokenSource cts, System.Boolean disposeCts) [0x000b3] in <3ab97adc469048029b91f4dbf8384ccb>:0 at WB.Core.Infrastructure.HttpServices.Services.RestService.ExecuteRequestAsync (System.String url, System.Net.Http.HttpMethod method, System.Object queryString, System.Net.Http.HttpContent httpContent, WB.Core.Infrastructure.HttpServices.HttpClient.RestCredentials credentials, System.Boolean forceNoCache, System.Collections.Generic.Dictionary2[TKey,TValue] customHeaders, System.Nullable`1[T] userCancellationToken) [0x003f7] in <2676430ce90942ddb6691febf783f8c6>:0
— End of inner exception stack trace —

saludos, Felipe

Dear Felipe, you’ve started in the right place, but sent only a fragment of the server log, missing a portion essential for the investigation. The new portion is from the interviewers log, it confirms that the error has occurred on the server (error 500), but is otherwise silent as to what exactly has happened. Please seek the original error log from the server and retain the InnerException part, as described above or keep the whole log file intact, possibly masking just the sensitive information (url, password, etc). Best, Sergiy

We seem to have lost the interview data after the pretest of the questionnaire with 2 farmers. Data from 1 pretest was received in the demo server and exported successfully but the other interview data seem to have been lost despite successful synchronization according to the interviewer. No record of the assignment and interview data was found in the demo server after the interview. How do we prevent this from happening once we start the actual survey? Can data be retrieved when this happens? Is there a way to save the data prior to synchronization?

No matter what an interviewer does, he/she may not affect existence of an assignment on the server. If you don’t see an assignment, there is no interviewer’s fault in that.

Assignments for 2 interviews were received by 2 interviewers using different tablets. 2 farmers were interviewed separately by each interviewer and interview data were both successfully synchronized. However. only 1 interview data was found in the demoserver. The other interview data could not be found. How do we prevent his from happening once we start the actual survey? Can data be retrieved when this happens? If the data is still in the tablet, please help us how to retrieve it. Is there a way to save the interview data in the tablet prior to synchronization?

This description is different from the previous. Previous description mentioned that the assignment has mysteriously disappeared from the server. The new description does not mention this and refers to the interviews only.

I couldn’t reproduce the problem given the provided description. It is so generic that it basically means that in any survey no more than one interview can be collected. Which we know is not the case. Correspondingly, there must be some other important, but omitted contributing factors.

Please use the demo server and any questionnaire to demonstrate the exact sequence of actions that leads to the observation you’ve made.

Once we can reproduce the problem, we can formulate answers to the questions you are asking, such as where the data is or can it be recovered.

On a different note, make sure that you DO NOT use the demo server nor the PDS to collect information from real respondents. This goes against their conditions of use.

If you are interviewing real people who give you real answers about their situation - use a real data server.