LykosAI/StabilityMatrix · error · ProcessException

dotnet8 with args [ ] failed with exit code

Error message

dotnet8 with args [{args}] failed with exit code {process.ExitCode}:
{process.StandardOutput}
{process.StandardError}

What it means

RunDotnet launches dotnet8 (e.g. for packages like SWARM or other dotnet-based backends) and throws ProcessException containing args, exit code, stdout, and stderr on any nonzero exit. It is the dotnet execution wrapper for Linux package requirements.

Solutions

  1. Read the exception's stdout/stderr to find the actual dotnet failure and fix accordingly.
  2. Install .NET 8 runtime (and ASP.NET Core runtime if the package hosts a web server) so 'dotnet8' resolves.
  3. Install missing native dependencies (e.g. libicu) reported by dotnet on minimal distros.
  4. Verify the dotnet binary path/alias used by Stability Matrix matches your system's dotnet installation.
Defensive patterns

Strategy: try-catch

Validate before calling

var dotnet = which("dotnet8"); // verify presence and version
if (string.IsNullOrEmpty(dotnet)) throw new Exception("dotnet8 runtime is required");

Try / catch

try { await helper.RunDotnet(args); }
catch (ProcessException ex)
{ logger.Error(ex, "dotnet8 step failed; see stdout/stderr in message"); }

Prevention

When it happens

Trigger: A dotnet8 invocation exits nonzero — runtime not installed/wrong version, missing ASP.NET runtime for a web package, missing shared libraries on the distro, or the launched app crashing at startup.

Common situations: dotnet8 not present on PATH (dotnet installed only under a different name/version); running a package needing .NET 8 on a distro without libicu or other libs; app-level startup crash visible in the exception's stdout/stderr.

Related errors


AI-assisted analysis of LykosAI/StabilityMatrix@af93d6ef57 (2026-09-12). Data as JSON: /api/errors/17e5a2d78b600200. Report an issue: GitHub.

Appendix: source

Thrown at StabilityMatrix.Avalonia/Helpers/UnixPrerequisiteHelper.cs:511

        );

        if (!waitForExit)
            return process;

        await process.WaitForExitAsync();

        if (process.ExitCode == 0)
            return process;

        Logger.Error(
            "dotnet8 with args [{Args}] failed with exit code " + "{ExitCode}:\n{StdOut}\n{StdErr}",
            args,
            process.ExitCode,
            process.StandardOutput,
            process.StandardError
        );

        throw new ProcessException(
            $"dotnet8 with args [{args}] failed with exit code"
                + $" {process.ExitCode}:\n{process.StandardOutput}\n{process.StandardError}"
        );
    }

    [SupportedOSPlatform("Linux")]
    [SupportedOSPlatform("macOS")]
    public async Task InstallNodeIfNecessary(IProgress<ProgressReport>? progress = null)
    {
        // NOTE TO FUTURE DEVS: if this is causing merge conflicts with dev, just nuke it we don't need anymore
        if (NodeDir.Exists)
        {
            try
            {
                var result = await RunNode("-v");
                if (result.Contains("20.19.3"))
                {
                    Logger.Debug("Node.js already installed at {NodeExistsPath}", NodeDir);

View on GitHub (pinned to af93d6ef57)