gibbed/SteamAchievementManager · error · ClientInitializeException
failed to create pipe
Error message
failed to create pipe
What it means
Client.Initialize throws ClientInitializeException with failure code CreateSteamPipe when SteamClient.CreateSteamPipe() returns 0, meaning the Steam client could not open a communication pipe to the running Steam process. Without a pipe no further interfaces (user, user stats, apps) can be obtained.
Solutions
- Start the Steam client and wait until it is fully logged in before initializing
- Run the application and Steam under the same user and same elevation level
- Restart Steam if it is hung or mid-update
- Retry initialization after a short delay if Steam was just launched
Example fix
// before
client.Initialize(appId); // may throw CreateSteamPipe if Steam not running
// after
if (Process.GetProcessesByName("steam").Length == 0)
{
Console.Error.WriteLine("Start Steam first.");
return 1;
}
client.Initialize(appId); Defensive patterns
Strategy: try-catch
Validate before calling
var steamRunning = System.Diagnostics.Process.GetProcessesByName("steam").Length > 0; Try / catch
try { client.Initialize(appId); }
catch (ClientInitializeException e) when (e.Failure == ClientInitializeFailure.CreateSteamPipe)
{
// Steam not running/ready; wait and retry
} Prevention
- Ensure Steam is running and fully started before initializing
- Match user/elevation between Steam and your process
- Add a startup wait/retry loop for freshly launched Steam
When it happens
Trigger: Calling Client.Initialize(appId) while the Steam client process is not running, is starting up, or is in a bad state so CreateSteamPipe returns a zero handle.
Common situations: Steam not running at all; Steam still booting after boot/login; Steam running as a different user or elevated while the app is not (or vice versa); multiple conflicting Steam instances.
Understand the failure class
Background: ECONNREFUSED and "connection refused" / "could not connect to server" errors: what they mean and how to fix them — this error's family across 44 libraries.
Related errors
- failed to get Steam install path
- failed to load SteamClient
- failed to create ISteamClient018
- failed to connect to global user
- appID mismatch
AI-assisted analysis of gibbed/SteamAchievementManager@de8b71048a (2026-09-12).
Data as JSON: /api/errors/035b94d730969f23.
Report an issue: GitHub.
Appendix: source
Thrown at SAM.API/Client.cs:71
{
Environment.SetEnvironmentVariable("SteamAppId", appId.ToString(CultureInfo.InvariantCulture));
}
if (Steam.Load() == false)
{
throw new ClientInitializeException(ClientInitializeFailure.Load, "failed to load SteamClient");
}
this.SteamClient = Steam.CreateInterface<Wrappers.SteamClient018>("SteamClient018");
if (this.SteamClient == null)
{
throw new ClientInitializeException(ClientInitializeFailure.CreateSteamClient, "failed to create ISteamClient018");
}
this._Pipe = this.SteamClient.CreateSteamPipe();
if (this._Pipe == 0)
{
throw new ClientInitializeException(ClientInitializeFailure.CreateSteamPipe, "failed to create pipe");
}
this._User = this.SteamClient.ConnectToGlobalUser(this._Pipe);
if (this._User == 0)
{
throw new ClientInitializeException(ClientInitializeFailure.ConnectToGlobalUser, "failed to connect to global user");
}
this.SteamUtils = this.SteamClient.GetSteamUtils004(this._Pipe);
if (appId > 0 && this.SteamUtils.GetAppId() != (uint)appId)
{
throw new ClientInitializeException(ClientInitializeFailure.AppIdMismatch, "appID mismatch");
}
this.SteamUser = this.SteamClient.GetSteamUser012(this._User, this._Pipe);
this.SteamUserStats = this.SteamClient.GetSteamUserStats013(this._User, this._Pipe);
this.SteamApps001 = this.SteamClient.GetSteamApps001(this._User, this._Pipe);
this.SteamApps008 = this.SteamClient.GetSteamApps008(this._User, this._Pipe);View on GitHub (pinned to de8b71048a)