Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

fix(install): install-from-source sends no User-Agent, so GitHub rejects it

Abierto Apto para principiantes
#2,842 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
75/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
node.js, typescript

Línea de trabajo

Look at the install-from-source command's download logic, likely in a file handling HTTP requests. The issue mentions that since #1692, User-Agent is missing. Find where the request is made (maybe using fetch or a library like node-fetch) and ensure a default User-Agent header is added. Write a test to verify the header is present and can be overridden. Run the existing test suite with pnpm check:affected --run.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Purpose

Since #1692, app-source downloads send no User-Agent, and api.github.com answers 403 without one. Before #1692, fetch sent user-agent: node, so GitHub artifact URLs used to work.

Reproduction

This needs the workaround from #2840:

agent-device daemon stop
NODE_OPTIONS=--no-network-family-autoselection agent-device install-from-source \
  https://api.github.com/repos/<owner>/<repo>/actions/artifacts/<id>/zip \
  --header "authorization:Bearer $GITHUB_TOKEN" --platform android

Expected: the artifact downloads and installs.
Actual: Failed to download app source: 403.

The same thing happens with curl: curl -H 'User-Agent:' https://api.github.com/repos/callstack/agent-device returns 403, while plain curl returns 200.

Required behavior

  • Requests send a User-Agent by default. A caller can still set their own.

Completion conditions

  • A test checks that a request carries the default User-Agent, and that a caller's value replaces it.
  • A manual run of install-from-source against a GitHub artifact URL succeeds. Record the command in the PR.
  • pnpm check:affected --run is green.

Dependencies

  • You can only see this on a real download once #2840 is fixed. The fix and its test don't need #2840.
Lenguaje dominante
TypeScript
Estrellas
4.7k
Forks
304
Merge medio
11 h 29 min
PR fusionados (30 d)
514

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de callstack/agent-device

Todos los issues de callstack/agent-device

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.