New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to create communication pipe for new CA process. Error code: 231 - async CA #5715

Open
rolix7 opened this Issue Oct 30, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@rolix7

rolix7 commented Oct 30, 2017

  • Which version of WiX are you building with?

WiX v3.11.0.1701

  • Which version of Visual Studio are you building with (if any)?

Visual Studio Professional 2017 - v15.4.1

  • Which version of the WiX Toolset Visual Studio Extension are you building with (if any)?

WiX Toolset Visual Studio Extension v0.9.21.62588

  • Which version of .NET are you building with?

.NET 4.7

  • If the problem occurs when installing your packages built with WiX, what is the version of Windows the package is running on?

Windows v10.0 (Build 10586: Service Pack 0)

  • Describe the problem and the steps to reproduce it.

If you put an asynchronous CA right before a synchronous CA, you will get the following error message on almost every installation:

Failed to create communication pipe for new CA process. Error code: 231

  • Log
MSI (s) (34:64) [16:40:07:271]: Executing op: ActionStart(Name=CA_Async,,)
MSI (s) (34:64) [16:40:07:271]: Executing op: CustomActionSchedule(Action=CA_Async,ActionType=1153,Source=BinaryData,Target=CA_Async,)
MSI (s) (34:64) [16:40:07:271]: Executing op: ActionStart(Name=CA_Sync,,)
MSI (s) (34:64) [16:40:07:271]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI3218.tmp, Entrypoint: CA_Async
MSI (s) (34:64) [16:40:07:271]: Executing op: CustomActionSchedule(Action=CA_Sync,ActionType=1025,Source=BinaryData,Target=CA_Sync,)
MSI (s) (34:64) [16:40:07:271]: Generating random cookie.
MSI (s) (34:48) [16:40:07:271]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI3219.tmp, Entrypoint: CA_Sync
MSI (s) (34:64) [16:40:07:271]: Created Custom Action Server with PID 6124 (0x17EC).
MSI (s) (34:30) [16:40:07:287]: Running as a service.
MSI (s) (34:A4) [16:40:07:302]: Hello, I'm your 32bit Impersonated custom action server.
SFXCA: Failed to create communication pipe for new CA process. Error code: 231
CustomAction CA_Async returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
1: CA_Async 2: 1603 
SFXCA: Extracting custom action to temporary directory: C:\Users\User\AppData\Local\Temp\MSI3219.tmp-\
SFXCA: Binding to CLR version v4.0.30319
Calling custom action RZL.Setup.Sample.Wix.CustomAction!RZL.Setup.Sample.Wix.CustomAction.CustomAction.CA_Sync
  • Code for reproduction

Managed CA (C#)

[CustomAction]
public static ActionResult CA_Async(Session session)
{
    Thread.Sleep(5000);
    return ActionResult.Success;
}

[CustomAction]
public static ActionResult CA_Sync(Session session)
{
    return ActionResult.Success;
}

Wix declaration

<CustomAction Id="CA_Async" Execute="deferred" Impersonate="yes" Return="asyncWait" BinaryKey="CA_binary" DllEntry="CA_Async" />
<CustomAction Id="CA_Sync" Execute="deferred" Impersonate="yes" Return="check" BinaryKey="CA_binary" DllEntry="CA_Sync" />

Installation Execution Sequence

<InstallExecuteSequence>
  <Custom Action="CA_Async" After="InstallInitialize" />
  <Custom Action="CA_Sync" After="CA_Async" />
</InstallExecuteSequence>
  • Describe the behavior you expected and how it differed from the actual behavior.

There shouldn't be an error.

@barnson barnson added bug dtf labels Nov 16, 2017

@barnson barnson added this to the v4.x milestone Nov 16, 2017

@barnson

This comment has been minimized.

Show comment
Hide comment
@barnson

barnson Nov 16, 2017

Member

There might be an issue with globals with the sync/async mix.

Member

barnson commented Nov 16, 2017

There might be an issue with globals with the sync/async mix.

@andrey-morskoy

This comment has been minimized.

Show comment
Hide comment
@andrey-morskoy

andrey-morskoy Jul 2, 2018

We have such kind of error even without sync/async mix. It happens occasionally and very rare. The interesting thing about it is that WiX is able to call a few CAs with the same declaration (Return="check" Execute="firstSequence") and then fails with error:
SFXCA: Failed to create communication pipe for new CA process. Error code: 231

Here is the piece of the log:

MSI (c) (4C:1C) [16:23:51:215]: Doing action: CheckAppInstalled
Action 16:23:51: CheckAppInstalled.
Action start 16:23:51: CheckAppInstalled.
MSI (c) (4C:A0) [16:23:51:480]: Invoking remote custom action. DLL: C:\Users_\AppData\Local\Temp\MSI5BAA.tmp, Entrypoint: CheckAppInstalled
SFXCA: Extracting custom action to temporary directory: C:\Users_\AppData\Local\Temp\MSI5BAA.tmp-
SFXCA: Binding to CLR version v4.0.30319
Calling custom action PluginInstaller.CustomActions!PluginInstaller.CustomActions.InstallerCustomActions.CheckAppInstalled
Action ended 16:23:52: CheckAppInstalled. Return value 1.
MSI (c) (4C:1C) [16:23:52:541]: Doing action: CheckAppVersion
Action 16:23:52: CheckAppVersion.
Action start 16:23:52: CheckAppVersion.
MSI (c) (4C:10) [16:23:52:760]: Invoking remote custom action. DLL: C:\Users_\AppData\Local\Temp\MSI60BA.tmp, Entrypoint: CheckAppVersion
SFXCA: Failed to create communication pipe for new CA process. Error code: 231
CustomAction CheckAppVersion returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 16:23:52: CheckAppVersion. Return value 3.

andrey-morskoy commented Jul 2, 2018

We have such kind of error even without sync/async mix. It happens occasionally and very rare. The interesting thing about it is that WiX is able to call a few CAs with the same declaration (Return="check" Execute="firstSequence") and then fails with error:
SFXCA: Failed to create communication pipe for new CA process. Error code: 231

Here is the piece of the log:

MSI (c) (4C:1C) [16:23:51:215]: Doing action: CheckAppInstalled
Action 16:23:51: CheckAppInstalled.
Action start 16:23:51: CheckAppInstalled.
MSI (c) (4C:A0) [16:23:51:480]: Invoking remote custom action. DLL: C:\Users_\AppData\Local\Temp\MSI5BAA.tmp, Entrypoint: CheckAppInstalled
SFXCA: Extracting custom action to temporary directory: C:\Users_\AppData\Local\Temp\MSI5BAA.tmp-
SFXCA: Binding to CLR version v4.0.30319
Calling custom action PluginInstaller.CustomActions!PluginInstaller.CustomActions.InstallerCustomActions.CheckAppInstalled
Action ended 16:23:52: CheckAppInstalled. Return value 1.
MSI (c) (4C:1C) [16:23:52:541]: Doing action: CheckAppVersion
Action 16:23:52: CheckAppVersion.
Action start 16:23:52: CheckAppVersion.
MSI (c) (4C:10) [16:23:52:760]: Invoking remote custom action. DLL: C:\Users_\AppData\Local\Temp\MSI60BA.tmp, Entrypoint: CheckAppVersion
SFXCA: Failed to create communication pipe for new CA process. Error code: 231
CustomAction CheckAppVersion returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 16:23:52: CheckAppVersion. Return value 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment