CLI accepts an esbuild version outside its declared range, producing corrupt sourcemaps
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- node.js, typescript
- Área
- backend, build-system
Línea de trabajo
Start by tracing the loadConfig → buildWorker build path and the esbuild version resolved under npm overrides; the report compares emitted sourcemaps across esbuild versions. Then read entryPoints/managed-run-worker.js and otel/utils.ts for the stack-handling impact. Done means addressing a clearly chosen safeguard and verifying it against the reported reproduction, including sourcemap index bounds if validation is chosen.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What happened
[email protected] declares esbuild ^0.23.0. Our repo had a root-level npm overrides entry pinning esbuild to 0.25.0, added for GHSA-67mh-4wv8-2f99. npm honours the override, so the CLI bundled with 0.25.0 without warning.
esbuild 0.25.0 has an out-of-bounds source-index regression, fixed in 0.25.1, that drops input sources entries while keeping the mapping indices. Two of our deployed chunks came out internally inconsistent:
trigger/slack-attention-agent.mjs.map: 6sources, mappings referencing index 37- a shared
aichunk: 171sources, mappings referencing index 200
Impact
The worker installs source-map-support globally (entryPoints/managed-run-worker.js). Once a stack contained a frame from either chunk, originalPositionFor threw Error: No element indexed by 6. recordSpanException (otel/utils.ts) and the AI SDK's default error handler (console.error(error)) both read .stack without a guard, so that exception replaced the error being reported.
Every chat.agent turn failed for a week with No element indexed by 6. The original error never surfaced anywhere, including in streamText's onError, which received the substituted message instead. Scheduled tasks on the same deployment kept working, because they never format a stack.
Reproduction
Trigger project on runtime: node-22 with [email protected] and @ai-sdk/[email protected], plus npm overrides: { "esbuild": "0.25.0" }. Build through loadConfig -> buildWorker, then decode each emitted .map and check that every source index is below sources.length:
- esbuild 0.25.0: 42 of 44 maps valid
- esbuild 0.23.1: 44 of 44
- esbuild 0.28.2: 44 of 44
Suggested changes
- Warn or fail when the resolved
esbuildversion falls outside the CLI's declared range. This alone would have surfaced the problem on the first deploy. - Validate emitted sourcemaps before imaging. Checking index bounds is cheap, and the corruption is otherwise invisible until something throws.
- Guard
.stackaccess in error reporting so a malformed map cannot replace the error being reported.
Happy to open a PR for 1 or 3.
- Lenguaje dominante
- TypeScript
- Estrellas
- 16.5k
- Forks
- 1.5k
- Merge medio
- 1 d 15 h
- PR fusionados (30 d)
- 17
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de triggerdotdev/trigger.dev
-
bug: retry.fetch ignores the caller's abort signal and retries aborted requestsQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
triggerdotdev/trigger.dev#5116 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
bug: Chat transport crashes on Safari < 17.4: AbortSignal.any is not a functionQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
triggerdotdev/trigger.dev#5098 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
bug: Side menu items lose their active state on detail pagesQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
triggerdotdev/trigger.dev#5088 ·
Los mantenedores suelen responder en 1 día
-
bug: RBAC loader logs "plugin found but failed to load" when @triggerdotdev/plugins is simply not installedQuizá libre de nuevo @itsfaryal la tomó hace 17 días y no hay ningún pull request abierto. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
triggerdotdev/trigger.dev#5083 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
triggerdotdev/trigger.dev#5072 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de triggerdotdev/trigger.dev
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
bug platform-android
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Termix-SSH/Mobile#146 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
devswha/herdr-web-ui#3875 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
-
area: runtime chore cli consistency dependencies developer-experience difficulty: easy discovery documentation enhancement good first issue help wanted hygiene json-output packaging priority: P3 tests version
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día