Open mnai01 opened 1 year ago
Had this issue too. Was caused by Android Emulator not supporting WebGL2. You can update that in the emulator's advanced setting.
However, that was not the main issue for me as Expo Camera is not supported on emulators in the first place.
Hi, @mnai01
Aplogize for the delayed response and It seems like there is some package dependancy issue between React Native
and Expo
latest versions and if possible could you please try to downgrade the versions of React Native
andExpo
to previous stable version and see whether is it resolving your issue or not ? till then I'll try it from my end also and you can refer this comment It seems like concerned team is looking into this issue and we will update you soon. Thank you!
Hey @gaikwadrahul8 thanks for getting back to me. I have tried messing with the deps and have had no luck yet.
What worked for me was adding these extra dependencies that I've seen other TS project use.
- "@tensorflow/tfjs-backend-webgpu": "^0.0.1-alpha.19",
- "react-native-unimodules": "^0.14.10"
and running npm i --legacy-peer-deps
idk if it's the --legacy-peer-deps
or the 2 extra modules or both that fixed the problem but I can test it out and check later.
It does have many conflicting peer dependency problems though and it performs very poorly. In terms of model performance and FPS it's very slow and I am hoping that is just from the weird dependency situation and not the actual code
Edit: Another big thing is from @julian-hecker (thank you). expo-camera doesn't support emulators per the docs so that was a big solution to the createProgramObjects problem to just use a device, but then it led to trying to get TS to work with everything. Once that was up now it's the performance problems.
Hi, @mnai01
Thank you for your detailed analysis and I really appreciate your efforts and time you invested in this issue and as I mentioned in the previous comment our concerned team is working on this issue and they'll look into your analysis which you have done, we'll update you soon. Thank you!
System information
Describe the current behavior
On start the camera view will display as completely black and a undefined createProgramObjects error is displayed. I assume this is coming from
\node_modules\@tensorflow\tfjs-react-native\src\camera\camera_webgl_util.ts
as that is the only place I can find the createProgramObjects function, but do not know why its happening. If you comment outTensorCamera
the app doesn't produce an errorDescribe the expected behavior
This code should produce a simple front-camera view using tfjs-react-native
Standalone code to reproduce the issue
App.tsx
Package.json
Other info / logs