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

Android Crash for Interface to class issues #33198

Closed
aaryavrate opened this issue Mar 1, 2022 · 3 comments
Closed

Android Crash for Interface to class issues #33198

aaryavrate opened this issue Mar 1, 2022 · 3 comments
Labels
Needs: Triage 🔍 Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.

Comments

@aaryavrate
Copy link

aaryavrate commented Mar 1, 2022

Description

This is related to this crash at exact same spot but possibly due to a different reason.

I tried the patch but the crash still happens. I have also tried changing the reanimated plugin to 2.4.1. But nothing so far works.



    java.lang.IncompatibleClassChangeError: Found interface com.facebook.react.uimanager.events.EventDispatcher, but class was expected (declaration of 'com.facebook.react.uimanager.events.EventDispatcher' appears in /data/app/mirror.hellodr.com-sY8MuWdaE2MQdloWpHMtcA==/base.apk!classes3.dex)
        at com.swmansion.reanimated.NodesManager.<init>(NodesManager.java:116)
        at com.swmansion.reanimated.ReanimatedModule.getNodesManager(ReanimatedModule.java:95)
        at com.swmansion.reanimated.ReanimatedModule.access$000(ReanimatedModule.java:24)
        at com.swmansion.reanimated.ReanimatedModule$1.execute(ReanimatedModule.java:80)
        at com.facebook.react.uimanager.UIViewOperationQueue$UIBlockOperation.execute(UIViewOperationQueue.java:573)
        at com.facebook.react.uimanager.UIViewOperationQueue$1.run(UIViewOperationQueue.java:908)
        at com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches(UIViewOperationQueue.java:1019)
        at com.facebook.react.uimanager.UIViewOperationQueue.access$2600(UIViewOperationQueue.java:47)
        at com.facebook.react.uimanager.UIViewOperationQueue$2.runGuarded(UIViewOperationQueue.java:977)
        at com.facebook.react.bridge.GuardedRunnable.run(GuardedRunnable.java:31)
        at android.os.Handler.handleCallback(Handler.java:883)
        at android.os.Handler.dispatchMessage(Handler.java:100)
        at android.os.Looper.loop(Looper.java:237)
        at android.app.ActivityThread.main(ActivityThread.java:7830)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1040)

Version

0.64.3

Output of npx react-native info

System:
OS: macOS 12.1
CPU: (8) arm64 Apple M1
Memory: 88.23 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 17.6.0 - /opt/homebrew/bin/node
Yarn: 1.22.17 - /opt/homebrew/bin/yarn
npm: 8.5.1 - /opt/homebrew/bin/npm
Watchman: 2022.02.21.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.2 - /Users/prabhatsingh/.gem/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
Android SDK:
API Levels: 23, 28, 29, 30, 31, 32
Build Tools: 29.0.2, 30.0.2, 32.0.0
System Images: android-32 | Google APIs ARM 64 v8a, android-32 | Google Play Intel x86 Atom_64
Android NDK: 22.1.7171670
IDEs:
Android Studio: 2021.1 AI-211.7628.21.2111.8193401
Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
Languages:
Java: 11.0.13 - /Library/Java/JavaVirtualMachines/jdk-11.0.13.jdk/Contents/Home/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.1 => 17.0.1
react-native: 0.64.3 => 0.64.3
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

Steps to reproduce

Build a basic bare repo with below package.json.


"dependencies": {
    "@bortolilucas/react-native-jitsimeet": "^1.3.5",
    "@react-native-community/datetimepicker": "4.0.0",
    "@react-native-community/masked-view": "0.1.10",
    "@react-native-community/netinfo": "5.0.0",
    "@react-native-picker/picker": "^2.2.1",
    "@react-navigation/bottom-tabs": "^6.0.9",
    "@react-navigation/compat": "^5.1.25",
    "@react-navigation/drawer": "5.12.4",
    "@react-navigation/native": "5.9.3",
    "@stripe/stripe-react-native": "0.2.3",
    "axios": "^0.22.0",
    "convert-string": "^0.1.0",
    "dependencies": "^0.0.1",
    "expo": "^44.0.3",
    "expo-app-loading": "~1.3.0",
    "expo-asset": "~8.4.5",
    "expo-font": "~10.0.4",
    "expo-linear-gradient": "~11.0.0",
    "expo-modules-core": "~0.6.3",
    "expo-secure-store": "^11.1.1",
    "expo-splash-screen": "~0.14.1",
    "expo-status-bar": "~1.2.0",
    "galio-framework": "^0.7.1",
    "install": "^0.13.0",
    "moment": "^2.29.1",
    "peer": "^0.6.1",
    "react": "17.0.1",
    "react-content-loader": "^6.0.3",
    "react-dom": "17.0.1",
    "react-native": "0.64.3",
    "react-native-ble-manager": "^8.0.1",
    "react-native-bluetooth-status": "^1.5.1",
    "react-native-chart-kit": "^6.11.0",
    "react-native-codegen": "^0.0.12",
    "react-native-document-picker": "^6.0.4",
    "react-native-dotenv": "^3.2.0",
    "react-native-dropdown-picker": "^3.7.0",
    "react-native-fetch-blob": "^0.10.8",
    "react-native-flash-message": "^0.2.0",
    "react-native-gesture-handler": "~2.1.0",
    "react-native-image-picker": "^4.6.0",
    "react-native-linear-gradient": "^2.5.6",
    "react-native-modal-dropdown": "git+https://github.com/siemiatj/react-native-modal-dropdown.git",
    "react-native-nodemediaclient": "^0.2.18",
    "react-native-reanimated": "1.13.4",
    "react-native-restart": "0.0.22",
    "react-native-safe-area-context": "3.3.2",
    "react-native-screens": "~3.10.1",
    "react-native-sha256": "^1.4.7",
    "react-native-svg": "12.1.1",
    "react-native-toast-message": "^1.6.0",
    "react-native-update-gradle": "^1.2.0",
    "react-native-vector-icons": "^9.1.0",
    "react-native-web": "0.17.1",
    "react-native-webview": "11.15.0",
    "react-redux": "^7.2.5",
    "react-router-native": "^5.2.0",
    "react-use-faceapi": "^1.0.1",
    "redux": "^4.1.1",
    "socket.io-client": "^4.1.2",
    "storyblok-js-client": "^4.1.4"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@babel/preset-react": "^7.16.7",
    "@babel/preset-typescript": "^7.16.7",
    "@types/react-native": "~0.64.12",
    "app-icon": "^0.13.2",
    "babel-jest": "~25.2.6",
    "babel-preset-expo": "9.0.1",
    "cross-env": "^7.0.0",
    "expo-cli": "^3.11.7",
    "jest-expo": "^44.0.0",
    "metro-config": "^0.67.0",
    "react-test-renderer": "~16.13.1",
    "reactotron-react-native": "^5.0.1",
    "reactotron-redux": "^3.1.3"
  },

Snack, code example, screenshot, or link to a repository

No response

@cortinico
Copy link
Contributor

java.lang.IncompatibleClassChangeError: Found interface com.facebook.react.uimanager.events.EventDispatcher, but class was expected (declaration of 'com.facebook.react.uimanager.events.EventDispatcher' appears in /data/app/mirror.hellodr.com-sY8MuWdaE2MQdloWpHMtcA==/base.apk!classes3.dex)
at com.swmansion.reanimated.NodesManager.(NodesManager.java:116)
at com.swmansion.reanimated.ReanimatedModule.getNodesManager(ReanimatedModule.java:95)
at com.swmansion.reanimated.ReanimatedModule.access$000(ReanimatedModule.java:24)
at com.swmansion.reanimated.ReanimatedModule$1.execute(ReanimatedModule.java:80)

The tip of the stack trace is from Reanimated + you're using a really old RN versions. There is nothing much actionable here.

I suggest you open another issue on the re-animated repo first.

@Ramzankhan123
Copy link

java.lang.IncompatibleClassChangeError: Found class com.facebook.react.uimanager.events.EventDispatcher, but interface was expected

getting error in RN "0.62.2" any suggestion ?

@mgroupservice
Copy link

IncompatibleClassChangeError

Same issue here "0.62.2", Have you got any solution for it ?

@facebook facebook locked as resolved and limited conversation to collaborators Mar 1, 2023
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Mar 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs: Triage 🔍 Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants