-
-
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
🐛 Error when using frameProcessor on iOS (V3 - RN 0.72.4) #1776
Comments
@fedpre I ran into the same crash issue downgraded RN to 0.72.3 and worked fine. Used the same versions as vision-camera example app. |
I have the same problem on Android too, but downgrading RN did not work for me 🙁 |
Same downgrading didn't fix it |
Are you able to run the example project? |
Did you try to clean babel cache? looks like a Worklets issue? Is Reanimated installed? |
@mrousavy For now I always restart metro with --reset-cache flag. I have installed the latest nightly of reanimated because previous versions did not work, I got a weird typescript error which I could not resolve. |
@mrousavy Yes, yes, and yes. The weird thing is that the preview is working (I see the image captured) but everything else is frozen and I can't do anything. |
Were you able to make it work this way? |
@fedpre Unfortunately not. I just wanted to stated my scenario, but I had no luck with making it work. |
Had the same error here. After removing packages (changing to older versions) and adding several new "@babel/..." dev packages it was disappeared. Seems that some packages have problems with ES standards in JS code. |
@Zuxelus I'm having the same issue, what packages did you remove and what babel packages did you add? |
Only happens in iOS release build, not debug build for me. |
react-reanimated 3.4.0 and 3.4.1 have some problems. |
Could somebody try to disable hermes in android\gradle.properties (hermesEnabled=false) and share the real error because I had only one Android device and for unknown reason I cannot reproduce this error any more? |
AndroidI tried to disable hermes on gradle.properties, application not crash with iOSOn iOS with hermes disabled on Podfile, application not crash on release. Camera works, but seems frameProcessor doesn't work, on logs still @Zuxelus do you try to check it in release mode? |
I don't have this error even if I install an app_release.apk. But if send this file to someone else they have an error. Go back to issue. "invalid empty parentheses" is just an internal hermes message. Without hermes you get correct JS error. How to get bundle |
This might be a Reanimated issue. Can you guys reproduce this without reanimated? |
Thanks a lot @mrousavy. I test it now, and yes ❤️ it seems a conficlit with reanimated. I remove all reanimated dependencies on my project, clean code and reinstall all pods and I can confirm that works on Debug and Release mode on iOS. I'll try on Android soon but I think it was the same problem. I installed reanimated cause I saw that |
I am hitting this issue and my project does not use reanimated. package.json: |
Hello @fedpre + @justinmann I encountered two issues while using this library, but when I initiated a new project from scratch, I managed to make it work. You can check out my TEMPLATE to see if it helps. the other issue that I fixed start again was this one #1804. |
I have seen the log message The error appears to be in the Given that Anyway, here is the patch for |
@matthewrothery which Reanimated version do you use? I think this is an issue with Reanimated interop, as maybe you use the Reanimated |
I created a totally new environment and was able to reproduce this error on Android Emulator. After adding the patch the error was fixed on emulator but when I made an assemble release the error was there. So I have this error on real device even with this patch. Tried 3 different versions of reanimated. |
@mrousavy I am using @Zuxelus I should have added that I my fix was tested and worked for a physical ios device. I'll be diving into my custom frame processor for android today/tomorrow and will see if I have the same issue as you. Given that there is a new version of |
Downgrading |
This can happen without reanimated when you forget to add the plugin |
Was having issues with react-native 0.72.5 and react-native-vision-camera 3.1.0. Downgrading reanimated fixed it for me. |
Hey - this should be fixed with the latest update in VisionCamera V3 (🥳) - if not, please create a new issue. If your issue has been fixed, consider sponsoring me on GitHub to say thanks 💖 |
The issue persisted on 3.2.2, fixing version of react-native-reanimated to ~3.4.2 fixed it for me. |
the issue still exists in release build. Dev build is working!
if hermes is enabled the app crashes with
if hermes is disables the app does not crash, but throw the following error when using a frameprocessor
In the release build
|
Same error as above. To reproduce:
Example app in Debug is working fine |
@SimonJakubowski hm, maybe we can check how Reanimated does this. I'd say if location is left out there is something wrong with the Babel plugin (either Worklets' or Reanimated's), or we can just fall back to not having location (which would suck since that doesnt have stacktraces then) |
"react-native-reanimated": "3.4.2", Still getting the same error when building (release mode) on physical device with Xcode 15. Is there a fix/workaround? I tried what was proposed above but with no luck. |
@fedpre Here is a workaround patch. Not sure of the consequences Thanks to @SimonJakubowski index 2c643b3..d8ce821 100644
--- a/node_modules/react-native-worklets-core/cpp/WKTJsiWorklet.h
+++ b/node_modules/react-native-worklets-core/cpp/WKTJsiWorklet.h
@@ -274,13 +274,13 @@ private:
jsi::Value locationProp = initDataProp.asObject(runtime).getProperty(
runtime, PropNameWorkletInitDataLocation);
- if (locationProp.isUndefined() || locationProp.isNull() ||
- !locationProp.isString()) {
- return;
- }
+ // if (locationProp.isUndefined() || locationProp.isNull() ||
+ // !locationProp.isString()) {
+ // return;
+ // }
- // Set location
- _location = locationProp.asString(runtime).utf8(runtime);
+ // // Set location
+ // _location = locationProp.asString(runtime).utf8(runtime);
// Let us try to install the function in the worklet context
_code = initDataProp.asObject(runtime) |
"react-native": "0.72.3", |
I also see this issue: libc++abi: terminating due to uncaught exception of type facebook::jsi::JSINativeException: Compiling JS failed: 1:1:invalid empty parentheses '( )' Buffer size 3 starts with: 280a29
|
The error is fixed with @SimonJakubowski patch. However, I would be curious to understand the repercussion of taking away that piece of code! Thanks @rajdhakate-unacademy to point that out I actually somehow missed that comment! |
Hey @SimonJakubowski / @rajdhakate-unacademy - I think the ideal approach is to figure out how the new location prop is handled in reanimated? is it no longer called Thanks. |
@mrousavy Something a bit unrelated, after fixing the error, I tried to build a custom frame processor. Followed the latest guidelines, but it didn't work, meaning that the frame processor seemed not registered in the native side. Sure enough, I tried to change the |
@fedpre Yea I suddenly received a lot of complaints after I changed that, could you maybe submit a PR targeting the |
I couldn't make my app work even after patching the worklets package. I noticed this happened after updating to iOS 17 / Xcode 15. Before, everything was working fine. |
This is related: #1843 (comment) Here's a sum up by @bglgwyng: RNVC 3.2.2 + Reanimated 3.3.0 → Functioning properly |
RNVC 3.4.1 + Reanimated 3.5.4 → Caused a crash |
@xseignard Did you use the latest react-native-worklets-core from github(https://github.com/margelo/react-native-worklets-core/tree/800cf1b2cc65704cf5dfbc725aef1ac1dff32481)? |
I can confirm that the latest version of worklets works great for me (debug/release mode)
|
@rafaelmotta can you confirm it works on Android release? Have you tested with proguard enabled? |
This is a WIP: It currently crashes on Android and iOS because of an incompatibility between Reanimated and worklets-core, in order to resolve this I think we would need to update to Reanimated v3 (latest). mrousavy/react-native-vision-camera#1776
I also had the I tried running RNVC v3.7.0 with react-native-worklets-core v0.2.4 and expo v49. Expo v49 is currently running react-native-reanimated v3.3.0. After upgrading manually to react-native-reanimated v3.6.1 and rebuilding project, frame processors started working. Here are the steps I took:
Do not run |
Seems like the babel plugin didnt transpile the worklet properly. |
FYI, if anyone is having this issue in RNVC v4 beta, try using this library combination which works for me. |
What's happening?
I want to use the frame processor on iOS, but I get this error
Reproduceable Code
Relevant log output
Camera Device
No response
Device
iPhone X
VisionCamera Version
3.0.0
Can you reproduce this issue in the VisionCamera Example app?
Additional information
The text was updated successfully, but these errors were encountered: