Hi Jack,

I think you hit the nail on its head. It was in fact calling DoAction from a UI 
step hence there was no logging taking place.

I further found that it was failing inside the Custom Action for various 
reasons.

I was side-footed by the fact there was no logging, so was investigating the 
fact that it wasn't being called. I incorrectly assumed that it was a 
dependency issue and was debugging it from that side.

Turned out to be my MySQL connector being newer than the MySQL engine, and the 
particular authentication method (short passwords vs long passwords) was 
deprecated. Obviously, this didn't happen on my Dev PC, as Murphy's Law would 
specify.

So, thanks all for the responses. Problem solved.

Regards,
Stuart


-----Original Message-----
From: wix-devs-requ...@lists.sourceforge.net 
[mailto:wix-devs-requ...@lists.sourceforge.net] 
Sent: 20 December 2013 16:58
To: wix-devs@lists.sourceforge.net
Subject: WiX-devs Digest, Vol 87, Issue 26

Send WiX-devs mailing list submissions to
        wix-devs@lists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/wix-devs
or, via email, send a message with subject or body 'help' to
        wix-devs-requ...@lists.sourceforge.net

You can reach the person managing the list at
        wix-devs-ow...@lists.sourceforge.net

When replying, please edit your Subject line so it is more specific than "Re: 
Contents of WiX-devs digest..."


Today's Topics:

   1. Re: Silently failing on execution of CustomAction (Jack Hennessey)


----------------------------------------------------------------------

Message: 1
Date: Fri, 20 Dec 2013 08:57:50 -0800
From: Jack Hennessey <jhennessey5...@gmail.com>
Subject: Re: [WiX-devs] Silently failing on execution of CustomAction
To: WiX toolset developer mailing list
        <wix-devs@lists.sourceforge.net>
Message-ID: <-1377016246714360907@unknownmsgid>
Content-Type: text/plain; charset="windows-1252"

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.
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

------------------------------------------------------------------------------
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


End of WiX-devs Digest, Vol 87, Issue 26
****************************************

------------------------------------------------------------------------------
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