createResidentRunner().exec() always fails: "Cannot resolve module 'data:text/javascript;base64,...'"
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 58/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- node.js, typescript
调研方向
从文档记录的 NodeRuntime.createResidentRunner() 和 NodeRuntimeResidentRunner.exec() 流程开始,在受影响的软件包版本上使用提供的代码片段重现该故障。检查 resident runner 如何解析提交的 data:text/javascript 模块;当重复调用 exec() 返回 exitCode 0,且 stdout 包含代码片段的输出而没有 resolver 错误时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Summary
NodeRuntime.createResidentRunner() / NodeRuntimeResidentRunner.exec() (documented at https://secureexec.dev/docs/features/resident-runner) fails on every single call, regardless of the code snippet's content. Confirmed reproducible on both the latest (0.3.3) and rc (0.3.4-rc.1) npm dist-tags.
Environment
secure-execversions tested:0.3.3(latest) and0.3.4-rc.1(rc)- Node.js: v24.18.0
- OS: macOS, darwin-arm64 (
@secure-exec/sidecar-darwin-arm64)
Repro
import { NodeRuntime } from "secure-exec";
const runtime = await NodeRuntime.create();
const runner = await runtime.createResidentRunner();
const result = await runner.exec(`console.log("hello");`);
console.log(result);
Expected
Per the docs: "A warm resident evaluation runs in roughly a millisecond" — the snippet should execute successfully (exitCode: 0, stdout containing hello).
Actual
Every call returns exitCode: 1 with the same class of error, e.g.:
{
stdout: '',
stderr: "Error: Cannot resolve module 'data:text/javascript;base64,Y29uc29sZS5sb2coImhlbGxvIik7#0' (imported from '/tmp/secure-exec-program-0.mjs'): not found. For a bare package, ensure it is installed in a node_modules directory on an ancestor of the importer (or bundle the entrypoint). If you mounted a host node_modules, point it at a directory that contains every symlink target (e.g. the workspace root): symlinks that escape the mount root are not followed.\n at /tmp/secure-exec-program-0.mjs:238:65",
exitCode: 1
}
This happens for:
- The same snippet repeated 5x in a row
- 5 distinct/unique snippets in a row
- A trivial
globalThis.counter++-style state test
i.e. it's not content-dependent — every single exec() call on a resident runner fails the same way.
Suspected root cause
The resident runner appears to work by running a small REPL-style loop inside the guest that evaluates each submitted snippet via a dynamic import() of a data:text/javascript;base64,... URL. The guest's module resolver doesn't seem to recognize the data: URL scheme as a special case — the error message ("ensure it is installed in a node_modules directory... ") reads like the resolver is falling through to its bare-specifier/node_modules lookup path instead of treating it as an inline module to evaluate directly. This would explain why the failure is 100% reproducible and independent of the snippet's content.
Given it reproduces identically on both 0.3.3 and 0.3.4-rc.1, this doesn't look like something recently fixed on the rc line.
Impact
This blocks the documented "trusted, repeated evaluation" use case (REPLs, eval loops, per-tenant persistent runtime reuse) that createResidentRunner() is specifically meant for — right now it's unusable for any real workload since 100% of calls fail.
Happy to provide more repro details/logs if useful.
- 主要语言
- TypeScript
- 星标
- 1k
- 派生
- 54
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rivet-dev/dynamic-apps 的其他 Issue
-
Build cache ignores maxResponseBytes, potentially reusing an outdated response limit可能已有人在做 @Utkarshpandey0001 于 19 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 78/100
rivet-dev/dynamic-apps#297 ·
-
Make agentOS runtime classifier content-based (match Linux exec semantics), not extension-based可能已有人在做 @mittal-parth 于 24 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 48/100
rivet-dev/dynamic-apps#275 ·
-
难度 4/5 3-5 天 新手友好度 55/100
rivet-dev/dynamic-apps#272 ·
-
Treat the WASM/WASI build target as cfg(unix) so filesystem tools need no per-tool mode-bit patches未关闭
难度 5/5 一周以上 新手友好度 35/100
rivet-dev/dynamic-apps#271 ·
-
难度 5/5 一周以上 新手友好度 42/100
rivet-dev/dynamic-apps#178 ·
查看 rivet-dev/dynamic-apps 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 85/100
lukilabs/beautiful-mermaid#160 ·
-
难度 2/5 1-3 小时 新手友好度 66/100
rescript-lang/rescript-lang.org#1420 ·
维护者通常 2 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
chthollyphile/folia-major#520 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
databuddy-analytics/Databuddy#1106 ·
维护者通常 1 天内回复