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

api-health
facebook
Monitor API health for a Meta app — check rate limits, call volume, and API deprecations. Use to diagnose throttling, plan capacity, or prepare for API version…
official
api-integration
facebook
Guide a developer through setting up a Meta API integration from scratch — discovers the right APIs, fetches setup guides, authentication requirements,…
official
app-review-prep
facebook
Prepare a Meta app for App Review — checks current status, outstanding requirements, granted privileges, and submission history. Use before submitting an app…
official
debug-webhooks
facebook
Troubleshoot webhook issues for a Meta app — inspect active subscriptions, identify misconfiguration, and send test payloads to verify delivery. Use when…
official
webhook-setup
facebook
Set up webhooks for a Meta app end-to-end — discover available topics, subscribe to fields, and verify with a test payload. Use when configuring webhooks for…
official
buck2-rule-basics
facebook
Guide users through writing their first Buck2 rule to learn fundamental concepts including rules, actions, targets, configurations, analysis, and select(). Use…
official
add-ir-instruction
facebook
Guide for adding a new IR instruction to the Hermes compiler. Use when the user asks to add, create, or define a new IR instruction (Inst/Instruction) in the…
official
binary-size-analysis
facebook
이 스킬은 사용자가 일련의 커밋 범위에서 hermesvm 바이너리 크기 변경을 분석하려 할 때 사용해야 합니다. 사용자가 "바이너리 크기"를 언급할 때 사용하세요.
official