createResidentRunner().exec() always fails: "Cannot resolve module 'data:text/javascript;base64,...'"
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 58/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- node.js, typescript
Hướng nghiên cứu
Bắt đầu với luồng NodeRuntime.createResidentRunner() và NodeRuntimeResidentRunner.exec() đã được ghi lại, tái hiện lỗi bằng snippet được cung cấp trên các phiên bản package bị ảnh hưởng. Kiểm tra cách resident runner phân giải module data:text/javascript được gửi; hoàn tất khi các lần gọi exec() lặp lại trả về exitCode 0 và stdout chứa đầu ra của snippet mà không có lỗi resolver.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 1k
- Fork
- 54
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của rivet-dev/dynamic-apps
-
Build cache ignores maxResponseBytes, potentially reusing an outdated response limitCó thể đã có người làm @Utkarshpandey0001 đã nhận 30 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 78/100
rivet-dev/dynamic-apps#297 ·
-
Make agentOS runtime classifier content-based (match Linux exec semantics), not extension-basedCó thể đã có người làm @mittal-parth đã nhận 35 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
rivet-dev/dynamic-apps#275 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 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Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
rivet-dev/dynamic-apps#271 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 42/100
rivet-dev/dynamic-apps#178 ·
Tất cả issue của rivet-dev/dynamic-apps
Issue tương tự
-
DQ assisgnment closing at CRĐang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
equinor/prisma-decision-web#919 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[DC] OneLogin sync imports a partial user list when an API request failsCó thể đã có người làm @RaphaelFakhri đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
bitwarden/directory-connector#1276 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
home-assistant/installer#324 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Mondriaan
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
knaw-huc/textannoviz#733 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày