Skip to content

IBC cannot find "IB API" toggle button in IB Gateway 10.37 - mode selection fails silently #334

@Petr-Trader

Description

@Petr-Trader

Environment

  • IBC Version: 3.23.0
  • IB Gateway Version: 10.37 (stable)
  • OS: Windows 11
  • Java: Zulu 17.0.10

Problem Description

When starting IB Gateway 10.37 via IBC with FIX=no configuration, IBC should select "IB API" mode on the login screen. However, IBC fails to find the "IB API" toggle button and proceeds directly to login without selecting the API mode.

This results in Gateway starting in FIX CTCI mode instead of IB API mode. The API socket opens on the configured port but does not respond to IB API protocol.

Expected Behavior

  1. IBC detects the Gateway login dialog
  2. IBC finds and clicks the "IB API" button (since FIX=no)
  3. Gateway starts in IB API mode

Actual Behavior

  1. IBC detects the Gateway login dialog ✓
  2. IBC skips mode selection (no button found)
  3. Log shows NO entry about IB API/FIX selection
  4. Gateway starts in FIX CTCI mode (default)

IBC Log Evidence

2025-12-30 22:52:07:213 IBC: using default login manager
2025-12-30 22:52:09:160 IBC: Login dialog WINDOW_OPENED: LoginState is LOGGED_OUT
2025-12-30 22:52:09:162 IBC: Setting Trading mode = live
2025-12-30 22:52:09:265 IBC: Login attempt: 1
2025-12-30 22:52:09:280 IBC: Click button: Log In

Note: No log entry about clicking "IB API" selector.

Root Cause Analysis

Looking at GatewayLoginFrameHandler.java, the switchToIBAPI() method uses SwingUtils.findToggleButton(window, "IB API"). Gateway 10.37 appears to have changed the UI component type - it may no longer be a JToggleButton.

Workaround

Using keyboard automation (Tab + Space) to select IB API mode works, confirming the button IS present and functional, just not detected by IBC's findToggleButton().

Steps to Reproduce

  1. Install IB Gateway 10.37 (stable) on Windows
  2. Configure IBC 3.23.0 with FIX=no
  3. Run IBC to start Gateway
  4. Observe: No "Clicking IB API selector" in log
  5. Try connecting via IB API protocol - connection times out

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions