Skip to content

WebSocket Code Execution Failing in Production #73

@igortullio

Description

@igortullio

Problem Description

The WebSocket-based code execution feature (REPL functionality) is not working in production environment. Users can connect via WebSocket but code execution fails, likely due to missing Docker base images that are required for running user code in containers.

Current Behavior

  • WebSocket connection establishes successfully
  • Code execution fails when trying to run user code in Docker containers
  • Error occurs during container creation/execution phase

Expected Behavior

  • WebSocket connection should establish
  • User code should execute successfully in appropriate language containers
  • Output should be streamed back via WebSocket

Root Cause Analysis

After investigating the codebase and testing locally, I identified that the issue is maybe related to missing Docker base images in the production environment.

Local Testing Findings:

  • Initially experienced the same issue locally when base images weren't built
  • After following the README instructions to build base images locally (docker build -t js-base ., docker build -t py-base ., etc.), the functionality worked correctly
  • This confirms the base images are a critical dependency for the REPL functionality

Screenshots/Evidence

  • Production: ❌ Fails
Image
  • Local: ✅ Works after building base images manually
Image

Priority

High - This affects core functionality of the platform where users submit code for execution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Now

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions