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

ReactNoCrashSoftException: "Cannot find EventEmitter for receivedTouches" warning in Android Native UI Component #46501

Open
dekim1028 opened this issue Sep 15, 2024 · 6 comments
Labels
Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. Needs: Author Feedback Platform: Android Android applications.

Comments

@dekim1028
Copy link

dekim1028 commented Sep 15, 2024

Description

We are creating an Android Native UI Component consisting of ViewPager2 and RecyclerView.
When a touch occurs in RecyclerView, the following error occurs.

Steps to reproduce

  1. Run the project.
  2. Scroll through the thumbnail list.

React Native Version

0.75.3

Affected Platforms

Runtime - Android

Output of npx react-native info

System:
  OS: macOS 14.1
  CPU: (12) arm64 Apple M2 Pro
  Memory: 96.50 MB / 32.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.11.1
    path: ~/.nvm/versions/node/v20.11.1/bin/node
  Yarn: Not Found
  npm:
    version: 10.2.4
    path: ~/.nvm/versions/node/v20.11.1/bin/npm
  Watchman:
    version: 2023.10.23.00
    path: /usr/local/bin/watchman
Managers:
  CocoaPods:
    version: 1.14.3
    path: /usr/local/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.4
      - iOS 17.4
      - macOS 14.4
      - tvOS 17.4
      - visionOS 1.1
      - watchOS 10.4
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.1 AI-241.18034.62.2412.12266719
  Xcode:
    version: 15.3/15E204a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.11
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.75.3
    wanted: 0.75.3
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: Not found
  newArchEnabled: false

Stacktrace or Logs

Unhandled SoftException
com.facebook.react.bridge.ReactNoCrashSoftException: Cannot find EventEmitter for receivedTouches: ReactTag[2131230852] UIManagerType[2] EventName[topTouchStart]
	at com.facebook.react.uimanager.events.ReactEventEmitter.receiveTouches(ReactEventEmitter.java:102)
	at com.facebook.react.uimanager.events.TouchEvent.dispatchModern(TouchEvent.kt:124)
	at com.facebook.react.uimanager.events.EventDispatcherImpl$DispatchEventsRunnable.run(EventDispatcherImpl.java:376)
	at android.os.Handler.handleCallback(Handler.java:958)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
	at android.os.Looper.loopOnce(Looper.java:230)
	at android.os.Looper.loop(Looper.java:319)
	at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:235)
	at java.lang.Thread.run(Thread.java:1012)

Unhandled SoftException
com.facebook.react.bridge.ReactNoCrashSoftException: Cannot find EventEmitter for receivedTouches: ReactTag[2131230852] UIManagerType[2] EventName[topTouchMove]
	at com.facebook.react.uimanager.events.ReactEventEmitter.receiveTouches(ReactEventEmitter.java:102)
	at com.facebook.react.uimanager.events.TouchEvent.dispatchModern(TouchEvent.kt:124)
	at com.facebook.react.uimanager.events.EventDispatcherImpl$DispatchEventsRunnable.run(EventDispatcherImpl.java:376)
	at android.os.Handler.handleCallback(Handler.java:958)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
	at android.os.Looper.loopOnce(Looper.java:230)
	at android.os.Looper.loop(Looper.java:319)
	at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:235)
	at java.lang.Thread.run(Thread.java:1012)
Unhandled SoftException
com.facebook.react.bridge.ReactNoCrashSoftException: Cannot find EventEmitter for receivedTouches: ReactTag[2131230852] UIManagerType[2] EventName[topTouchEnd]
	at com.facebook.react.uimanager.events.ReactEventEmitter.receiveTouches(ReactEventEmitter.java:102)
	at com.facebook.react.uimanager.events.TouchEvent.dispatchModern(TouchEvent.kt:124)
	at com.facebook.react.uimanager.events.EventDispatcherImpl$DispatchEventsRunnable.run(EventDispatcherImpl.java:376)
	at android.os.Handler.handleCallback(Handler.java:958)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
	at android.os.Looper.loopOnce(Looper.java:230)
	at android.os.Looper.loop(Looper.java:319)
	at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:235)
	at java.lang.Thread.run(Thread.java:1012)

Reproducer

https://github.com/dekim1028/error

Screenshots and Videos

1.mov
@react-native-bot react-native-bot added the Platform: Android Android applications. label Sep 15, 2024
@cortinico cortinico added Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. and removed Needs: Triage 🔍 labels Sep 16, 2024
@dekim1028
Copy link
Author

@cortinico Is there any confirmation on this issue?

@cortinico
Copy link
Contributor

@cortinico Is there any confirmation on this issue?

Nope not yet.

@dekim1028
Copy link
Author

@cortinico Do you have any suspicions about the cause of this phenomenon? I'm curious why this error occurs.

@cortinico cortinico changed the title "Cannot find EventEmitter for receivedTouches" error in Android Native UI Component ReactNoCrashSoftException: "Cannot find EventEmitter for receivedTouches" warning in Android Native UI Component Oct 4, 2024
@cortinico
Copy link
Contributor

@cortinico Do you have any suspicions about the cause of this phenomenon? I'm curious why this error occurs.

Hey @dekim1028
I briefly looked into this. What you're seeing is not an error but a warning (ReactNoCrashSoftException).

We make those warnings for debugging purposes.

I have a couple of follow-ups for you:

  1. Is the functionality of your apps affected in any form?
  2. Is this happening both on Old and New Architecture?

@ilber
Copy link

ilber commented Oct 11, 2024

Hey @cortinico I have the same problem on my app when integrating a native view. I don't have the new architecture enabled and the error appears as soon as I click the native view.
Many of those warnings are printed:

 Unhandled SoftException com.facebook.react.bridge.ReactNoCrashSoftException: Cannot find EventEmitter for receivedTouches: ReactTag[2131230898] UIManagerType[2] EventName[topTouchMove]
    at com.facebook.react.uimanager.events.ReactEventEmitter.receiveTouches(ReactEventEmitter.java:102)
    at com.facebook.react.uimanager.events.TouchEvent.dispatchModern(TouchEvent.kt:124)
    at com.facebook.react.uimanager.events.EventDispatcherImpl$DispatchEventsRunnable.run(EventDispatcherImpl.java:376)
    at android.os.Handler.handleCallback(Handler.java:938)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
    at android.os.Looper.loopOnce(Looper.java:226)
    at android.os.Looper.loop(Looper.java:313)
    at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:235)
    at java.lang.Thread.run(Thread.java:920)

Isn't UIManagerType[2] related to fabric? Why is that used even when I don't have it enabled? Maybe the problem is with my native view, but I don't really get the reason for this warning.

Are these warnings displayed only in Debug?

Thanks for your help. Let me know how can I help you to understand more about this.

@cortinico
Copy link
Contributor

Are these warnings displayed only in Debug?

Yes those are debug only messages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. Needs: Author Feedback Platform: Android Android applications.
Projects
None yet
Development

No branches or pull requests

4 participants