Version
@cloudflare/sandbox@0.12.1
Summary
ExecOptions accepts signal?: AbortSignal, but passing one to getSandbox(...).exec(command, { signal }) throws before the command runs:
DataCloneError: AbortSignal serialization is not enabled.
The options object is structured-cloned across the Worker→DO RPC boundary, and AbortSignal isn't cloneable, so the call fails rather than the signal being honored or ignored.
Repro
From a Worker with a Sandbox binding:
const sandbox = getSandbox(env.Sandbox, 'repro');
const controller = new AbortController();
await sandbox.exec('echo hi', { signal: controller.signal });
// -> DataCloneError: AbortSignal serialization is not enabled.
Expected
Passing signal shouldn't throw — either it cancels the command or it's a documented no-op on this path.
Version
@cloudflare/sandbox@0.12.1Summary
ExecOptionsacceptssignal?: AbortSignal, but passing one togetSandbox(...).exec(command, { signal })throws before the command runs:The options object is structured-cloned across the Worker→DO RPC boundary, and
AbortSignalisn't cloneable, so the call fails rather than the signal being honored or ignored.Repro
From a Worker with a Sandbox binding:
Expected
Passing
signalshouldn't throw — either it cancels the command or it's a documented no-op on this path.