Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

🐛 Bug Report: a non-string header value crashes the whole browser service

Aberta
#22 1 comentário 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
2/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
15/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
bun, playwright, typescript
Domínio
api, backend

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

👟 Reproduction steps
  1. Start the service (docker compose up, or bun run src/server.ts).
  2. 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}}'
    
  3. The request gets no response, and GET /v1/health now 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 a fix with a regression test ready. Could this be assigned to me so I can open a PR?

Linguagem predominante
TypeScript
Estrelas
8
Forks
2
Merge médio
3d 8h
PRs com merge (30d)
4

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de appwrite/docker-browser

Todas as issues de appwrite/docker-browser

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.