Error in exporting data

Hello,
I am currently having issue with the Data Export. It keep saying "An unexpected error occurred during export. We are sorry for inconvenience. Please contact support team support@mysurvey.solutions with the log files *.log that are stored in the application folder. Additional information to this issue is available at the support page: https://support.mysurvey.solutions/headquarters/config/standalone-server-errors/.".
I did maintenance procedure “PROCEDURE M1. Dropping temporary export schemas”, but still have same problem.
In export log file this error is:
2022-04-13 11:17:40.217 +04:00 [FTL] Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
at WB.Services.Infrastructure.EventSourcing.FunctionalHandlerExtensions.Handle(IStatefulDenormalizer eventsHandler, Event ev, CancellationToken token)
at WB.Services.Export.Events.EventsHandler.HandleEventsFeedAsync(EventsFeed feed, CancellationToken token)
at WB.Services.Export.Events.EventsHandler.HandleEventsFeedAsync(EventsFeed feed, CancellationToken token)
2022-04-13 11:17:40.241 +04:00 [FTL] Exception Data : WB:handlerMethod : AssignmentDenormalizer.Handle(…)
2022-04-13 11:17:40.242 +04:00 [FTL] Exception Data : WB:initialException : System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
—> System.NullReferenceException: Object reference not set to an instance of an object.
at WB.Services.Export.Assignment.AssignmentDenormalizer.AddRecord[T](PublishedEvent1 event, AssignmentExportedAction action, String oldValue, String newValue, String comment, Int32 position) at WB.Services.Export.Assignment.AssignmentDenormalizer.Handle(PublishedEvent1 event)
— End of inner exception stack trace —
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.Services.Infrastructure.EventSourcing.FunctionalHandlerExtensions.Handle(IStatefulDenormalizer eventsHandler, Event ev, CancellationToken token)
2022-04-13 11:17:40.242 +04:00 [FTL] Exception Data : WB:Event : AssignmentArchived
2022-04-13 11:17:40.242 +04:00 [FTL] Exception Data : WB:GlobalSequence : 16857881
2022-04-13 11:17:40.242 +04:00 [FTL] Exception Data : WB:EventSourceId : a4bb7d0e-ba44-498c-a75c-2d601b8aa2d5
2022-04-13 11:17:40.242 +04:00 [FTL] Exception Data : WB:Events : 16806164:16858581
2022-04-13 11:17:40.244 +04:00 [ERR] Export job failed

Could you please help me resolve this issue.

What version of the product are you using?
If it’s not the latest and you have no obstacles to upgrade it please do upgrade and try to export again.

we upgraded it to 22.02.5 (build 32369) version but still have same problem and same error.

Could you please try “PROCEDURE M1” and try again on new version and run export again?
If the issue persists we would probably need to take a look at your database.

I run this procedure several times but still have same problem. In the database there is table “Events”, In “ws_primary” schema. when I deleted this table export run without errors, but in export files there was no data. I did this delete on my backup. Now I want to delete first 1000 rows in this table and look what will happen with export

There must be some record(s) that are corrupt that prevents export service from reading the data and forming the output.

We will follow up with @sambokadze directly to try and together diagnose the root cause. We will update this topic whenever we have a solution that may be of interest to other users.

Meanwhile the strongest advice: please, please, please never touch any schemas/tables/records in the database other than those specifically listed in our instructions - procedure M1 from the maintenance steps describes dropping (cached) data used for the export service only, we sometimes advise to drop those because we know that part will be regenerated by the application.

However, any other data, and specifically in ws_primary.events is integral part of the system, and contains information collected during the operation of your surveys, so you should never edit or remove anything from there.

or you lose your data.

yes, I know, I tested it in my backup database :slight_smile:

Problem resolved by deleting some records in event table. These records were related to assignment, which was deleted incorrectly.
Now export is working and everything works fine.
Thank you Survey Solutions team!

1 Like