Skip to content

[UD] PodmanLogin and InjectKubeConfig Requests Fail When Dashboard Runs in a Single Tab #23694

@olexii4

Description

@olexii4

Describe the bug

PodmanLogin and InjectKubeConfig Requests Fail When Dashboard Runs in a Single Tab.

When a workspace transitions to RUNNING status, the dashboard simultaneously triggers two parallel operations:

  1. Background API calls to inject kubeconfig and perform podman login into workspace containers
  2. UI navigation to redirect the browser to the workspace IDE URL

When the Eclipse Che Dashboard is running in a single browser tab (no additional tabs open), the injectKubeConfig and podmanLogin API requests can fail because the browser cancels pending HTTP requests when navigating away from the current page.

The Race Condition

┌─────────────────────────────────────────────────────────────────────────────┐
│                        WebSocket: Workspace RUNNING                         │
└─────────────────────────────────────────────────────────────────────────────┘
                                      │
              ┌───────────────────────┴───────────────────────┐
              ▼                                               ▼
┌─────────────────────────────────┐         ┌─────────────────────────────────┐
│    handleWebSocketMessage()     │         │   Redux Store Update            │
│                                 │         │   (workspace.status = RUNNING)  │
└─────────────────────────────────┘         └─────────────────────────────────┘
              │                                               │
              ▼                                               ▼
┌─────────────────────────────────┐         ┌─────────────────────────────────┐
│  async injectKubeConfig()       │         │  OpenWorkspace.runStep()        │
│  async podmanLogin()            │         │  detects workspace.isRunning    │
│                                 │         │                                 │
│  (HTTP POST requests start)     │         │  checks isAvailableEndpoint()   │
└─────────────────────────────────┘         └─────────────────────────────────┘
              │                                               │
              │                                               ▼
              │                             ┌─────────────────────────────────┐
              │                             │  tabManager.replace(ideUrl)     │
              │                             │  → window.location.replace()    │
              │                             └─────────────────────────────────┘
              │                                               │
              ▼                                               ▼
┌─────────────────────────────────┐         ┌─────────────────────────────────┐
│  ❌ HTTP Requests CANCELLED     │         │  ✓ Browser navigates to IDE     │
│  (page is navigating away)      │         │                                 │
└─────────────────────────────────┘         └─────────────────────────────────┘

Che version

7.112@latest

Steps to reproduce

  1. Deploy Eclipse Che
  2. (Optional) Configure external docker registries in the Dashboard to make the issue more visible
  3. Open the Eclipse Che Dashboard in a browser: {che-server}/dashboard/
  4. Close all other browser tabs - ensure the dashboard is running in the only open tab
  5. Open browser DevTools → Network tab (filter by "XHR" or "Fetch" for clarity)
  6. Navigate to a factory URL by changing the browser address to:
    {che-server}/dashboard/#https://registry.devfile.io/devfiles/nodejs-mongodb/1.0.0
    
  7. Observe the workspace creation and starting process in the Network tab
  8. When the workspace transitions to RUNNING:
    • Note the kubeconfig POST request is initiated
    • Observe that the page immediately redirects to the IDE URL
    • The kubeconfig request shows as "cancelled" status in the Network tab

Note: Due to the sequential nature of the API calls (injectKubeConfig is called first, then podmanLogin), the behavior depends on network timing:

  • If the IDE URL availability check (isAvailableEndpoint) takes longer, kubeconfig may complete successfully, but podmanlogin will still be cancelled
  • If the IDE URL is immediately available, both requests will be cancelled

Expected behavior

The injectKubeConfig and podmanLogin API calls should complete successfully before the browser navigates to the IDE URL, ensuring that:

  1. The kubeconfig is properly injected into workspace containers
  2. Podman is authenticated with the OpenShift internal registry
  3. Podman is authenticated with any external docker registries configured by the user

Runtime

OpenShift

Screenshots

Image

Installation method

chectl/latest

Environment

macOS

Eclipse Che Logs

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/dashboardkind/bugOutline of a bug - must adhere to the bug report template.severity/P1Has a major impact to usage or development of the system.team/AThis team is responsible for the Che Operator and all its operands as well as chectl and Hosted Che

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions