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

[Bug] Black screen on Samsung Galaxy A23 5G #1079

Closed
dan-asa opened this issue Apr 24, 2023 · 8 comments
Closed

[Bug] Black screen on Samsung Galaxy A23 5G #1079

dan-asa opened this issue Apr 24, 2023 · 8 comments
Labels
bug A bug in an ARFoundation-related package third party

Comments

@dan-asa
Copy link

dan-asa commented Apr 24, 2023

Describe the bug
Building app with SimpleAR scene from ARFoundation Samples 5.0/4.2 has black screen, but if I build with ARFoundation Samples 4.1 it works fine. This happens only on Samsung Galaxy A23 5G device, but can't reproduce on Samsung Galaxy Note 8. I have tried making Depth optional, but same behaviour and errors that repeats for each frame.

Android logcat saved from Unity editor using Logcat package https://pastebin.com/B2WVDm49

2023/04/24 15:13:48.845 4394 4635 Error RepeatCaptureReq(0) Capture failed. 2023/04/24 15:13:48.846 4394 4635 Error RepeatCaptureReq(0) Buffer lost for frame 0 2023/04/24 15:13:48.846 4394 4635 Error RepeatCaptureReq(0) Buffer lost for frame 0 2023/04/24 15:13:48.893 4394 4635 Error RepeatCaptureReq(0) Capture failed. 2023/04/24 15:13:48.894 4394 4750 Error StartedCameraController(0) Saw capture failed event, failure: android.hardware.camera2.CaptureFailure@9a3db68. 2023/04/24 15:13:48.903 4394 4635 Error RepeatCaptureReq(0) Capture failed. 2023/04/24 15:13:48.903 4394 4702 Error StartedCameraController(0) Saw capture failed event, failure: android.hardware.camera2.CaptureFailure@20e4b81. 2023/04/24 15:13:48.904 4394 4635 Error RepeatCaptureReq(0) Buffer lost for frame 1 2023/04/24 15:13:48.905 4394 4750 Error StartedCameraController(0) Saw buffer lost event for frame 1. 2023/04/24 15:13:48.906 4394 4635 Error RepeatCaptureReq(0) Buffer lost for frame 1 2023/04/24 15:13:48.906 4394 4702 Error StartedCameraController(0) Saw buffer lost event for frame 1.

To Reproduce
Steps to reproduce the behavior:
Build app with SimpleAR scene using 4.2 or 5.0 version

Expected behavior
Camera feed and AR functionality should work

Actual behavior
Black screen and errors in Android logcat

Smartphone:

  • Device: Samsung Galaxy A23 5G
  • OS: Android 13
  • NOT WORKING WITH ARFoundation version 5.0 using Unity 2022.1.6f1 and version 4.2 using Unity 2021.3.5f1
  • WORKING WITH ARFoundation version 4.1 and Unity 2020.3.23f1
@dan-asa dan-asa added the bug A bug in an ARFoundation-related package label Apr 24, 2023
@andyb-unity
Copy link
Collaborator

Hard to tell if this is an issue with Unity or with Samsung. Please file a bug: https://unity3d.com/unity/qa/bug-reporting

@stale
Copy link

stale bot commented Jun 18, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale This issue has not had any activity in a while label Jun 18, 2023
@matejnevlud
Copy link

I think it is related to this bug in arcore google-ar/arcore-android-sdk#1553

@stale stale bot removed the stale This issue has not had any activity in a while label Jul 5, 2023
@PauGuillamon
Copy link

Happy to see it also affects Unity 😄 But I'm surprised to see it worked fine with Unity 2020.3.23f1. Does anybody know what ARCore version was used there?

@matejnevlud
Copy link

matejnevlud commented Jul 11, 2023

@PauGuillamon It seems that it uses ARCore 1.22, original post mentions Unity 2020.3.23f1 with ARFoundation version 4.1. Documentation for ARFoundation 4.1 mentions ARCore 1.22 :
https://docs.unity3d.com/Packages/[email protected]/manual/index.html

This version of ARCore XR Plugin uses ARCore 1.22 and supports the following functionality:

@marcoslimeira
Copy link

I am studing on the Unity Learning pathway, and with version 2021.3.1f1, the front camera of the A23 works, but the rear camera doesn't, even though the device indicates that ARCore is using it. By downgrading to AR Foundation 4.1, I managed to activate both cameras, using version 2020.3.41.f1. It's worth noting for new users like me, that it was necessary to install URP, configure a URP Asset, and include an AR Background Render Feature to your Asset_Renderer. Don't forget to link it to the Scriptable Render Pipeline Settings in Project Settings/Graphics.

@yanadelrey
Copy link

On Android 12 (API level 31) or later, make sure that "Block Camera" is set to OFF in system settings.

I randomly found it here in Errors section lol: https://developers.google.com/ar/design/interaction/ui

Tell me if it works. (btw I am a UX Designer)

@andyb-unity
Copy link
Collaborator

Closing this issue as OP's problem appears to be due to the ARCore bug linked in this thread.

There are many reasons why an AR app might render a black screen to device, and if you are experiencing this on anything other than a Samsung A23, please file a bug: https://unity3d.com/unity/qa/bug-reporting. You are welcome to open new issues as well, but filing a bug is the official way to report bugs. GitHub issues may not be seen by the development team.

FYI: a common Android black screen issue right now is that folks are using the "AR Feature" in package manager, which includes a Magic Leap package that seems to mess with Android apps. If this affects you, for now, do not use the AR Feature, and instead install your AR packages individually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug in an ARFoundation-related package third party
Projects
None yet
Development

No branches or pull requests

6 participants