Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

createResidentRunner().exec() always fails: "Cannot resolve module 'data:text/javascript;base64,...'"

Aperta
#280 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
58/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
node.js, typescript
Ambito
backend, security

Direzione di ricerca

Inizia con il flusso documentato di NodeRuntime.createResidentRunner() e NodeRuntimeResidentRunner.exec(), riproducendo il fallimento con lo snippet fornito nelle versioni interessate del pacchetto. Esamina come il resident runner risolve il modulo data:text/javascript inviato; il lavoro è completato quando chiamate ripetute a exec() restituiscono exitCode 0 e stdout contiene l’output dello snippet senza l’errore del resolver.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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-exec versions tested: 0.3.3 (latest) and 0.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.

Lingua principale
TypeScript
Stelle
1k
Fork
54
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di rivet-dev/dynamic-apps

Tutte le issue di rivet-dev/dynamic-apps

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.