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.

If local DAT Inspector MCP tools are available, use the live-debugging-mcp skill before changing app code. Prefer get_dat_readiness, get_companion_boundary_diagnosis, and get_device_path to separate app bugs from Meta AI app/device boundary issues using read-only DAT evidence.

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 addCamera() 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.addCamera(...)
  • Check camera permission status through Wearables.checkPermissionStatus(...)
  • Make sure camera.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"

camera.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.

Live MCP evidence

When the developer has a local DAT debug server connected to the agent:

  • Start with get_sdk_state and get_dat_readiness
  • Use get_companion_boundary_diagnosis for permission, app identity, device capability, device-selection, deeplink-return, and DAM/DWA-visible blockers
  • Use get_device_path to trace app -> DAT registration -> Meta AI app permissions -> device selection/link -> session -> stream
  • Ask the developer to reproduce the issue, then use wait_for_events with the narrowest category or source that matches the flow
  • Use export_diagnostic_bundle for redacted support handoff

Do not treat this as companion app introspection. It is diagnosis from app-visible DAT debug events.

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의 다른 스킬

gc-safe-coding
facebook
전체 설명과 근거는 doc/GCSafeCoding.md를 참조하십시오.
app-review-prep
facebook
Meta 앱을 App Review용으로 준비합니다 — 현재 상태, 미해결 요구 사항, 부여된 권한, 제출 내역을 확인합니다. 앱을 제출하기 전에 사용하세요…
api-health
facebook
Meta 앱의 API 상태를 모니터링합니다 — 비율 제한, 호출량, API 지원 중단 여부를 확인합니다. 트래픽 제한을 진단하거나, 용량을 계획하거나, API 버전 변경에 대비하는 데 사용합니다…
debug-webhooks
facebook
Meta 앱의 웹훅 문제를 해결합니다 — 활성 구독을 검사하고, 잘못된 구성을 식별하며, 테스트 페이로드를 전송하여 전달을 확인합니다. 다음과 같은 경우에 사용하세요…
api-integration
facebook
개발자가 Meta API 통합을 처음부터 설정하도록 안내합니다 — 적절한 API를 찾아내고, 설정 가이드, 인증 요구 사항 등을 가져옵니다…
webhook-setup
facebook
Meta 앱용 웹훅을 처음부터 끝까지 설정하세요 — 사용 가능한 주제를 탐색하고, 필드를 구독하고, 테스트 페이로드로 검증합니다. 웹훅을 구성할 때 사용하세요…
test-ui
facebook
iwsdk CLI를 사용하여 포크 예제에 대해 Test UI 시스템(PanelUI, ScreenSpace)을 테스트합니다.
flags
facebook
React 릴리스 채널 간 기능 플래그 상태를 검사하고 비교합니다. 모든 채널(www, www-modern, canary, next, experimental, rn 변형)의 플래그를 보거나 --diff로 특정 채널을 비교합니다. 출력 형식은 기본 테이블 보기, CSV 내보내기, 정리 상태 그룹화를 포함합니다. 플래그 상태는 기호로 표시됩니다: 활성화(✅), 비활성화(❌), 변형 테스트(🧪), 프로파일링 전용(📊). 일반적인 실수: __VARIANT__ 플래그는 www에서 두 상태 모두 테스트되며, --diff를 사용하여 의미 있는 차이를 찾습니다...