question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

App started crashing with java.lang.IncompatibleClassChangeError

See original GitHub issue

Description

Our app started crashing unexpectedly since a few days ago. Note the versions mentioned below. We haven’t changed anything since a few years, at least 😄 So I’m bamboozled with the error. Halp!

  • react-native-reanimated version - 1.13.4
  • react-native version - 0.63.4
Stack Trace
11-23 09:39:54.141 12984 12984 E AndroidRuntime: java.lang.IncompatibleClassChangeError: Found class com.facebook.react.uimanager.events.EventDispatcher, but interface was expected (declaration of 'com.facebook.react.uimanager.events.EventDispatcher' appears in /data/app/~~ZwNrGB2oFwyVH4qbFfm_bQ==/com.udaan.android.debug-RH-q-8M_1rfGSCiw74UZ1w==/base.apk)
11-23 09:39:54.141 12984 12984 E AndroidRuntime: 	at com.swmansion.reanimated.NodesManager.<init>(NodesManager.java:116)
11-23 09:39:54.141 12984 12984 E AndroidRuntime: 	at com.swmansion.reanimated.ReanimatedModule.getNodesManager(ReanimatedModule.java:95)
11-23 09:39:54.141 12984 12984 E AndroidRuntime: 	at com.swmansion.reanimated.ReanimatedModule.access$000(ReanimatedModule.java:24)
11-23 09:39:54.141 12984 12984 E AndroidRuntime: 	at com.swmansion.reanimated.ReanimatedModule$1.execute(ReanimatedModule.java:80)
11-23 09:39:54.141 12984 12984 E AndroidRuntime: 	at com.facebook.react.uimanager.UIViewOperationQueue$UIBlockOperation.execute(UIViewOperationQueue.java:571)
11-23 09:39:54.141 12984 12984 E AndroidRuntime: 	at com.facebook.react.uimanager.UIViewOperationQueue$1.run(UIViewOperationQueue.java:917)
11-23 09:39:54.141 12984 12984 E AndroidRuntime: 	at com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches(UIViewOperationQueue.java:1028)
11-23 09:39:54.141 12984 12984 E AndroidRuntime: 	at com.facebook.react.uimanager.UIViewOperationQueue.access$2600(UIViewOperationQueue.java:48)
11-23 09:39:54.141 12984 12984 E AndroidRuntime: 	at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:1088)
11-23 09:39:54.141 12984 12984 E AndroidRuntime: 	at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:29)
11-23 09:39:54.141 12984 12984 E AndroidRuntime: 	at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:175)
11-23 09:39:54.141 12984 12984 E AndroidRuntime: 	at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:85)
11-23 09:39:54.141 12984 12984 E AndroidRuntime: 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1035)
11-23 09:39:54.141 12984 12984 E AndroidRuntime: 	at android.view.Choreographer.doCallbacks(Choreographer.java:845)
11-23 09:39:54.141 12984 12984 E AndroidRuntime: 	at android.view.Choreographer.doFrame(Choreographer.java:775)
11-23 09:39:54.141 12984 12984 E AndroidRuntime: 	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1022)
11-23 09:39:54.141 12984 12984 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:938)
11-23 09:39:54.141 12984 12984 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:99)
11-23 09:39:54.141 12984 12984 E AndroidRuntime: 	at android.os.Looper.loopOnce(Looper.java:201)
11-23 09:39:54.141 12984 12984 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:288)
11-23 09:39:54.141 12984 12984 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7839)
11-23 09:39:54.141 12984 12984 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
11-23 09:39:54.141 12984 12984 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
11-23 09:39:54.141 12984 12984 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)

Steps to reproduce

  1. Open app
  2. See error

Snack or a link to a repository

No link available

Reanimated version

1.13.4

React Native version

0.63.4

Platforms

Android

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

Paper (Old Architecture)

Build type

Debug mode

Device

Android emulator

Device model

Pixel 5

Acknowledgements

Yes

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:5

github_iconTop GitHub Comments

4reactions
KarandikarMihircommented, Nov 29, 2022

So I did this using patch-package and it seems to have fixed it for now. Will post more updates if needed.

node_modules/react-native-reanimated/android/build.gradle -

-    implementation 'com.facebook.react:react-native:+'  // From node_modules
+    implementation 'com.facebook.react:react-native:0.63.4'  // From node_modules

UPDATE:

  • This is fixed by react-native team. I removed this patch and just upgraded react-native to 0.63.5.
0reactions
khanhtn91commented, Dec 11, 2022

So I did this using patch-package and it seems to have fixed it for now. Will post more updates if needed.

node_modules/react-native-reanimated/android/build.gradle -

-    implementation 'com.facebook.react:react-native:+'  // From node_modules
+    implementation 'com.facebook.react:react-native:0.63.4'  // From node_modules

UPDATE:

  • This is fixed by react-native team. I removed this patch and just upgraded react-native to 0.63.5.

Thank @KarandikarMihir , that work for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

android - java.lang.IncompatibleClassChangeError inside ...
We had similar crashes in release since AGP 7.0.0-alpha12. The crashes are gone after updating the desugaring library to version 1.1.5 .
Read more >
com.google.android.gms.dynamic.ObjectWrapper [232131782 ...
IncompatibleClassChangeError : The method 'java.lang. ... so just after upgrading, device started crashing randomly without performing any specific steps?
Read more >
Is anybody seeing java.lang.IncompatibleClassChangeError ...
IncompatibleClassChangeError from Lollipop Samsung phones? I see several issues, multiple crashes with java.lang.IncompatibleClassChangeError.
Read more >
JDK-8255592 IntelliJ idea crash with # Problematic frame: # C ...
JDK-8244818 - [macos] Java2D Queue Flusher crash while moving application ... <a 'java/lang/IncompatibleClassChangeError'{0x00000007818acad0}: Found class ...
Read more >
IGV continuously crashing - Google Groups
INFO [2014-08-04 14:42:01,126] [Main.java:85] [main] Startup IGV Version 2.3.34 ... Are you using the Mac app bundle, or the "Web Start" buttons on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found