Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 java.util.concurrent.TimeoutException: Android release APK black screen on camera launch #2793

Open
3 of 5 tasks
dumbre-prasad opened this issue Apr 24, 2024 · 2 comments
Labels
馃悰 bug Something isn't working

Comments

@dumbre-prasad
Copy link

dumbre-prasad commented Apr 24, 2024

What's happening?

we are using version 4.0.0 when camera component is mounted and isActive is true camera is not getting launch and showing black screen attaching logs from android studio

Platform: Android
Previous React Native Version: 0.71.3 where camera working fine
Current React Native version: 0.73.6 with New RN Fabric architecture enabled where camera is not working

Reproduceable Code

import { Camera, useCameraDevice, useCodeScanner } from 'react-native-vision-camera';
      
  const device = useCameraDevice('back');
  const codeScanner = useCodeScanner({
    codeTypes: ['qr', 'ean-13'],
    onCodeScanned,
  });

       <Camera
          device={device}
          isActive={isCameraOn}
          style={StyleSheet.absoluteFill}
          orientation="portrait"
          codeScanner={codeScanner}
          torch={flashMode ? 'on' : 'off'}
        />

Relevant log output

Camera2CameraImpl  E  Unable to configure camera Camera@f43c463[id=0]
 java.util.concurrent.TimeoutException: Future[androidx.camera.core.impl.utils.futures.ListFuture@79f35cd] is not done within 5000 ms.
androidx.camera.core.impl.utils.futures.Futures.lambda$makeTimeoutFuture$1(SourceFile:33)
androidx.camera.core.impl.utils.futures.Futures.f(SourceFile:1)
at montrancli.c0.a.call(SourceFile:1)
at androidx.camera.core.impl.utils.executor.HandlerScheduledExecutorService$HandlerScheduledFuture.run(SourceFile:14at android.os.Handler.handleCallback(Handler.java:883)
 at android.os.Handler.dispatchMessage(Handler.java:100)
 at android.os.Looper.loop(Looper.java:237)
at android.os.HandlerThread.run(HandlerThread.java:67)

Camera Device

{

  hardwareLevel: "limited",
  hasFlash: true,
  hasTorch: true,
  id: "0",
  isMultiCam: false,
  maxExposure: 20,
  maxZoom: 4,
  minExposure: -20,
  minFocusDistance: 0,
  minZoom: 1,
  name: "0 (BACK) androidx.camera.camera2",
  neutralZoom: 1,
  physicalDevices: ["wide-angle-camera"],
  position: "back",
  sensorOrientation: "landscape-left",
  supportsFocus: true,
  supportsLowLightBoost: false,
  supportsRawCapture: false,
}

Device

samsung-SM-M305F-Android-10

VisionCamera Version

4.0.0

Can you reproduce this issue in the VisionCamera Example app?

I didn't try (鈿狅笍 your issue might get ignored & closed if you don't try this)

Additional information

@dumbre-prasad dumbre-prasad added the 馃悰 bug Something isn't working label Apr 24, 2024
@mrousavy mrousavy changed the title java.util.concurrent.TimeoutException: Android release APK black screen on camera launch 馃悰 java.util.concurrent.TimeoutException: Android release APK black screen on camera launch Apr 25, 2024
@dumbre-prasad
Copy link
Author

hi @mrousavy i have updated camera device please let me know if you need any further details
Thankyou!

@mrousavy
Copy link
Owner

thanks, but at the moment I don't have time to investigate issues that are not paid/sponsored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
馃悰 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants