Bug #92566 Lunching MySql for excel makes program hang
Submitted: 25 Sep 2018 19:34 Modified: 22 Mar 2019 0:47
Reporter: Allan Soll Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL for Windows: MySQL for Excel Severity:S2 (Serious)
Version: OS:Windows (10)
Assigned to: CPU Architecture:Any

[25 Sep 2018 19:34] Allan Soll
Description:
Here are my environment details: 

OS: windows 10 with  
Excel: 2013 H&B
MySql for Excel 1.3.7
MySql Server 8.0.12

I used the MySql Installer to perform a standard 'Developer' install of MySql for Excel and all associated dependencies. 

I have also installed MySql Workbench, which I've used to connect successfully to our Google Cloud Database. 

I've also successfully connected to the local MySql Server host on port 3306 and 3303 from the MySql for Excel client. 

MySQL for Excel add-in is showing correctly under Excel Data menu 

When I try to launch MySql for Excel however, the program will hang, and display a blue rotating circle. I've left the program in this state for upwards of 20 minutes with no warning generated. I have to quit Excel in order to try again. 

Here are some of the things I've tried: 

Re-installing the entire MySql suite 
Restarting the computer 
Creating a connection and connecting in MySql workbench
Removing the windows firewall 

None of these things changed the response from excel. The program hangs until a restart is initiated. 

As a side comment, I have been using MySql for Excel for a few years with  massive loads of data. No issues whatsoever, so far. However, this new install is not behaving like the older version. 

Any help you could provide is greatly appreciated. 

Thanks!

How to repeat:
Install MySql for excel on windows 10 os with office 2013 h&b
[26 Sep 2018 0:39] MySQL Verification Team
Thank you for the bug report. Your connection is remote (Google cloud)? and what kind of connection? also please check for error on log: "%APPDATA%\Oracle\MySQL for Excel\" and print them here. Thanks.
[26 Sep 2018 7:20] Allan Soll
I'm using Standard TCP/IP connection, which works fine in Workbench.

Here is a copy from errorlog

MySQLForExcel Information: 1 : MySQL for Excel Startup
    DateTime=2018-09-26T07:08:11.4530542Z
    Timestamp=3303012228
MySQLForExcel Information: 1 : MySQL for Excel Shutdown
    DateTime=2018-09-26T07:08:23.3072649Z
    Timestamp=3330730940

MySQLForExcel Error: 1 : Unhandled Exception
Thrown by: MySqlSourceTrace.WriteAppErrorToLog
Exception message: Root element is missing.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
   at System.Xml.XmlReader.MoveToContent()
   at System.Xml.XmlReader.ReadStartElement(String name)
   at MySql.Utility.Classes.CustomSettingsProvider.GetPropertyValues(SettingsContext context, SettingsPropertyCollection collection)
   at System.Configuration.SettingsBase.GetPropertiesFromProvider(SettingsProvider provider)
   at System.Configuration.SettingsBase.GetPropertyValueByName(String propertyName)
   at System.Configuration.SettingsBase.get_Item(String propertyName)
   at System.Configuration.ApplicationSettingsBase.GetPropertyValue(String propertyName)
   at System.Configuration.ApplicationSettingsBase.get_Item(String propertyName)
   at MySQL.ForExcel.Properties.Settings.get_ConvertedSettingsStoredMappingsCasing()
   at MySQL.ForExcel.ThisAddIn.ConvertSettingsStoredMappingsCasing()
   at MySQL.ForExcel.ThisAddIn.PerformSettingsAdjustments()
   at MySQL.ForExcel.ThisAddIn.ThisAddIn_Startup(Object sender, EventArgs e)
    DateTime=2018-09-26T07:08:11.4770379Z
    Timestamp=3303068799
    Callstack=   at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
   at System.Environment.get_StackTrace()
   at System.Diagnostics.TraceEventCache.get_Callstack()
   at System.Diagnostics.TraceListener.WriteFooter(TraceEventCache eventCache)
   at System.Diagnostics.TraceSource.TraceEvent(TraceEventType eventType, Int32 id, String message)
   at MySql.Utility.Classes.MySql.MySqlSourceTrace.WriteToLog(String message, Boolean showErrorDialog, SourceLevels errorLevel, Int32 messageId)
   at MySql.Utility.Classes.MySql.MySqlSourceTrace.WriteAppErrorToLog(Exception exception, String errorTitle, String errorMessage, Boolean showErrorDialog, SourceLevels errorLevel, Boolean useInnerException)
   at MySql.Utility.Classes.MySql.MySqlSourceTrace.WriteAppErrorToLog(Exception exception, Boolean showErrorDialog, SourceLevels errorLevel, Boolean useInnerException)
   at MySQL.ForExcel.ThisAddIn.ThisAddIn_Startup(Object sender, EventArgs e)
   at Microsoft.Office.Tools.AddInImpl.OnStartup()
   at MySQL.ForExcel.ThisAddIn.FinishInitialization()
   at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.ExecuteCustomization.ExecutePhase(ExecutionPhases executionPhases)
   at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.ExecuteCustomization.Microsoft.VisualStudio.Tools.Office.Runtime.Interop.IExecuteCustomization2.ExecuteEntryPoints()
[26 Sep 2018 7:24] Allan Soll
In excel I don't get even to choose a connection, the program hangs immediately when I click on MySql for Excel menu item.
[26 Sep 2018 8:09] MySQL Verification Team
Thank you for the feedback. Are you tried to remove all the saved connection and then launch it?.
[26 Sep 2018 9:19] Allan Soll
Yes I have, I have removed all the saved connections. There is no impact on the MySQL for Excel issue.
[27 Sep 2018 8:23] MySQL Verification Team
Another case reported about hanging it was solved removing the shared workbook mode and compatibility mode. Maybe isn't your case but check it anyway. Thanks.
[2 Oct 2018 16:19] Allan Soll
The workbook is not shared workbook and not in compatibility mode. It is extremely frustrating because workbench data import tool for csv has never worked correctly and the only fast way to move data from excel to mysql has been this plug-in. Any other ideas? I must be clearly issue with new version. Should we reverse and reinstall 5.7?
[12 Nov 2018 18:04] Glenn Giordano
Not sure if this is a related issue or a different one.  I am running Excel version 1803 Build 9126.2295 Click-to-Run and MySQL 8.  Everything with the add-in was working fine until recently (maybe two weeks ago).  I think this coincided with an Excel update but can't be sure.  The symptoms I experience now are that I can no longer connect to the database.  It just spins with the little blue circle indefinitely.  This can be interrupted by closing the add-in sidebar or attempting any other connection (which in my case fail because the passwords are not using the old standard style).  I have recreated the connection, with no improvement.  Connection works fine in Workbench. 
I have tried reinstalling the add-in with no improvement.
[24 Jan 2019 5:56] Javier Treviño
Hi Allan,
Thanks for your bug report and for attaching an excerpt from the log.
Reading the stack trace, I think the settings file might have get corrupted.

Can you attach your settings.config file found at "%APPDATA%\Oracle\MySQL for Excel" to this bug report? That way I can see if something is wrong with it.

Also please try deleting the settings.config file, make sure Excel is closed when you do that, then reopen Excel and launch the add-in, that should re-create the configuration file.

Please let us know if this fixes the error.
Thanks
[24 Jan 2019 6:00] Javier Treviño
Hi Glenn,
I don't think the root cause of the problem that Allan reported relates to the one you report, but the behavior of Excel is the same, it seems to hang.

Have you updated Workbench to the latest version?  If you go to "%APPDATA%\MySQL\Workbench" do you see a "workbench_user_data.dat" instead of a "user_data.dat"?

Thanks
[11 Feb 2019 15:21] Allan Soll
Hi Javier,

I had already switched to another computer and tried your proposed fix only today. I have deleted the settings.config file, while making sure Excel was
closed. Then I reopened Excel and launched the add-in. 

It works like a charm! 

Thank you.
Allan
[21 Feb 2019 23:44] Glenn Giordano
Thank you Javier,

I updated to the latest version of Workbench, deleted the configuration file, removed the old connection I was using for Excel.  Restarted the applications, recreated the connection from Excel and everything now seems to be working.  

No conclusive data on exactly which thing corrected the issue, but at it stands at the moment, it is corrected (for now... hahaha)

I did all of these things prior to the latest Workbench version with no success so I would be inclined to think it was something in the latest update.

Regards,
G^2
[22 Mar 2019 0:47] Javier Treviño
Closing the bug, since the 2 issues reported where fixed by the users and the bug report does not contain steps to reproduce the issue consistently.

I tried several scenarios to reproduce and was unable to do so.