Skip to content

Runtime Breaking Change: Cannot assign to read only property 'console' #163

@handfuloflight

Description

@handfuloflight

Bug Report: Runtime Breaking Change - Cannot assign to read only property 'console'

Summary

Starting approximately 8:26 PM UTC on November 5, 2025, all workflow executions began failing with a TypeError: Cannot assign to read only property 'console' error during environment setup. This affects both stable and alpha versions of @convex-dev/workflow.

Error Details

Full Error Message

Uncaught TypeError: Cannot assign to read only property 'console' of object '#<ii>'
    at setupEnvironment (../../../../node_modules/@convex-dev/workflow/src/client/environment.ts:81:6)
    at handler (../../../../node_modules/@convex-dev/workflow/src/client/workflowMutation.ts:106:6)
    at async handler (../../../../node_modules/@convex-dev/workflow/src/component/workflow.ts:55:8)
    at async start [as start] (../../../../node_modules/@convex-dev/workflow/src/client/index.ts:144:6)

Error Location

The error occurs in setupEnvironment() when attempting to replace the global console object:

// environment.ts:81 (0.2.7) or line 103 (0.2.8-alpha.11)
global.console = createConsole(global.console as Console, getGenerationState);

Affected Versions

  • Confirmed broken: @convex-dev/workflow@0.2.7 (stable)
  • Confirmed broken: @convex-dev/workflow@0.2.8-alpha.11 (alpha)
  • 🔍 Likely affected: All versions that use setupEnvironment() with console patching

Environment

  • Convex Runtime Version: Appears to be a backend runtime change (no client version bump)
  • Client Library: convex@1.28.0
  • Started: ~November 5, 2025, 8:26 PM UTC
  • Node.js Runtime: Default (Node 18)
  • Deployment: Convex Cloud

Root Cause Analysis

The Convex runtime environment has changed global.console to have writable: false in its property descriptor. This prevents the workflow library from replacing it with a wrapped Proxy version needed for deterministic logging.

Before: Object.getOwnPropertyDescriptor(global, 'console').writable === true
After: Object.getOwnPropertyDescriptor(global, 'console').writable === false

This appears to be a security hardening change or side effect of a runtime update that was not communicated or documented.

Impact

Critical Production Impact

  • All workflow executions fail immediately during initialization
  • In-progress workflows cannot resume from saved state
  • Any API calls that trigger workflows fail completely
  • Applications using workflows for orchestration are completely broken

Production Impact

Applications using workflows for multi-step orchestration and durable execution are completely non-functional.

Steps to Reproduce

  1. Install @convex-dev/workflow@0.2.7 or @convex-dev/workflow@0.2.8-alpha.11
  2. Define any workflow using WorkflowManager
  3. Attempt to start the workflow via workflow.start()
  4. Observe TypeError: Cannot assign to read only property 'console'

Expected Behavior

Workflows should initialize successfully and execute as designed.

Actual Behavior

All workflows crash during environment setup with a console property assignment error.

Workaround Attempts

  • ❌ Downgrading to 0.2.7 - Still fails
  • ❌ Upgrading to 0.2.8-alpha.11 - Still fails
  • ⚠️ Only option: Disable all workflows (not viable for production)

Potential Solutions

Option 1: Revert Runtime Change (Quick Fix)

Make global.console writable again in the Convex runtime environment.

Option 2: Update Workflow Library (Proper Fix)

Use Object.defineProperty() instead of direct assignment:

Object.defineProperty(global, 'console', {
  value: createConsole(global.console as Console, getGenerationState),
  writable: true,
  enumerable: true,
  configurable: true
});

Option 3: Provide Alternative API

Expose a Convex-native console wrapper that workflows can use without patching globals.

Additional Context

  • No GitHub issues filed by other users yet (we may be first to hit this)
  • Convex Status page shows no incidents on Nov 5
  • No release notes or changelogs documenting this change
  • Timing suggests silent backend runtime rollout

Request for Convex Team

  1. Immediate: Can you confirm this is a known runtime change?
  2. Urgent: What is the timeline for a fix or workaround?
  3. Communication: Please document breaking runtime changes in release notes

This is a critical production blocker for any application using workflows.


Time Started: November 5, 2025, ~8:26 PM UTC
Affected: Production application using workflows

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