cloudflare / cloudflare/workers-sdk

wrangler dev not allocating TTY to containers

Open
#10,277 4 comments 0 reactions 0 assignees View on GitHub
product:containers upstream:workerd
Dominant language
TypeScript
Stars
4.5k
Forks
1.5k
Avg merge
3d 8h
Merged PRs (30d)
186

Description

### What versions & operating system are you using?

wrangler v4.28.1

### Please provide a link to a minimal reproduction

https://github.com/mckamyk/electric-wrangler

### Describe the Bug

The electric-sql docker image is an elixir project, and it is built such that it expects a tty. When running this container in `wrangler dev` the application crashes instantly with an error message that seems to indicate that it doesn't have a tty.

When running with the same Dockerfile standard `docker build .` and `docker run`, it runs just fine.

### Please provide any relevant error logs

The logs of the workerd spawn container are as follows:
```
=ERROR REPORT==== 7-Aug-2025::21:37:29.969922 ===
** State machine user_drv terminating
** When server state = {undefined,undefined}
** Reason for termination = error:undef
** Callback modules = [user_drv]
** Callback mode = state_functions
** Stacktrace =
** [{erlang,nif_error,[undef],[{error_info,#{module => erl_erts_errors}}]},
{prim_tty,isatty,1,[{file,"prim_tty.erl"},{line,1473}]},
{user_drv,init,1,[{file,"user_drv.erl"},{line,171}]},
{gen_statem,init_it,6,[{file,"gen_statem.erl"},{line,3323}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,333}]}]
```
Which LLMs point to this being an error about `isatty` not being present.

The logs produced by wrangler look like standard "cant connect to port" indicating that the container isn't live.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.