fix(install): install-from-source sends no User-Agent, so GitHub rejects it
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- node.js, typescript
- Domain
- backend-api-design, cli
Research direction
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.
Written by the indexing model from the issue text.
Description
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-Agentby 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-sourceagainst a GitHub artifact URL succeeds. Record the command in the PR. pnpm check:affected --runis green.
Dependencies
- You can only see this on a real download once #2840 is fixed. The fix and its test don't need #2840.
- Dominant language
- TypeScript
- Stars
- 4.7k
- Forks
- 304
- Avg merge
- 11h 29m
- Merged PRs (30d)
- 514
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from callstack/agent-device
-
docs(ios-runner): RUNNER_PROTOCOL.md points at the wrong file and omits recovery and busy codes Opendocumentation good first issue ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
callstack/agent-device#2797 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
callstack/agent-device#1869 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
callstack/agent-device#2856 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
callstack/agent-device#2853 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
callstack/agent-device#2833 ·
All issues in callstack/agent-device
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
mksglu/context-mode#1200 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
anthropics/claude-code#96687 ·
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
AOSSIE-Org/DebateAI#582 · 2 comments ·