prscX / react-native-tooltips

React Native: Native Tooltip View
Apache License 2.0
270 stars 40 forks source link

CalledFromWrongThreadException #21

Open badaz opened 5 years ago

badaz commented 5 years ago

Hello again, I managed to setup the package which is working as intended, thanks for the work. However now my sentry server registers some weird errors. I don't know if it comes from the ViewTooltip library that you used but they do not have a corresponding issue on their github. Maybe you know about it ? Here is the log : Only the original thread that created a view hierarchy can touch its views. EXCEPTION (most recent call first) android.view.CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:8508) at android.view.ViewRootImpl.requestLayout(ViewRootImpl.java:1426) at android.view.View.requestLayout(View.java:23203) at android.view.ViewGroup.removeView(ViewGroup.java:5335) at com.github.florent37.viewtooltip.ViewTooltip$TooltipView.removeNow(ViewTooltip.java:812) at com.github.florent37.viewtooltip.ViewTooltip$TooltipView$5.onAnimationEnd(ViewTooltip.java:598) at com.github.florent37.viewtooltip.ViewTooltip$TooltipView$2.onAnimationEnd(ViewTooltip.java:563) at android.view.ViewPropertyAnimator$AnimatorEventListener.onAnimationEnd(ViewPropertyAnimator.java:1122) at android.animation.Animator$AnimatorListener.onAnimationEnd(Animator.java:552) at android.animation.ValueAnimator.endAnimation(ValueAnimator.java:1209) at android.animation.ValueAnimator.cancel(ValueAnimator.java:1094) at android.view.ViewPropertyAnimator.animatePropertyBy(ViewPropertyAnimator.java:966) at android.view.ViewPropertyAnimator.animateProperty(ViewPropertyAnimator.java:922) at android.view.ViewPropertyAnimator.alpha(ViewPropertyAnimator.java:736) at com.github.florent37.viewtooltip.ViewTooltip$FadeTooltipAnimation.animateExit(ViewTooltip.java:332) at com.github.florent37.viewtooltip.ViewTooltip$TooltipView.startExitAnimation(ViewTooltip.java:559) at com.github.florent37.viewtooltip.ViewTooltip$TooltipView.remove(ViewTooltip.java:594) at com.github.florent37.viewtooltip.ViewTooltip$TooltipView.close(ViewTooltip.java:806) at com.github.florent37.viewtooltip.ViewTooltip.close(ViewTooltip.java:190) at com.reactlibrary.RNTooltipsModule.Dismiss(RNTooltipsModule.java:115) at java.lang.reflect.Method.invoke(Method.java) at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372) at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:160) at com.facebook.react.bridge.queue.NativeRunnable.run(NativeRunnable.java) at android.os.Handler.handleCallback(Handler.java:789) at android.os.Handler.dispatchMessage(Handler.java:98) at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29) at android.os.Looper.loop(Looper.java:164) at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192) at java.lang.Thread.run(Thread.java:764)

prateekchachra commented 4 years ago

+1

danielwinkler commented 4 years ago

any news on this ?

danielwinkler commented 4 years ago

@prscX I created a PR to fix it

41