fix(install): install-from-source sends no User-Agent, so GitHub rejects it
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 75/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- node.js, typescript
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 4.7k
- フォーク
- 304
- 平均マージ
- 11時間 6分
- マージ済み PR(30日)
- 554
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
callstack/agent-device のほかの issue
-
Proxy lease refuses every iOS install/open: connection platform 'ios' compared with internal 'apple' オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
callstack/agent-device#2962 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
callstack/agent-device#1869 ·
メンテナーはふだん 1 日以内に返信
-
needs-triage refactor
難易度 5/5 1週間以上 初心者へのやさしさ 28/100
callstack/agent-device#2976 ·
メンテナーはふだん 1 日以内に返信
-
ready-for-agent refactor
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
callstack/agent-device#2974 ·
メンテナーはふだん 1 日以内に返信
-
needs-triage refactor
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
callstack/agent-device#2973 ·
メンテナーはふだん 1 日以内に返信
callstack/agent-device の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
diegosouzapw/OmniRoute#14869 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 94/100
メンテナーはふだん 1 日以内に返信
-
status: waiting triage
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
freeCodeCamp/freeCodeCamp#70412 ·
メンテナーはふだん 1 日以内に返信
-
Mend: dependency security vulnerability untriaged
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
opensearch-project/OpenSearch-Dashboards#12816 ·
メンテナーはふだん 1 日以内に返信