debugging

作成者: facebook

一般的な問題、開発者モード、バージョン互換性、セッションとストリームの診断

npx skills add https://github.com/facebook/meta-wearables-dat-android --skill debugging

Debugging (Android)

Diagnose common setup, session, and stream issues in DAT SDK integrations.

Quick diagnosis

No eligible device or session won't start?
|
+-- Did you call Wearables.initialize(context)? -> Must happen before SDK usage
|
+-- Did registration complete? -> Observe Wearables.registrationState
|
+-- Is Developer Mode enabled? -> Enable it in the Meta AI app for dev builds
|
+-- Does Wearables.devices contain a linked device? -> Check Bluetooth and range
|
+-- Did createSession() or addStream() return a DatResult failure? -> Surface the typed error

Developer Mode

Developer Mode must be enabled for local development builds that use mwdat_application_id = 0 and mwdat_client_token = 0.

Symptoms when Developer Mode is disabled

  • Registration flow completes but the device never becomes eligible
  • Permission requests do not succeed for development builds
  • Wearables.createSession(...) fails with no eligible device

Watch for

  • Developer Mode may reset after app or firmware updates
  • Developer Mode is configured per linked device
  • Production builds use a real APPLICATION_ID, CLIENT_TOKEN, and release-channel gating instead

Session and stream issues

Session never reaches STARTED

  • Verify Wearables.registrationState
  • Check that Wearables.devices contains a compatible linked device
  • Ensure the glasses are powered on, unfolded, and in range

Stream never reaches STREAMING

  • Confirm session.start() succeeded before calling session.addStream(...)
  • Check camera permission status through Wearables.checkPermissionStatus(...)
  • Make sure stream.start() returned success

Photo capture fails

  • capturePhoto() only succeeds while the stream is actively streaming
  • Surface the returned CaptureError instead of discarding the DatResult

Version compatibility

Ensure compatible versions of the SDK, Meta AI app, and glasses firmware. See version dependencies for the current compatibility matrix.

Logging

private const val TAG = "DATWearables"

stream.start()
    .onFailure { error, _ -> Log.e(TAG, "Failed to start stream: ${error.description}") }

Prefer logging typed DatResult failures and observed state transitions over generic exceptions.

Checklist

  • Wearables.initialize(context) ran before SDK usage
  • Developer Mode enabled for development builds
  • APPLICATION_ID and CLIENT_TOKEN match the build mode
  • Registration completed before session creation
  • Bluetooth permission granted
  • Camera permission granted through Meta AI
  • Session and stream DatResult failures are surfaced in logs or UI

Links

facebookのその他のスキル

binary-size-analysis
facebook
gitコミット範囲にわたるhermesvm共有ライブラリのコミットごとのバイナリサイズ変更を分析します。コミットごとのサイズと、顕著な増加・減少の要約表を含むマークダウンレポートを生成します。
official
modify-jsi-features
facebook
JavaScript Interface(JSI)レイヤーに新しいJSI機能を追加するためのガイド。ユーザーが新しいメソッドや機能の追加、作成、実装を依頼した際に使用します。
official
non-interactive-git-rebase
facebook
最上位のコミットではないgitコミットの並び替え、分割、削除、修正を、インタラクティブエディタを使わずに行う必要がある場合に使用します。プログラムによるリベースをカバーします…
official
click-target
facebook
XR内でターゲットオブジェクトを検索してクリックします。UI操作のテスト、ボタンのクリック、インタラクティブ要素の動作確認に使用します。
official
iwsdk-planner
facebook
IWSDKプロジェクト計画とベストプラクティスガイド。新しいIWSDK機能の計画、システム/コンポーネントの設計、IWSDKコードアーキテクチャのレビュー、またはその際に使用します。
official
iwsdk-ui-panel
facebook
IWSDK UIパネルを効率的に開発・反復改善します。PanelUIコンポーネントの作業、UIレイアウトのデバッグ、またはIWSDKアプリケーションにおけるUIデザインの改善に使用します。
official
test-all
facebook
並列テストオーケストレーター。Taskサブエージェントとiwsdk CLIを介して9つのテストスイートすべてを同時に実行します。ビルド、サンプルセットアップ、開発サーバー、エージェント起動などを処理します。
official
test-audio
facebook
iwsdk CLIを使用して、オーディオの例(AudioSourceの読み込み、再生状態、停止、空間オーディオ)に対するオーディオシステムのテストを行います。
official