Are you calling this from a dialog using DoAction? If so, you won't get the
logging.

Sent from my Windows Phone
------------------------------
From: Christopher Painter
Sent: 12/20/2013 9:41 AM
To: WiX toolset developer mailing list
Subject: Re: [WiX-devs] Silently failing on execution of CustomAction

This log doesn't have everything I'd expect to see in it.  There is no
mention of SfxCA and what CLR version is being used.  Did you redact this
or perhaps this is a clue that you are never getting to your first line of
managed code.

What .NET did you compile this for and what are your customaction.config
settings?



------------------------------
*From*: "Stuart Hart" <stuart.h...@nice.com>
*Sent*: Friday, December 20, 2013 5:38 AM
*To*: wix-devs@lists.sourceforge.net
*Subject*: [WiX-devs] Silently failing on execution of CustomAction

  Hello devs,



I have created an installer which uses a CustomAction to check if MySQL
server credentials entered in a previous WiX UI are valid. On the
development machine, this is all working really well.



The CustomAction is simply:



        [CustomAction]

        public static ActionResult CheckIfDbExists(Session session)

        {

            session.Log("Resetting MYSQL_DB_EXISTS and
MYSQL_DB_SERVER_AVAILABLE to '0'.");

            session["MYSQL_DB_EXISTS"] = "0";

            session["MYSQL_DB_SERVER_AVAILABLE"] = "0";



            try

            {

                // prepare the SQL connection

                session.Log("Formatting the connection string");

                string connectionString = string.Format(SqlConnectionFormat,

                    session["MYSQL_SERVER"],

                    session["MYSQL_USERNAME"],

                    session["MYSQL_PASSWORD"]);



                // create and open the SQL connection

                session.Log("Attempting to create a MySqlConnection");

                using (var connection = new MySqlConnection
(connectionString))

                {

                    session.Log("Attempting to open a connection to the
database");

                    connection.Open();



                    session.Log("Ensuring that the connection is open");

                    if (connection.State == ConnectionState.Open)

                    {

                        // the server is available, at least

                        session["MYSQL_DB_SERVER_AVAILABLE"] = "1";

                    }



                    // execute the SQL statement

                    return ExecuteCheckDbExistStatement(session,
connection);

                }

            }

            catch (Exception exception)

            {

                // we couldn't connect to the MySQL server

                session.Log("ERROR: Failed during CheckIfDbExists() caused
by: {0}", exception.Message);

                return ActionResult.Failure;

            }

        }



The output from running this Custom Action can be found here:



                MSI (c) (CC:D0) [11:01:03:681]: PROPERTY CHANGE: Modifying
MYSQL_PASSWORD property. Its current value is '**********'. Its new value:
'**********'.

                MSI (c) (CC:D0) [11:01:03:759]: Doing action:
CheckIfDbExists

                MSI (c) (CC:D0) [11:01:03:759]: Note: 1: 2205 2:  3:
ActionText

                Action 11:01:03: CheckIfDbExists.

                Action start 11:01:03: CheckIfDbExists.

                MSI (c) (CC:D0) [11:01:03:759]: Creating MSIHANDLE (3) of
type 790542 for thread 77520

                MSI (c) (CC:5C) [11:01:03:759]: Invoking remote custom
action. DLL: C:\Users\ADMINI~1\AppData\Local\Temp\MSI78E2.tmp, Entrypoint:
CheckIfDbExists

                MSI (c) (CC!64) [11:01:03:853]: Creating MSIHANDLE (4) of
type 790531 for thread 77668

                MSI (c) (CC!64) [11:01:03:853]: Closing MSIHANDLE (4) of
type 790531 for thread 77668

                MSI (c) (CC!64) [11:01:03:884]: Creating MSIHANDLE (5) of
type 790531 for thread 77668

                MSI (c) (CC!64) [11:01:03:884]: Closing MSIHANDLE (5) of
type 790531 for thread 77668

                MSI (c) (CC!64) [11:01:04:040]: Creating MSIHANDLE (6) of
type 790531 for thread 77668

                MSI (c) (CC!64) [11:01:04:040]: Closing MSIHANDLE (6) of
type 790531 for thread 77668

                MSI (c) (CC!64) [11:01:04:150]: Creating MSIHANDLE (7) of
type 790531 for thread 77668

                MSI (c) (CC!64) [11:01:04:165]: Closing MSIHANDLE (7) of
type 790531 for thread 77668

                MSI (c) (CC!64) [11:01:04:165]: Creating MSIHANDLE (8) of
type 790531 for thread 77668

                MSI (c) (CC!64) [11:01:04:165]: Closing MSIHANDLE (8) of
type 790531 for thread 77668

                MSI (c) (CC!64) [11:01:04:165]: Creating MSIHANDLE (9) of
type 790531 for thread 77668

                MSI (c) (CC!64) [11:01:04:165]: Closing MSIHANDLE (9) of
type 790531 for thread 77668

                MSI (c) (CC!64) [11:01:04:196]: Creating MSIHANDLE (10) of
type 790531 for thread 77668

                MSI (c) (CC!64) [11:01:04:196]: Closing MSIHANDLE (10) of
type 790531 for thread 77668

                MSI (c) (CC!64) [11:01:04:368]: Creating MSIHANDLE (11) of
type 790531 for thread 77668

                MSI (c) (CC!64) [11:01:04:368]: Closing MSIHANDLE (11) of
type 790531 for thread 77668

                MSI (c) (CC:5C) [11:01:04:431]: Closing MSIHANDLE (3) of
type 790542 for thread 77520

                Action ended 11:01:04: CheckIfDbExists. Return value 1.

                MSI (c) (CC:D0) [11:01:04:431]: Note: 1: 2205 2:  3: Error

                MSI (c) (CC:D0) [11:01:04:431]: Note: 1: 2228 2:  3: Error
4: SELECT `Message` FROM `Error` WHERE `Error` = 2826

                DEBUG: Error 2826:  Control BannerBitmap on dialog
InvalidMySqlSettingsDlg extends beyond the boundaries of the dialog to the
right by 5 pixels

                The installer has encountered an unexpected error
installing this package. This may indicate a problem with this package. The
error code is 2826. The arguments are: InvalidMySqlSettingsDlg,
BannerBitmap, to the right

                MSI (c) (CC:D0) [11:01:04:431]: Note: 1: 2205 2:  3: Error

                MSI (c) (CC:D0) [11:01:04:431]: Note: 1: 2228 2:  3: Error
4: SELECT `Message` FROM `Error` WHERE `Error` = 2826

                DEBUG: Error 2826:  Control BannerLine on dialog
InvalidMySqlSettingsDlg extends beyond the boundaries of the dialog to the
right by 5 pixels

                The installer has encountered an unexpected error
installing this package. This may indicate a problem with this package. The
error code is 2826. The arguments are: InvalidMySqlSettingsDlg, BannerLine,
to the right

                MSI (c) (CC:D0) [11:01:04:431]: Note: 1: 2205 2:  3: Error

                MSI (c) (CC:D0) [11:01:04:431]: Note: 1: 2228 2:  3: Error
4: SELECT `Message` FROM `Error` WHERE `Error` = 2826

                DEBUG: Error 2826:  Control BottomLine on dialog
InvalidMySqlSettingsDlg extends beyond the boundaries of the dialog to the
right by 5 pixels

                The installer has encountered an unexpected error
installing this package. This may indicate a problem with this package. The
error code is 2826. The arguments are: InvalidMySqlSettingsDlg, BottomLine,
to the right

                Action 11:01:04: InvalidMySqlSettingsDlg. Dialog created



At a minimum, I would expect to see “Resetting MYSQL_DB_EXISTS and
MYSQL_DB_SERVER_AVAILABLE to '0'.” in the log output but I don’t as you can
see.



The CustomAction step fails with error 1 and I don’t get anything else. I
am running the installer with full verbose logging but it doesn’t seem as
though the CustomAction is being executed.



With no other errors, I am not sure what to try next. As I mentioned, it
works perfectly well on the machine that I created it with.



The machine that is failing is a VirtualBox install of Windows Server
2008R2.



Thanks,

Stuart




 NICE Systems UK Limited ("NICE") is registered in England under company
number, 3403044. The registered office of NICE is at Tollbar Way, Hedge
End, Southampton, Hampshire SO30 2ZP.

Confidentiality: This communication and any attachments are intended for
the above-named persons only and may be confidential and/or legally
privileged. Any opinions expressed in this communication are not
necessarily those of NICE. If this communication has come to you in error
you must take no action based on it, nor must you copy or show it to
anyone; please delete/destroy and inform the sender by e-mail immediately.

Monitoring: NICE may monitor incoming and outgoing e-mails.
Viruses: Although we have taken steps toward ensuring that this e-mail and
attachments are free from any virus, we advise that in keeping with good
computing practice the recipient should ensure they are actually virus
free.
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
WiX-devs mailing list
WiX-devs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-devs

Reply via email to