Critical error "String was not recognized as a valid DateTime."

For users or potential users.
Post Reply
ForrestGumpDDS
Posts: 177
Joined: Fri Oct 14, 2011 3:31 pm

Critical error "String was not recognized as a valid DateTime."

Post by ForrestGumpDDS » Sat Jun 06, 2020 3:42 pm

Updated from 19.3.66 (i believe) to the latest stable, 20.1.something.
Upon login, I see this:

Code: Select all

Unhandled exception:  String was not recognized as a valid DateTime.
System.FormatException
   at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)
   at System.DateTime.Parse(String s)
   at OpenDentBusiness.Appointments.<>c__DisplayClass18_1.<GetPeriodApptsTable>b__16() in C:\Development\OPEN DENTAL SUBVERSION\opendental20.1\OpenDentBusiness\Data Interface\Appointments.cs:line 948
   at OpenDentBusiness.Appointments.<>c.<GetPeriodApptsTable>b__18_13(Action x) in C:\Development\OPEN DENTAL SUBVERSION\opendental20.1\OpenDentBusiness\Data Interface\Appointments.cs:line 1219
   at System.Collections.Generic.List`1.ForEach(Action`1 action)
   at OpenDentBusiness.Appointments.GetPeriodApptsTable(DateTime dateStart, DateTime dateEnd, Int64 aptNum, Boolean isPlanned, List`1 listPinApptNums, List`1 listOpNums, List`1 listProvNums, Boolean doRunQueryOnNoOps) in C:\Development\OPEN DENTAL SUBVERSION\opendental20.1\OpenDentBusiness\Data Interface\Appointments.cs:line 1219
   at OpenDental.ContrAppt.RefreshAppointmentsIfNeeded(DateTime dateStart, DateTime dateEnd, List`1 listPinApptNums, List`1 listOpNums, List`1 listProvNums, Boolean isRefreshNeeded) in C:\Development\OPEN DENTAL SUBVERSION\opendental20.1\OpenDental\Main Modules\ContrApptJ.cs:line 2930
   at OpenDental.ContrAppt.RefreshModuleDataPeriod(List`1 listPinApptNums, List`1 listOpNums, List`1 listProvNums, Boolean isRefreshAppointments, Boolean isRefreshSchedules) in C:\Development\OPEN DENTAL SUBVERSION\opendental20.1\OpenDental\Main Modules\ContrApptJ.cs:line 2882
   at OpenDental.ContrAppt.ModuleSelected(Int64 patNum, List`1 listPinApptNums, List`1 listOpNums, List`1 listProvNums) in C:\Development\OPEN DENTAL SUBVERSION\opendental20.1\OpenDental\Main Modules\ContrApptJ.cs:line 2650
   at OpenDental.FormOpenDental.SetModuleSelected(Boolean menuBarClicked) in C:\Development\OPEN DENTAL SUBVERSION\opendental20.1\OpenDental\Main Modules\FormOpenDental.cs:line 5860
   at OpenDental.FormOpenDental.SetModuleSelected() in C:\Development\OPEN DENTAL SUBVERSION\opendental20.1\OpenDental\Main Modules\FormOpenDental.cs:line 5850
   at OpenDental.FormOpenDental.ProcessCommandLine(String[] args) in C:\Development\OPEN DENTAL SUBVERSION\opendental20.1\OpenDental\Main Modules\FormOpenDental.cs:line 8777
   at OpenDental.FormOpenDental.FormOpenDental_Load(Object sender, EventArgs e) in C:\Development\OPEN DENTAL SUBVERSION\opendental20.1\OpenDental\Main Modules\FormOpenDental.cs:line 3026
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
I already had something similar recently and had to revert back to the old version.
Looks like the bug was not fixed.
What do I do? Roll back again?

User avatar
cmcgehee
Posts: 711
Joined: Tue Aug 25, 2015 5:06 pm
Location: Salem, Oregon

Re: Critical error "String was not recognized as a valid DateTime."

Post by cmcgehee » Mon Jun 08, 2020 7:14 am

An error like this is likely due to corruption in your database. I would run Database Maintenance on 19.3 and then try updating again. If you still get the error, call in to our support, and we'll hunt down the source.
Chris McGehee
Open Dental Software
http://www.opendental.com

ForrestGumpDDS
Posts: 177
Joined: Fri Oct 14, 2011 3:31 pm

Re: Critical error "String was not recognized as a valid DateTime."

Post by ForrestGumpDDS » Mon Jun 08, 2020 8:31 pm

Thank you
It took me awhile as I realized that some database maintenance routines required global privileges and had to run them as root user.
I stumble upon one "button" that threw another exception about missing table:

Code: Select all

Error Encountered - 06/08/2020 11:15:35 PM
Unhandled exception:  Table 'opendental.claimProc' doesn't exist
MySql.Data.MySqlClient.MySqlException
   at OpenDentBusiness.DataCore.ExecuteQueryFunc[T](Func`1 f) in C:\Development\OPEN DENTAL SUBVERSION\opendental19.3\OpenDentBusiness\Db\DataCore.cs:line 73
   at OpenDentBusiness.DataCore.GetTable(String command) in C:\Development\OPEN DENTAL SUBVERSION\opendental19.3\OpenDentBusiness\Db\DataCore.cs:line 17
   at OpenDentBusiness.Db.GetTableWithRemotingRoleCheck(String command) in C:\Development\OPEN DENTAL SUBVERSION\opendental19.3\OpenDentBusiness\Db\Db.cs:line 280
   at OpenDentBusiness.Db.GetTable(String command) in C:\Development\OPEN DENTAL SUBVERSION\opendental19.3\OpenDentBusiness\Db\Db.cs:line 245
   at OpenDentBusiness.Crud.ProcedureCrud.SelectMany(String command) in C:\Development\OPEN DENTAL SUBVERSION\opendental19.3\OpenDentBusiness\Crud\ProcedureCrud.cs:line 36
   at OpenDentBusiness.Procedures.GetProcsWithOldEstimates() in C:\Development\OPEN DENTAL SUBVERSION\opendental19.3\OpenDentBusiness\Data Interface\Procedures.cs:line 1959
   at OpenDental.FormDatabaseMaintenance.<>c.<butRecalcEst_Click>b__106_0() in C:\Development\OPEN DENTAL SUBVERSION\opendental19.3\OpenDental\Forms\FormDatabaseMaintenance.cs:line 1338
   at CodeBase.ODProgress.ShowAction(Action actionComputation, String startingMessage, Action`1 actionException, Type eventType, ODEventType odEventType, ProgressBarStyle progStyle, Boolean hasMinimize, Boolean hasHistory) in C:\Development\OPEN DENTAL SUBVERSION\opendental19.3\CodeBase\Progress\ODProgress.cs:line 142
   at OpenDental.FormDatabaseMaintenance.butRecalcEst_Click(Object sender, EventArgs e) in C:\Development\OPEN DENTAL SUBVERSION\opendental19.3\OpenDental\Forms\FormDatabaseMaintenance.cs:line 1338
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at OpenDental.UI.Button.OnClick(EventArgs ea) in C:\Development\OPEN DENTAL SUBVERSION\opendental19.3\OpenDental\UI\Button.cs:line 78
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
My database has the claimproc table, I guess the issue is the capital letter P.
For unix hosts this will matter as claimProc and claimproc are different names.
If I rename the table, another table name comes up as exception - patPlan. Probably more, cannot check for sure, as after renaming that one, I cannot login. Had to rename them all back.

After running Repair tables, I upgraded to 20.1 with the same result - same exception gets thrown.
I rolled back to 19.3, converted back to InnoDB (for some reason backups are created in MyISAM regardless of server and tables properties) and everything is working.

ForrestGumpDDS
Posts: 177
Joined: Fri Oct 14, 2011 3:31 pm

Re: Critical error "String was not recognized as a valid DateTime."

Post by ForrestGumpDDS » Tue Jun 09, 2020 12:27 am

On a top of that, eConnector service quit working.
The service stops immediately after the start.
I reinstalled it manually per instructions and getting this:

Code: Select all

06/09/20 03:22:21:534	ODSocketRemoteImmortal is stopping and will not restart.
06/09/20 03:23:34:105	failed - Value cannot be null.
Parameter name: source
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
   at OpenDentalWebCore.ListenerThreadProxy.((ODThread odThread)
   at CodeBase.ODThread.Run()
06/09/20 03:23:34:121	failed - Value cannot be null.
Parameter name: source
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
   at OpenDentalWebCore.ListenerThreadProxy.((ODThread odThread)
   at CodeBase.ODThread.Run()
06/09/20 03:23:34:137	failed - Value cannot be null.
Parameter name: source
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
   at OpenDentalWebCore.ListenerThreadProxy.((ODThread odThread)
   at CodeBase.ODThread.Run()
06/09/20 03:23:34:152	failed - Value cannot be null.
Parameter name: source
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
   at OpenDentalWebCore.ListenerThreadProxy.((ODThread odThread)
   at CodeBase.ODThread.Run()
06/09/20 03:23:34:168	ODSocketRemoteImmortal is stopping and will not restart.
Connection to the database as root, low user fields left empty.

User avatar
cmcgehee
Posts: 711
Joined: Tue Aug 25, 2015 5:06 pm
Location: Salem, Oregon

Re: Critical error "String was not recognized as a valid DateTime."

Post by cmcgehee » Tue Jun 09, 2020 9:32 am

I've created a task internally to fix the error you're getting with DBM. The reason why we make backups as MyISAM is because creating the backup is much faster that way. I think we would have to look at the rest of your log files to figure out why your eConnector is not working. If you call support, we can look into it.
Chris McGehee
Open Dental Software
http://www.opendental.com

ForrestGumpDDS
Posts: 177
Joined: Fri Oct 14, 2011 3:31 pm

Re: Critical error "String was not recognized as a valid DateTime."

Post by ForrestGumpDDS » Fri Jun 12, 2020 2:06 pm

Thank you and the technician for help.
The e-Connector works now.
Any estimates when the bug can be located and fixed, so I can upgrade to 20.1?

Edit. 20 mins later. e-Connector crushed and is not staying on. It looks I might be getting blacklisted on your end again.

Code: Select all

eConnector shutting down due to multiple eConnectors attempting to make connections.

Shutting Down eConnector({"CompName":"vatech-pc","PublicIP":"XX.164.47.YY","DateTimeHQ":"2020-06-12T15:00:46.541182","IsBlacklisted":true,"SessionGuid":"","InternalIP":"192.168.41.62"}; Internal IP: 192.168.OO.62), Primary eConnector({"CompName":"vatech-pc","PublicIP":"XX.164.47.YY","DateTimeHQ":"2020-06-12T15:00:46.541182","IsBlacklisted":true,"SessionGuid":"","InternalIP":"192.168.OO.62"})

User avatar
cmcgehee
Posts: 711
Joined: Tue Aug 25, 2015 5:06 pm
Location: Salem, Oregon

Re: Critical error "String was not recognized as a valid DateTime."

Post by cmcgehee » Mon Jun 15, 2020 7:51 am

I think we are going to need to collect a copy of your database to locate the bug. Would you mind calling support again?

I made a change on our side to remove your eConnector from the blacklist. Try restarting it again.
Chris McGehee
Open Dental Software
http://www.opendental.com

ForrestGumpDDS
Posts: 177
Joined: Fri Oct 14, 2011 3:31 pm

Re: Critical error "String was not recognized as a valid DateTime."

Post by ForrestGumpDDS » Mon Jun 15, 2020 3:23 pm

cmcgehee wrote:
Mon Jun 15, 2020 7:51 am
I think we are going to need to collect a copy of your database to locate the bug. Would you mind calling support again?

I made a change on our side to remove your eConnector from the blacklist. Try restarting it again.
It helped for 5 minutes and then I'm blacklisted again. It looks like my client is trying to attempt to many connections.
Let me wait until I'm able to upgrade.

Post Reply