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

ANR caused by performOperations #5884

Open
andordavoti opened this issue Apr 10, 2024 · 4 comments
Open

ANR caused by performOperations #5884

andordavoti opened this issue Apr 10, 2024 · 4 comments
Labels
Missing info The user didn't precise the problem enough Missing repro This issue need minimum repro scenario Platform: Android This issue is specific to Android

Comments

@andordavoti
Copy link

andordavoti commented Apr 10, 2024

Description

We are seeing multiple ANRs with reanimated at the top of the stack trace. These are not showing in Sentry or Firebase Crashlytics, only in Play Store release which is now penalising our app.

Stack trace:
"main" tid=1 Timed Waiting

at java.lang.Object.wait (Native method)
at java.lang.Thread.parkFor$ (Thread.java:2153)
at sun.misc.Unsafe.park (Unsafe.java:358)
at java.util.concurrent.locks.LockSupport.parkNanos (LockSupport.java:230)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos (AbstractQueuedSynchronizer.java:1061)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos (AbstractQueuedSynchronizer.java:1352)
at java.util.concurrent.Semaphore.tryAcquire (Semaphore.java:415)
at com.swmansion.reanimated.NodesManager.performOperations (NodesManager.java:242)
at com.swmansion.reanimated.nativeProxy.NativeProxyCommon.maybeFlushUIUpdatesQueue (NativeProxyCommon.java:262)
at com.swmansion.reanimated.AndroidUIScheduler.triggerUI (Native method)
at com.swmansion.reanimated.AndroidUIScheduler$1.run (AndroidUIScheduler.java:24)
at com.swmansion.reanimated.AndroidUIScheduler$2.runGuarded (AndroidUIScheduler.java:43)
at com.facebook.react.bridge.GuardedRunnable.run (GuardedRunnable.java:29)
at android.os.Handler.handleCallback (Handler.java:795)
at android.os.Handler.dispatchMessage (Handler.java:99)
at android.os.Looper.loop (Looper.java:166)
at android.app.ActivityThread.main (ActivityThread.java:6861)
at java.lang.reflect.Method.invoke (Native method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:450)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:936)

Other reports from Google Play:

Android versions affected: 11-7
Devices: HUAWEI HWDRA-MG, realme RMX2180, Redmi begonia, TCL HONG_KONG, etc

Steps to reproduce

There was a similar report previously: #2251. But the last comment here says that this should be fixed after v3. So maybe this is a regression? Other than that, it's hard to provide concrete steps to reproduce.

Reanimated version

3.6.2

React Native version

0.73.6

Platforms

Android

JavaScript runtime

Hermes

Workflow

Expo Dev Client

Architecture

Paper (Old Architecture)

Build type

Release app & production bundle

Device

Real device

Device model

HUAWEI HWDRA-MG, realme RMX2180, Redmi begonia, TCL HONG_KONG, etc.

Acknowledgements

Yes

@github-actions github-actions bot added the Platform: Android This issue is specific to Android label Apr 10, 2024
Copy link

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

@github-actions github-actions bot added Missing repro This issue need minimum repro scenario Missing info The user didn't precise the problem enough labels Apr 10, 2024
Copy link

Hey! 👋

It looks like you've omitted a few important sections from the issue template.

Please complete Snack or a link to a repository section.

@sabin10
Copy link

sabin10 commented May 2, 2024

Happens to us too, but in our case sentry catched it:

io.sentry.android.core.ApplicationNotResponding: ANR for at least 5000 ms.
    at com.swmansion.reanimated.AndroidUIScheduler.triggerUI(AndroidUIScheduler.java)
    at com.swmansion.reanimated.AndroidUIScheduler$1.run(AndroidUIScheduler.java:24)
    at com.swmansion.reanimated.AndroidUIScheduler$2.runGuarded(AndroidUIScheduler.java:43)
    at com.facebook.react.bridge.GuardedRunnable.run(GuardedRunnable.java:29)
    at android.os.Handler.handleCallback(Handler.java:790)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:192)
    at android.app.ActivityThread.main(ActivityThread.java:6711)
    at java.lang.reflect.Method.invoke(Method.java)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:549)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:826)

react-native: '0.73.7'
react-native-reanimated: '3.8.1'

@Cshayan
Copy link

Cshayan commented May 8, 2024

@sabin10 Hi, have you found any fix for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing info The user didn't precise the problem enough Missing repro This issue need minimum repro scenario Platform: Android This issue is specific to Android
Projects
None yet
Development

No branches or pull requests

3 participants