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.

[android] IncompatibleClassChangeError: Couldn't find ReactProp.name crash on createContextInBackground

See original GitHub issue

We are using React Native 0.30.0 and are seeing a (relatively infrequent) hard crash when running createReactContextInBackground().

This crash only happens on Android and, from what we can tell, seems to only be affecting Samsung devices.

It also only seems to be happening to devices running Android 5.0.x.

The crash appears to be reflection related. It says that ReactProp is missing name. I cannot tell which ViewManager it appears to be crashing on, but for a sanity check I have double checked all of our viewmanagers and none of them are missing a name prop.

Full stack trace is here:

java.lang.RuntimeException: An error occured while executing doInBackground()
        at android.os.AsyncTask$3.done(AsyncTask.java:300)
        at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
        at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
        at java.util.concurrent.FutureTask.run(FutureTask.java:242)
        at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
        at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.IncompatibleClassChangeError: Couldn't find com.facebook.react.uimanager.annotations.ReactProp.name
        at libcore.reflect.AnnotationAccess.toAnnotationInstance(AnnotationAccess.java:659)
        at libcore.reflect.AnnotationAccess.toAnnotationInstance(AnnotationAccess.java:641)
        at libcore.reflect.AnnotationAccess.getDeclaredAnnotation(AnnotationAccess.java:170)
        at java.lang.reflect.Method.getAnnotation(Method.java:301)
        at com.facebook.react.uimanager.ViewManagersPropertyCache.extractPropSettersFromViewManagerClassDefinition(ViewManagersPropertyCache.java:400)
        at com.facebook.react.uimanager.ViewManagersPropertyCache.getNativePropSettersForViewManagerClass(ViewManagersPropertyCache.java:301)
        at com.facebook.react.uimanager.ViewManagersPropertyCache.getNativePropSettersForViewManagerClass(ViewManagersPropertyCache.java:298)
        at com.facebook.react.uimanager.ViewManagersPropertyCache.getNativePropSettersForViewManagerClass(ViewManagersPropertyCache.java:298)
        at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackViewManagerSetter.<init>(ViewManagerPropertyUpdater.java:115)
        at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackViewManagerSetter.<init>(ViewManagerPropertyUpdater.java:110)
        at com.facebook.react.uimanager.ViewManagerPropertyUpdater.findManagerSetter(ViewManagerPropertyUpdater.java:73)
        at com.facebook.react.uimanager.ViewManagerPropertyUpdater.getNativeProps(ViewManagerPropertyUpdater.java:60)
        at com.facebook.react.uimanager.ViewManager.getNativeProps(ViewManager.java:199)
        at com.facebook.react.uimanager.UIManagerModuleConstantsHelper.createConstants(UIManagerModuleConstantsHelper.java:62)
        at com.facebook.react.uimanager.UIManagerModule.createConstants(UIManagerModule.java:132)
        at com.facebook.react.uimanager.UIManagerModule.<init>(UIManagerModule.java:84)
        at com.facebook.react.CoreModulesPackage.createNativeModules(CoreModulesPackage.java:66)
        at com.facebook.react.ReactInstanceManagerImpl.processPackage(ReactInstanceManagerImpl.java:923)
        at com.facebook.react.ReactInstanceManagerImpl.createReactContext(ReactInstanceManagerImpl.java:829)
        at com.facebook.react.ReactInstanceManagerImpl.access$700(ReactInstanceManagerImpl.java:99)
        at com.facebook.react.ReactInstanceManagerImpl$ReactContextInitAsyncTask.doInBackground(ReactInstanceManagerImpl.java:196)
        at com.facebook.react.ReactInstanceManagerImpl$ReactContextInitAsyncTask.doInBackground(ReactInstanceManagerImpl.java:179)
        at android.os.AsyncTask$2.call(AsyncTask.java:288)
        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
        at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
        at java.lang.Thread.run(Thread.java:818)

Has anyone else observed this? We haven’t been able to reproduce on a device ourselves.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
astreetcommented, Aug 11, 2016

Here is the Android bug tracker issue: https://code.google.com/p/android/issues/detail?id=172339

0reactions
joshjhargreavescommented, Mar 20, 2018

Hey @lelandrichardson did you end up finding a fix to this?

We’re still seeing a lot of crashes on React native 0.53 with the same Stack trace, all Samsung 5.x devices.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

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