Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Add question

You must login to ask question.

Login

Register Now

APPSeCONNECT community provides a new way for integration super heros connect the external world. Join hands together to build a community of people to help each other, solve problems or share knowledge.

Troubleshoot : Sync stopped after upgrade on-premise agent tool

Have you installed a new version of OP Agent in your system by upgrading your old version ? If you just did an update and you see all your data sync is not working properly, there might be a situation that the databases are not patched correctly.

The first thing that is recommended to execute before running a sync operation is to run our Migration tool. If you haven’t executed it, please do execute before working on it.

Scenarios

There are a number of scenario which might indicate this error. Let us consider the scenarios one by one.

Scenario 1

You started the auto-sync and executed it overnight. The very next day you notice, you haven’t received a Morning Sync summary report, even though you were receiving it before migrating the agent. While investigating the case, you tried to look into the logs generated during the time period you receive the report. Finally, you notice something like the one below:

Reason is System.AggregateException: One or more errors occurred. —> System.ArgumentNullException: Value cannot be null.
Parameter name: source
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at InSync.eConnect.Core.Helper.EmailNotifier.<SendReport>d__2.MoveNext()
— End of inner exception stack trace —
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at InSync.eConnect.AutoRunner.Jobs.MorningReportJob.SendEmailNotification(IJobExecutionContext context)
at InSync.eConnect.AutoRunner.Jobs.MorningReportJob.Execute(IJobExecutionContext context)
—> (Inner Exception #0) System.ArgumentNullException: Value cannot be null.
Parameter name: source
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at InSync.eConnect.Core.Helper.EmailNotifier.<SendReport>d__2.MoveNext()<—

VGVjaG5pY2FsIEluZm8gOiBbRXhlY3V0ZSAtIDEwMCAtIE1vcm5pbmdSZXBvcnRKb2Jd

This kind of error indicates that there is some issue with the morning report generation and it might sometimes occur due to database patching incomplete. You need to execute the migration tool which can be found inside the application installation directory to fix this issue.

Scenario 2

Another scenario might be, you see an error “Object reference not set to an instance of an object” during login.

NullReferenceException

There could be 100 reasons for this kind of scenario, but one of the reason could be this too.

Scenario 3

Another scenario could be you see an SQL Exception happening in the logs and your sync operation is stopped after upgrading the agent. The error you see is similar to the one below:

For Query : Select TransactionId, SourceId, DestinationId, TransactionTS, CreatedAtTs, Actualmessage, Additionaljson, TrackData, Processnow, Tries, Status, WorkflowId, TransactionGuid, WorkFlowEngineId From [347162ec-bc7a-4db6-a90b-e03e3915e7ad] WHERE SourceId IN () ORDER BY TransactionTS DESC ~ error is :code = Error (1), message = System.Data.SQLite.SQLiteException (0x800007BF): SQL logic error or missing database no such column: CreatedAtTs at System.Data.SQLite.SQLite3.Prepare(SQLiteConnection cnn, String strSql, SQLiteStatement previous, UInt32 timeoutMS, String& strRemain) at System.Data.SQLite.SQLiteCommand.BuildNextCommand() at System.Data.SQLite.SQLiteCommand.GetStatement(Int32 index) at System.Data.SQLite.SQLiteDataReader.NextResult() at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave) at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior) at System.Data.SQLite.SQLiteCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) at InSync.eConnect.APPSeCONNECT.Storage.SQLFactory.<ExecuteTableAsync>d__22.MoveNext() ~ ConnectionString is : Data Source=C:\ProgramData\APPSeCONNECT\con_3751c213ce3646e1a04d078f72a04422.db;Version=3;DateTimeFormat=CurrentCulture; For Query : Select TransactionId, SourceId, DestinationId, TransactionTS, CreatedAtTs, Actualmessage, Additionaljson, TrackData, Processnow, Tries, Status, WorkflowId, TransactionGuid, WorkFlowEngineId From [347162ec-bc7a-4db6-a90b-e03e3915e7ad] WHERE SourceId IN () ORDER BY TransactionTS DESC ~ error is :code = Error (1), message = System.Data.SQLite.SQLiteException (0x800007BF): SQL logic error or missing database no such column: CreatedAtTs at System.Data.SQLite.SQLite3.Prepare(SQLiteConnection cnn, String strSql, SQLiteStatement previous, UInt32 timeoutMS, String& strRemain) at System.Data.SQLite.SQLiteCommand.BuildNextCommand() at System.Data.SQLite.SQLiteCommand.GetStatement(Int32 index) at System.Data.SQLite.SQLiteDataReader.NextResult() at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave) at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior) at System.Data.SQLite.SQLiteCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) at InSync.eConnect.APPSeCONNECT.Storage.SQLFactory.<ExecuteTableAsync>d__22.MoveNext() ~ ConnectionString is : Data Source=C:\ProgramData\APPSeCONNECT\con_3751c213ce3646e1a04d078f72a04422.db;Version=3;DateTimeFormat=CurrentCulture; VGVjaG5pY2FsIEluZm8gOiBbR2V0TWVzc2FnZSAtIDE2NiAtIExvZ2dlcl0=
The error clearly indicates that an SQL field is missing in the internal database structure. The problem occurs if the database which is being used for the application is mismatched.

Why this happens?

When you upgrade an Agent, we ensure all your data which were present in your local databases are kept intact such that the sync settings could be automatically merged with the new agent. But as you know upgrade means new code, which might have some dependencies on these data schemas, and patching of these schemas are required to fix them.  With the installer, we do not touch any data in your database for security reason, and we want you to execute the migration tool yourself after backing up the databases correctly.

Conclusion

You should have a common practice to execute the Migration tool correctly before executing any sync operation such that these kind of errors never be encountered on your environment.

 

Hope this will help.

About Abhishek SurVerifiedBeginner

VP, Products at InSync Abhishek Sur has been a Microsoft MVP since 2011. He is currently working as a Product Head with Insync Tech-Fin Solutions Pvt Ltd. He has profound theoretical insight and years of hands-on experience in different .NET products and languages. Over the years, he has helped developers throughout the world with his experience and knowledge. He owns a Microsoft User Group in Kolkata named Kolkata Geeks and regularly organizes events and seminars in various places to spread .NET awareness. A renowned public speaker, voracious reader, and technology buff, Abhishek's main interest lies in exploring the new realms of .NET technology and coming up with priceless write-ups on the unexplored domains of .NET. He is associated with Microsoft's Insider list on WPF and C# and stays in touch with Product Group teams. He holds a Master's degree in Computer Application along with various other certificates to his credit. Abhishek is a freelance content producer, developer, and site administrator. His website www.abhisheksur.com guides both budding and experienced developers in understanding the details of languages and latest technologies. He has a huge fan following on social networks. You can reach him at books@abhisheksur.com, get online updates from his Facebook account, or follow him on Twitter @abhi2434.

Follow Me

Leave a reply

Share via
Copy link
Powered by Social Snap