🐛 Bug Report: a non-string header value crashes the whole browser service
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 15/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- bun, playwright, typescript
Línea de trabajo
Start with the header schemas and the page.route handlers in src/routes/screenshots.ts and the corresponding reports route. Check how non-string header values are validated and how route callback errors are handled; the report says the failure occurs at screenshots.ts:64. Done means malformed headers return a 400 response, the service stays up, and a regression test covers both endpoints and non-string values.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
👟 Reproduction steps
- Start the service (
docker compose up, orbun run src/server.ts). - Send a header whose value is not a string:
curl -X POST localhost:3000/v1/screenshots -H 'content-type: application/json' \ -d '{"url":"https://example.com","headers":{"X-Retry":1}}' - The request gets no response, and
GET /v1/healthnow fails: the server process has exited.
Same for POST /v1/reports, and for true, null, arrays or objects as the value.
👍 Expected behavior
A 400 validation error, like any other malformed field; the service keeps running.
👎 Actual Behavior
The schemas accept any JSON value for headers (z.record(z.string(), z.any())), but Playwright's
route.continue() only takes string values. It throws inside the page.route handler, nothing catches
the rejection, and Bun exits:
error: continue: headers[6].value: expected string, got number
at .../src/routes/screenshots.ts:64:24
Every other capture in flight fails with it.
🎲 Appwrite version
Different version (specify in environment)
💻 Operating system
MacOS
🧱 Your Environment
appwrite/docker-browser main @ 3856d53, run locally with Bun 1.3.2 (the Dockerfile's version) and Google Chrome on macOS arm64.
👀 Have you spent some time to check if this issue has been raised before?
- I checked and didn't find similar issue
🏢 Have you read the Code of Conduct?
- I have read the Code of Conduct
I have a fix with a regression test ready. Could this be assigned to me so I can open a PR?
- Lenguaje dominante
- TypeScript
- Estrellas
- 8
- Forks
- 3
- Merge medio
- 3 d 8 h
- PR fusionados (30 d)
- 4
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
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 appwrite/docker-browser
-
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
appwrite/docker-browser#20 ·
-
Curl not working anymore.Abiertodocumentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 52/100
appwrite/docker-browser#15 ·
Todos los issues de appwrite/docker-browser
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
scaleway/ultraviolet#7089 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
tencent-connect/dsh-qqbot#81 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: Pen taps on sidebar rows start a drag and lose their clickPosiblemente ocupada @makhnatkin la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
clangd/vscode-clangd#1009 ·