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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Black screen on Redmi Note 11 #2363

Closed
4 of 5 tasks
majidhidile opened this issue Jan 9, 2024 · 7 comments · Fixed by #2494
Closed
4 of 5 tasks

🐛 Black screen on Redmi Note 11 #2363

majidhidile opened this issue Jan 9, 2024 · 7 comments · Fixed by #2494
Labels
🐛 bug Something isn't working

Comments

@majidhidile
Copy link

What's happening?

I updated my camera to version 3.7.0. It works well on my Pixel 4a, but on my Redmi Note 11 Pro Plus, the camera shows a black screen. I've attached an image below for reference.
redmi1
pixel

Reproduceable Code

const device = useCameraDevice(isFront ? 'front' : 'back');
const format = useCameraFormat(device, [
{ videoResolution: 'max' },
{ photoResolution: 'max' },
{ videoResolution: { width: 1280, height: 720 } },
{ photoResolution: { width: 1280, height: 720 } },
]);
<Camera
orientation="portrait"
format={format}
device={device}
isActive={true}
ref={cameraRef}
onError={(e) => {
console.log('eRROR-->', e);
}}
style={[StyleSheet.absoluteFill]}
photo={true}
video={true}
audio={true}
enableZoomGesture={true}
>

Relevant log output

14:38:07.629  E  [ERROR][PPROC  ] camxopenode.cpp:4173 UpdateBandwidth() cq2+m_currentrequestID is 63,m_previewrequestID=62,requestDelta=1
14:38:07.630  E  [ERROR][PPROC  ] camxopenode.cpp:8304 PrepareRSStatsMetadata() cq3+sensorWidth is 4000,sensorHeight=3000
14:38:07.662  E  [ERROR][PPROC  ] camxopenode.cpp:4173 UpdateBandwidth() cq2+m_currentrequestID is 64,m_previewrequestID=63,requestDelta=1
14:38:07.662  E  [ERROR][PPROC  ] camxopenode.cpp:8304 PrepareRSStatsMetadata() cq3+sensorWidth is 4000,sensorHeight=3000
14:38:07.698  E  [ERROR][PPROC  ] camxopenode.cpp:4173 UpdateBandwidth() cq2+m_currentrequestID is 65,m_previewrequestID=64,requestDelta=1
14:38:07.698  E  [ERROR][PPROC  ] camxopenode.cpp:8304 PrepareRSStatsMetadata() cq3+sensorWidth is 4000,sensorHeight=3000
14:38:07.728  E  [ERROR][PPROC  ] camxopenode.cpp:4173 UpdateBandwidth() cq2+m_currentrequestID is 66,m_previewrequestID=65,requestDelta=1
14:38:07.728  E  [ERROR][PPROC  ] camxopenode.cpp:8304 PrepareRSStatsMetadata() cq3+sensorWidth is 4000,sensorHeight=3000
14:38:07.763  E  [ERROR][PPROC  ] camxopenode.cpp:4173 UpdateBandwidth() cq2+m_currentrequestID is 67,m_previewrequestID=66,requestDelta=1
14:38:07.763  E  [ERROR][PPROC  ] camxopenode.cpp:8304 PrepareRSStatsMetadata() cq3+sensorWidth is 4000,sensorHeight=3000
14:38:07.796  E  [ERROR][PPROC  ] camxopenode.cpp:4173 UpdateBandwidth() cq2+m_currentrequestID is 68,m_previewrequestID=67,requestDelta=1
14:38:07.796  E  [ERROR][PPROC  ] camxopenode.cpp:8304 PrepareRSStatsMetadata() cq3+sensorWidth is 4000,sensorHeight=3000
14:38:07.829  E  [ERROR][PPROC  ] camxopenode.cpp:4173 UpdateBandwidth() cq2+m_currentrequestID is 69,m_previewrequestID=68,requestDelta=1
14:38:07.829  E  [ERROR][PPROC  ] camxopenode.cpp:8304 PrepareRSStatsMetadata() cq3+sensorWidth is 4000,sensorHeight=3000
14:38:07.862  E  [ERROR][PPROC  ] camxopenode.cpp:4173 UpdateBandwidth() cq2+m_currentrequestID is 70,m_previewrequestID=69,requestDelta=1
14:38:07.862  E  [ERROR][PPROC  ] camxopenode.cpp:8304 PrepareRSStatsMetadata() cq3+sensorWidth is 4000,sensorHeight=3000
14:38:07.897  E  [ERROR][PPROC  ] camxopenode.cpp:4173 UpdateBandwidth() cq2+m_currentrequestID is 71,m_previewrequestID=70,requestDelta=1
14:38:07.897  E  [ERROR][PPROC  ] camxopenode.cpp:8304 PrepareRSStatsMetadata() cq3+sensorWidth is 4000,sensorHeight=3000
14:38:07.928  E  [ERROR][PPROC  ] camxopenode.cpp:4173 UpdateBandwidth() cq2+m_currentrequestID is 72,m_previewrequestID=71,requestDelta=1
14:38:07.928  E  [ERROR][PPROC  ] camxopenode.cpp:8304 PrepareRSStatsMetadata() cq3+sensorWidth is 4000,sensorHeight=3000
14:38:07.963  E  [ERROR][PPROC  ] camxopenode.cpp:4173 UpdateBandwidth() cq2+m_currentrequestID is 73,m_previewrequestID=72,requestDelta=1
14:38:07.963  E  [ERROR][PPROC  ] camxopenode.cpp:8304 PrepareRSStatsMetadata() cq3+sensorWidth is 4000,sensorHeight=3000
14:38:07.996  E  [ERROR][PPROC  ] camxopenode.cpp:4173 UpdateBandwidth() cq2+m_currentrequestID is 74,m_previewrequestID=73,requestDelta=1
14:38:07.996  E  [ERROR][PPROC  ] camxopenode.cpp:8304 PrepareRSStatsMetadata() cq3+sensorWidth is 4000,sensorHeight=3000
14:38:08.030  E  [ERROR][PPROC  ] camxopenode.cpp:4173 UpdateBandwidth() cq2+m_currentrequestID is 75,m_previewrequestID=74,requestDelta=1
14:38:08.030  E  [ERROR][PPROC  ] camxopenode.cpp:8304 PrepareRSStatsMetadata() cq3+sensorWidth is 4000,sensorHeight=3000
14:38:08.063  E  [ERROR][PPROC  ] camxopenode.cpp:4173 UpdateBandwidth() cq2+m_currentrequestID is 76,m_previewrequestID=75,requestDelta=1
14:38:08.063  E  [ERROR][PPROC  ] camxopenode.cpp:8304 PrepareRSStatsMetadata() cq3+sensorWidth is 4000,sensorHeight=3000
14:38:08.096  E  [ERROR][PPROC  ] camxopenode.cpp:4173 UpdateBandwidth() cq2+m_currentrequestID is 77,m_previewrequestID=76,requestDelta=1
14:38:08.096  E  [ERROR][PPROC  ] camxopenode.cpp:8304 PrepareRSStatsMetadata() cq3+sensorWidth is 4000,sensorHeight=3000
14:38:08.131  E  [ERROR][PPROC  ] camxopenode.cpp:4173 UpdateBandwidth() cq2+m_currentrequestID is 78,m_previewrequestID=77,requestDelta=1
14:38:08.131  E  [ERROR][PPROC  ] camxopenode.cpp:8304 PrepareRSStatsMetadata() cq3+sensorWidth is 4000,sensorHeight=3000
14:38:08.164  E  [ERROR][PPROC  ] camxopenode.cpp:4173 UpdateBandwidth() cq2+m_currentrequestID is 79,m_previewrequestID=78,requestDelta=1
14:38:08.164  E  [ERROR][PPROC  ] camxopenode.cpp:8304 PrepareRSStatsMetadata() cq3+sensorWidth is 4000,sensorHeight=3000

Camera Device

LOG  {
  "sensorOrientation": "landscape-right",
  "hardwareLevel": "full",
  "maxZoom": 10,
  "minZoom": 1,
  "maxExposure": 24,
  "supportsLowLightBoost": false,
  "neutralZoom": 1,
  "physicalDevices": [
    "wide-angle-camera"
  ],
  "supportsFocus": true,
  "supportsRawCapture": true,
  "isMultiCam": false,
  "minExposure": -24,
  "name": "BACK (0)",
  "hasFlash": true,
  "hasTorch": true,
  "position": "back",
  "id": "0"
}
 LOG  {
  "sensorOrientation": "landscape-right",
  "hardwareLevel": "full",
  "maxZoom": 10,
  "minZoom": 1,
  "maxExposure": 24,
  "supportsLowLightBoost": false,
  "neutralZoom": 1,
  "physicalDevices": [
    "wide-angle-camera"
  ],
  "supportsFocus": true,
  "supportsRawCapture": true,
  "isMultiCam": false,
  "minExposure": -24,
  "name": "BACK (0)",
  "hasFlash": true,
  "hasTorch": true,
  "position": "back",
  "id": "0"
}

Device

Redmi Note 11 Pro Plus

VisionCamera Version

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

@majidhidile majidhidile added the 🐛 bug Something isn't working label Jan 9, 2024
@DidacClaria
Copy link

If you set the exposure of the Camera component to 0 you should see it fine in all devices.

<Camera ... exposure={0} />

@majidhidile
Copy link
Author

@DidacClaria Thanks for your response, this issue is fixed.

@mrousavy
Copy link
Owner

Logs are not relevant. You included logs that have nothing to do with VisionCamera. Please include the full adb logcat logs from your application.

@mrousavy
Copy link
Owner

Also, setting exposure to 0 is not a fix - it's a workaround. We need a real fix.

@mrousavy mrousavy changed the title Still gives a black screen issue, but it's not happening on all devices, specifically the Redmi Note 11 Pro Plus 🐛 Black screen on Redmi Note 11 Jan 11, 2024
@GolliAch
Copy link

Some of our users also reported this problem on Poco x4 pro and other devices.

@mrousavy
Copy link
Owner

mrousavy commented Feb 1, 2024

Working on a fix for this issue here: #2494 👀

Still in development, so don't test yet. Long way to go, this is a really complicated issue (as you can see in the changes/Files of that PR)...

@mrousavy
Copy link
Owner

mrousavy commented Feb 6, 2024

Just released VisionCamera 3.9.0-beta.1, which includes the big PersistentCaptureSession PR that aims to fix all the blackscreen issues.... 👀🎉

You can try that new beta out yourself and let me know if you still encounter blackscreen issues. I'll continue to test on more devices in the meantime, organize the code a bit better, and then I'll tackle the preview stretching, focus, and flash issues!

If that fixes the blackscreen issues for you, please consider sponsoring me on GitHub to say thanks! ❤️

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
4 participants