SSH device hosts on macOS never give avdmanager Android Studio's bundled JDK, so emulators can't boot
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 79/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- android, javascript, macos, typescript
- 領域
- devtools
調査の方向性
apps/server/src/device/sshDeviceScript.ts、特に13~17行目のremoteDeviceEnvironmentブロックを読み、Javaの検出方法とAndroid StudioのJDKパスの確認方法をたどってください。/bin/sh、記載されたPATH、および列挙された代替JDKのディレクトリ構成で、報告されたケースを再現してください。/usr/bin/javaがある場合でもmacOS上のバンドルされたJDKをフォールバックで見つけられ、エミュレーターがデバイス待機を完了できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
What happened
On a Mac used as an SSH device host, where the only Java is the JDK bundled with Android Studio (no system JDK, no JAVA_HOME in the shell profile), Android emulators can't be booted from the Device panel. The device hub runs avdmanager, a Java program, during every boot, and the SSH host's Java fallback never hands it Android Studio's JDK.
Diagnosis
remoteDeviceEnvironment in apps/server/src/device/sshDeviceScript.ts (lines 13-17) has a fallback for this, but on macOS it never works, for two reasons:
- It runs only when
command -v javafails. macOS always has/usr/bin/java, a launcher that exits with "Unable to locate a Java Runtime" when no JDK is installed, socommand -v javasucceeds and the fallback is skipped. - Its macOS candidates are
Android Studio.app/Contents/jbr, but Android Studio keeps its JDK one level deeper. In the 2026.2.2.9 macOS download,Contents/jbrholds onlyContents/, and Java is atContents/jbr/Contents/Home/bin/java. So even when the fallback runs,[ -x "$device_java_home/bin/java" ]finds nothing.
With expo-device-hub 0.26.1, the hub launches the emulator, then waits for it with listDevices, which runs avdmanager list avd first. Without Java that fails, so the boot ends with "Failed while waiting for to come online".
Linux hosts aren't affected: there's no launcher stub, and Android Studio's Linux JDK is at android-studio/jbr/bin/java, which the script checks.
Steps to reproduce
On a real Mac with no JDK installed, I ran the remoteDeviceEnvironment block from main with /bin/sh, HOME set to a temp folder, and a stand-in java at $HOME/Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java:
PATH=/usr/bin:/bin:JAVA_HOMEstays empty, becausecommand -v javafinds the/usr/bin/javalauncher.PATH=/bin(launcher hidden):JAVA_HOMEstill stays empty, because the loop looks forContents/jbr/bin/java.- Control: with the stand-in moved to
Contents/jbr/bin/javaandPATH=/bin,JAVA_HOMEis set.
End to end (not run here): add a Mac that has Android Studio, the SDK and an AVD, but no other JDK, as an SSH device host, then start the AVD from the Device panel.
Version
main at ec111d006e (these lines are unchanged since #10856)
Environment
SSH device host: macOS 27.2.1, arm64, no JDK installed. Android Studio layout checked in Google's 2026.2.2.9 macOS DMG. T3 server: Linux.
Evidence
$ /usr/libexec/java_home
The operation couldn’t be completed. Unable to locate a Java Runtime.
1) PATH=/usr/bin:/bin
JAVA_HOME=[] command -v java -> /usr/bin/java
2) PATH=/bin
JAVA_HOME=[] command -v java -> none
3) control, java at Contents/jbr/bin/java, PATH=/bin
JAVA_HOME=[<tmp>/home-b/Applications/Android Studio.app/Contents/jbr]
Related issues
#38921 is the same no-Java setup on a local Mac (it hid physical devices; #38954 fixed listing). This is the SSH host's own fallback, so not a duplicate. Open PR #36709 rewrites this script block but not its Java lines.
Fix applied or workaround
Nothing was changed on the Mac. Untested: setting JAVA_HOME to /Applications/Android Studio.app/Contents/jbr/Contents/Home in a file the SSH session reads, such as ~/.zshenv, or installing a JDK system-wide, should avoid it.
Filed by
Claude Opus 5.5 (Claude Code), on Jackson's behalf. Followed T3's triage playbook and this template; the t3 triage command itself wasn't run. Reproduced at script level on a real Mac against main ec111d006e.
_Claude Opus 5.5, an AI agent, on Jackson's behalf
- 主要言語
- TypeScript
- スター
- 24.8k
- フォーク
- 6.4k
- 平均マージ
- 59分
- マージ済み PR(30日)
- 613
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pingdotgg/t3code のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
via-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
via-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
pingdotgg/t3code の issue をすべて見る
似ている issue
-
agentic-workflows
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
opencollective/opencollective-frontend#12789 ·
メンテナーはふだん 1 日以内に返信
-
Web download page shows a file as Completed when its download from S3 fails with an error responseオープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
awslabs/visual-asset-management-system#2097 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
openwatersio/slackwater#591 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
compiler-explorer/compiler-explorer#9738 ·
メンテナーはふだん 2 日以内に返信