Eriksson Beam API
Search Results for

    Show / Hide Table of Contents

    Connection Issues

    This guide covers common connection problems and their solutions.

    Eriksson Beam Not Running

    Error: ErikssonBeamNotRunningException

    Symptoms:

    • "Unable to find an active instance of Eriksson Beam"
    • "Reached maximum attempt count while trying to connect"

    Causes and Solutions

    1. Eriksson Beam Application Not Started

    Solution: Start the Eriksson Beam desktop application before running your code.

    // Check if any instances are available
    var instances = await ErikssonBeamFinder.GetSupportedErikssonBeamInstances();
    if (instances.Length == 0)
    {
        Console.WriteLine("Please start Eriksson Beam first.");
        return;
    }
    

    2. 10-Minute Idle Timeout Exceeded

    Eriksson Beam only listens for API connections for 10 minutes after launch.

    Solution: Restart Eriksson Beam and connect within 10 minutes.

    catch (ErikssonBeamNotRunningException)
    {
        Console.WriteLine("Cannot connect. The 10-minute API window may have expired.");
        Console.WriteLine("Please restart Eriksson Beam and try again.");
    }
    

    Important: The 10-minute timer is NOT reset by interacting with the Eriksson Beam UI. Only restarting the application resets it.

    3. Wrong Process ID

    If using ErikssonBeamClient.AttemptConnection with a specific process ID:

    Solution: Verify the process ID is correct.

    // Get list of valid process IDs
    var validIds = await ErikssonBeamFinder.GetSupportedErikssonBeamInstances();
    Console.WriteLine($"Available process IDs: {string.Join(", ", validIds)}");
    
    // Use a valid ID
    if (validIds.Length > 0)
    {
        args.ProcessID = validIds[0];
        var client = await ErikssonBeamClient.AttemptConnection(args);
    }
    

    Connection Timeout

    Error: TimeoutException or OperationCanceledException

    Symptoms:

    • Connection attempts exhaust without success
    • Operations hang and eventually fail

    Causes and Solutions

    1. Insufficient Connection Attempts

    Solution: Increase MaxAttempts and WaitTimeBetweenAttemptsMs:

    var args = new ErikssonBeamConnectionAttemptArgs
    {
        LicenseKey = licenseKey,
        MaxAttempts = 20,              // Increased from default 10
        WaitTimeBetweenAttemptsMs = 2000  // Increased from default 1000
    };
    

    2. Idle Timeout Too Short

    Solution: Increase IdleTimeoutMs for complex operations:

    var args = new ErikssonBeamLauncherArgs
    {
        LicenseKey = licenseKey,
        ExecutablePath = exePath,
        IdleTimeoutMs = 120000  // 2 minutes instead of default 30 seconds
    };
    

    License Validation Failed

    Error: ServerErrorException with ResponseCode.LicenseError

    Symptoms:

    • "License validation failed"
    • Operations rejected with license error

    Causes and Solutions

    1. Invalid API License Key

    Solution: Verify your API license key is correct:

    var licenseKey = Environment.GetEnvironmentVariable("ERIKSSON_LICENSE_KEY");
    Console.WriteLine($"License key length: {licenseKey?.Length ?? 0}");
    Console.WriteLine($"Starts with: {licenseKey?.Substring(0, 4) ?? "null"}...");
    

    2. API License Key Not Set

    Solution: Set the environment variable:

    Windows Command Prompt:

    setx ERIKSSON_LICENSE_KEY "YOUR-LICENSE-KEY-HERE"
    

    PowerShell:

    [Environment]::SetEnvironmentVariable("ERIKSSON_LICENSE_KEY", "YOUR-KEY", "User")
    

    3. Expired License

    Solution: Contact Eriksson Software for license renewal.

    4. Network Issues (First Validation)

    The first validation requires network access to Eriksson Software's license server.

    Solution: Ensure internet connectivity for initial validation. Subsequent validations are cached for 7 days.

    Version Mismatch

    Error: ServerErrorException with ResponseCode.VersionError

    Symptoms:

    • "Version mismatch"
    • API rejected due to incompatibility

    Causes and Solutions

    1. API DLL Version Doesn't Match Eriksson Beam

    Solution: Ensure you're using the API package version that matches your Eriksson Beam installation.

    // Check for supported instances (filters by version)
    var instances = await ErikssonBeamFinder.GetSupportedErikssonBeamInstances();
    
    // If empty, version may be incompatible
    if (instances.Length == 0)
    {
        Console.WriteLine("No compatible Eriksson Beam instances found.");
        Console.WriteLine("Ensure your API version matches your Eriksson Beam installation.");
    }
    

    Named Pipes Issues

    Error: ErikssonBeamConnectionException

    Symptoms:

    • "Failed to connect to named pipe"
    • Connection immediately fails

    Causes and Solutions

    1. Permissions Issue

    Named pipes may fail if running with different permission levels.

    Solution: Run both your application and Eriksson Beam with the same privilege level.

    2. Security Software Blocking

    Antivirus or firewall may block named pipe communication.

    Solution: Add exceptions for:

    • Your application executable
    • ErikssonBeam.exe
    • Named pipe communication (local IPC)

    Diagnostic Steps

    1. Verify Eriksson Beam is Detectable

    Console.WriteLine("Checking for Eriksson Beam instances...");
    
    var instances = await ErikssonBeamFinder.GetSupportedErikssonBeamInstances();
    
    if (instances.Length == 0)
    {
        Console.WriteLine("No instances found.");
        Console.WriteLine("Ensure Eriksson Beam is running and was started within 10 minutes.");
    }
    else
    {
        Console.WriteLine($"Found {instances.Length} instance(s):");
        foreach (var pid in instances)
        {
            Console.WriteLine($"  Process ID: {pid}");
        }
    }
    

    2. Test Connection with Verbose Logging

    using Microsoft.Extensions.Logging;
    
    var loggerFactory = LoggerFactory.Create(builder =>
    {
        builder.AddConsole().SetMinimumLevel(LogLevel.Trace);
    });
    var logger = loggerFactory.CreateLogger<Program>();
    
    var args = new ErikssonBeamConnectionAttemptArgs
    {
        LicenseKey = licenseKey,
        MaxAttempts = 5,
        WaitTimeBetweenAttemptsMs = 2000
    };
    
    try
    {
        var client = await ErikssonBeamFinder.GetFirstSupportedBeamClient(args, logger);
        Console.WriteLine("Connection successful!");
        client.Dispose();
    }
    catch (Exception ex)
    {
        Console.WriteLine($"Connection failed: {ex.GetType().Name}");
        Console.WriteLine($"Message: {ex.Message}");
    }
    

    See Also

    • Data Issues - Data operation problems
    • FAQ - Common questions
    • License Setup - License configuration
    • Edit this page
    In this article
    Back to top Generated by DocFX