facebookresearch / facebookresearch/ocean
External Camera Android sample fails to initialize on Quest due to OceanUSBManager singleton violation
- Dominant language
- C++
- Stars
- 790
- Forks
- 94
- PR merge metrics
- No merged PRs in 30d
Description
**What happened?**
The External Camera Android sample fails to render the live camera feed on Meta Quest devices. The application launches and OpenGL initializes correctly, and camera permissions are granted, but the preview remains a black screen.
The expected behavior is that the USB external camera stream initializes successfully and displays live video in the OpenGL view. Instead, the camera pipeline fails to initialize due to OceanUSBManager rejecting a second instance creation, which prevents the USB media pipeline from starting.
**Steps to reproduce**
Build and install com.meta.ocean.app.demo.media.externalcamera.android on a Meta Quest device
Launch the application
Grant USB/camera permissions when prompted
Observe that the app initializes but no camera image is rendered
**Logs or error output**
```
E Ocean : OceanUSBManager: Only one instance of OceanUSBManager can be created
E Ocean : Failed to initialized OceanUSBManager
W Ocean : USBLiveVideo: Waiting for permission for device 'LiveVideoId:0' (/dev/bus/usb/001/006)
E ActivityThread: Activity ... has leaked IntentReceiver com.meta.ocean.system.usb.android.OceanUSBManager$1
```
**Environment**
OS/Platform: Meta Quest 3 (Android 14, SDK 34)
Ocean version or commit: `ea6e1e6ec490b4297a123d63e0196754cdc1eb28`
Contributor guide
Research direction
Start by tracing OceanUSBManager creation in the External Camera Android sample and follow USBLiveVideo initialization while reproducing the failure on a Meta Quest device. Use the reported singleton, permission-wait, and leaked IntentReceiver logs to locate the failing path; done means the USB camera pipeline initializes and live video renders in the OpenGL view.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, cpp
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100