If the problem is due to the metadata problem @sweak mentioned, another way to handle this can be initializing CameraX through the ProcessCameraProvider#configureInstance and Camera2Config#defaultConfig() API.
ProcessCameraProvider.configureInstance(Camera2Config.defaultConfig())
val cameraProviderFuture = ProcessCameraProvider.getInstance(context)