-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
🐛 <Camera> is located at top left corner on its first start - while it is expected at the center of the window #3237
Comments
Guten Tag, Hans here. Thank you for your detailed report! It looks like you are experiencing a valid issue with the component not starting in the expected position. However, I noticed that you didn’t try to reproduce this issue in the VisionCamera Example app. This is important for us to understand if it is an issue specific to your app or a potential bug in the library itself. Please give it a try and let us know the results. Also, if you could provide more logs surrounding the initialization process or any errors you might see, it would greatly help mrousavy in diagnosing the issue further. You can gather them by running Feel free to follow up after trying the example app. Cheers! 🍻
|
I have just tried VisionCamera Example app. The application is in full screen. I did modify the example app to be closer to my case and it seems to work (ie: the is always in the middle of the screen):
But the VisionCamera Example app is much more complex than my test app. I do not know whether I missed something. cc: @mrousavy |
I have been trying to reduce VisionCamera Example app code to simpler test app. I managed few times to duplicate the issue with a minimal version of VisionCamera Example app but not as often as with my app. I would guess it is a timing / race condition issue somewhere in For my test app, I used latest react-native and I have enabled new react native architecture. |
I'm having the same problem that the layout is set wrong occasionally (around 20% of the time) there is some race issue going on.. |
I had on camera view component const device = useCameraDevice('back'); useEffect(() => { if(!hasCameraRight) if (!device) { After I removed that hasCameraRights check it started working correctly, so it has something to do with layout change timings. |
What's happening?
In my simple app, the first time I start it, the is located at the top left corner of the screen while I expect it to be in the middle of the screen.
But when coming back on the screen, the is now located in the middle of the screen.
What I see:
On the screen reload:
Reproduceable Code
Relevant log output
Camera Device
Device
Samsung Galaxy A20e (Android 11)
VisionCamera Version
4.5.3
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
The text was updated successfully, but these errors were encountered: