Skip to content

Discord (and other extensions) broken in Docker after send-deps extraction in #46301 #46443

@fakade2

Description

@fakade2

Summary

PR #46301 ("Fix configure startup stalls from outbound send-deps imports") extracted resolveOutboundSendDep from src/infra/outbound/deliver.ts into a new file src/infra/outbound/send-deps.ts, and updated extension imports accordingly. This breaks all affected extensions (Discord, Telegram, WhatsApp, Slack, Signal, iMessage, Matrix, MSTeams) when running in Docker.

Root Cause

Extensions use relative imports like:

import { resolveOutboundSendDep } from "../../../src/infra/outbound/send-deps.js";

This resolves to /app/src/infra/outbound/send-deps.js at runtime. In the Docker image, /app/src/ does not exist — it is stripped during the multi-stage build. Only /app/dist/ is copied into the final image.

The old import path (../../../src/infra/outbound/deliver.js) worked because deliver.ts was already part of the plugin-sdk build output. The new send-deps.ts was never registered as a plugin-sdk subpath entry, so the bundler does not emit it to the expected location.

The bundled version exists as a hashed file (e.g. /app/dist/outbound-send-deps-BFSj2ZTz.js), but nothing maps it to the path extensions expect.

Reproduction

docker build --build-arg OPENCLAW_INSTALL_BROWSER=1 -t openclaw:local .
docker run -d --name oc-local openclaw:local
docker exec oc-local ls /app/src/infra/outbound/
# -> directory does not exist
docker exec oc-local ls /app/dist/plugin-sdk/src/infra/outbound/
# -> empty directory

Discord extension fails to load with:

Error: Cannot find module '/app/src/infra/outbound/send-deps.js'

Affected Files (from #46301)

  • extensions/discord/src/outbound-adapter.ts
  • extensions/telegram/src/outbound-adapter.ts
  • extensions/telegram/src/channel.ts
  • extensions/whatsapp/src/outbound-adapter.ts
  • extensions/discord/src/channel.ts
  • extensions/imessage/src/channel.ts
  • extensions/matrix/src/outbound.ts
  • extensions/msteams/src/outbound.ts
  • extensions/signal/src/channel.ts
  • extensions/slack/src/channel.ts

Suggested Fix

Same pattern as other plugin-sdk subpaths:

  1. Create src/plugin-sdk/outbound-send-deps.ts that re-exports from ../infra/outbound/send-deps.js
  2. Add "outbound-send-deps" to pluginSdkEntrypoints in tsdown.config.ts
  3. Update extension imports to use the plugin-sdk subpath instead of relative ../../../src/ paths

Related

This is the same class of bug as #33266 (Matrix plugin fails in Docker due to missing keyed-async-queue subpath).

Environment

  • Commit: d9c285e (latest main as of 2026-03-14)
  • Platform: Docker on macOS (Apple Silicon)
  • Build: docker build --build-arg OPENCLAW_INSTALL_BROWSER=1 -t openclaw:local .

Workaround

Check out a commit prior to #46301 (e.g. d4ab73174 from 2026-03-07) and rebuild the Docker image.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions