-
-
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
🐛 Android unknown crash #9
Comments
Please fill out the issue template you have deleted. What version are you on? Share crash logs. Print out the device ( |
my code
error device id of undefined
(console.log(JSON.stringify(device)))
|
That's because your logic is wrong, you are mounting the |
I fixed it but it still crashes my code
Error logs
|
Your if (!device || !permissions) {
return null
} The errors logs don't seem to be related to vision camera. See if your apps works when you remove the Camera code. |
sorry for my wrong code, i fixed it but the app still crashes maybe because of this ===> 2021-03-01 20:55:32.571 1808-1808/com.artoolapp E/libc: Access denied finding property "ro.vendor.df.effect.conflict" ??? my error logs
|
as I said in #9 (comment):
|
Crash app this video shows a crash app my code
|
Could you try opening your App in Android Studio and debug it? When an error is thrown, you can view which line in the native Kotlin code is causing the crash. Also check Android Studio's Logcat output (Cmd + 6) |
Again, this is not a crash. Please try to learn about Android Studio and debugging. If you find out which line is causing the problems, comment again. A Stacktrace would also help (view that in Logcat). |
LOGS I/CameraManagerGlobal: Connecting to camera service |
i can concur with @bairock
RN:0.64 |
I think my app crashes because its RN 0.64 |
We're also using RN 0.64 in Cuvent, and the example (on the frame-processor branch) as well. I'm away for the weekend but will take another look next week! Good luck |
Just to confirm, can you guys run the example app? |
@mrousavy example app works fine on my phone, I even copied all the code from the example app to my app and still it crashes |
@mrousavy okay so I found the problem Seems like the camera only works if you have react native navigation installed It doesnt seem to work with a blank react native project. I tired a blank react native 0.64.rc-4 with react native vision and the thing failed Only after installing react native navigation, Camera seems to work with no problem. Any idea how do I fix this? |
@zifahm Do you have a stack trace for us of the crash? |
Hmm idk how to do that in android studio, the weird thing is i dont seem to find any crash logs in flipper, Could you just guide me how would i find the stack trace? @hannojg |
Start Android studio, open your project (the /android folder) and wait for the gradle sync to complete (important to wait, you can see the in the bottom right corner).Once that’s done open View > Tool Windows > Logcat. Run your application (from Android studio)
In logcat select your device, your App and at the Right side „Show only selected application“.
The output in logcat is the native log from your specific application.
Now cause the crash with the camera.
In logcat you should see a red message (and nothing after that as the application has been stopped). This is the stack trace we need.
Am Samstag, März 6, 2021, 2:51 PM schrieb Hafiz <[email protected]>:
Hmm idk how to do that in android studio, the weird thing is i dont seem to find any crash logs in flipper,
Could you just guide me how would i find the stack trace? @hannojg
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
|
@hannojg okay seems like its wide enough issue facebook/react-native#25537 |
Yes that's a pretty common RN issue and I'm not sure if it is related to VisionCamera. The only thing I thought of is Kotlin, maybe RNN automatically installs Kotlin and VisionCamera doesn't. Could you try with a blank project + install Kotlin (google installation instructions) + install VisionCamera? I'll add that to the docs if that's the cause (or maybe we'll also create a script to do all that automatically, since there are a few manual steps which can be a bit overwhelming) |
I followed this guide. Still seems to crash @mrousavy |
Last line in verbose dropdown
|
Did you try all the steps in the Troubleshooting guide? I updated it earlier today |
@mrousavy yup. so it works for you in a fresh build without RNN ? As shown in the toubleshooting guide, everything compiles properly, only thing is its crashes if RNN is not isntalled |
I haven't tried that yet, but I can't think of anything that affects this other than Kotlin being installed. The "libjsc not found" error does not seem to be related, this just often indicates that you have some sort of react native version mismatch. It's just really weird that you're not finding any errors in the logcat output, normally that is spammed with every single detail you can imagine |
Yeah ikr even flipper does not shill out any logs, damn weird |
Flipper shouldn't be your source of debugging for this, Android Logcat picks up more logs than Flipper. |
Hey! I ran into the same issue when testing out the module in my own application. Only one of my devices actually printed any meaningful output when crashing. This was logged on a Samsung Galaxy S8+
The only difference I could see between the example app and my app, is that I use react-navigation instead of react-native-navigation Looking into the react-native-navigation module I see that it has the following dependencies:
Also looking up the error message brought me here: https://stackoverflow.com/questions/52677638/module-with-main-dispatcher-is-missing which has some more information. My current workaround for now is to add the following to my applications build.gradle
I haven't dug much further or read too much into this, but maybe replacing in your modules build.gradle would solve the dependancy issue? This is just based on a quick look at the comments on the StackOverflow link, without actually going into details ;) |
@vinkim thank you for the details!! Helps a lot. I've just published 1.0.1 on npm with coroutines-android instead of core, let me know if that works for you guys. |
I removed my workaround and did a fresh install. I can confirm that the issue is gone my part at least! |
Awesome. I wasn't sure if kotlinx-coroutines-core was included in the kotlinx-coroutines-android package, but if it works for you I assume it is. 🚀 Thanks again for your awesome research, took me about 20 seconds to see what's going on 👍 |
Hi. There's an issue when trying to load the app using expo start: [Unhandled promise rejection: TypeError: null is not an object (evaluating 'CameraModule.getCameraPermissionStatus')] |
useCameraDevices is return undefined on release android is there any solution for this? |
device id of undefined
Camera.tsx
my code check
crash app
android 10
xiaomi note 7
The text was updated successfully, but these errors were encountered: