laurent22 / joplin

Joplin - the privacy-focused note taking app with sync capabilities for Windows, macOS, Linux, Android and iOS.
https://joplinapp.org
Other
46.05k stars 5.01k forks source link

Crash after opening the app and waiting for one minute #8791

Closed Wladefant closed 1 year ago

Wladefant commented 1 year ago

I opened the app clicked on something and the app crashed

FATAL EXCEPTION: main
Process: net.cozic.joplin, PID: 9825
com.facebook.jni.CppException: Exception in HostFunction: Incompatible object passed to scheduleOnJS. It is only allowed to schedule functions defined on the React Native JS runtime this way.

Error: Exception in HostFunction: Incompatible object passed to scheduleOnJS. It is only allowed to schedule functions defined on the React Native JS runtime this way.
    at _scheduleOnJS (native)
    at anonymous (JavaScript:1:192)
    at anonymous (JavaScript:1:211)
    at anonymous (JavaScript:1:628)
    at handleAndFlushAnimationFrame (JavaScript:1:147)
    at com.swmansion.reanimated.nativeProxy.EventHandler.receiveEvent(Native Method)
    at com.swmansion.reanimated.nativeProxy.EventHandler.receiveEvent(EventHandler.java:25)
    at com.swmansion.gesturehandler.react.RNGestureHandlerStateChangeEvent.dispatch(RNGestureHandlerStateChangeEvent.kt:42)
    at com.swmansion.reanimated.NodesManager.handleEvent(NodesManager.java:314)
    at com.swmansion.reanimated.NodesManager.onEventDispatch(NodesManager.java:290)
    at com.facebook.react.uimanager.events.EventDispatcherImpl.dispatchEvent(EventDispatcherImpl.java:116)
    at com.swmansion.gesturehandler.ReactContextExtensionsKt.dispatchEvent(ReactContextExtensions.kt:9)
    at com.swmansion.gesturehandler.react.RNGestureHandlerModule.sendEventForDirectEvent(RNGestureHandlerModule.kt:638)
    at com.swmansion.gesturehandler.react.RNGestureHandlerModule.sendEventForReanimated(RNGestureHandlerModule.kt:624)
    at com.swmansion.gesturehandler.react.RNGestureHandlerModule.onStateChange(RNGestureHandlerModule.kt:576)
    at com.swmansion.gesturehandler.react.RNGestureHandlerModule.access$onStateChange(RNGestureHandlerModule.kt:38)
    at com.swmansion.gesturehandler.react.RNGestureHandlerModule$eventListener$1.onStateChange(RNGestureHandlerModule.kt:346)
    at com.swmansion.gesturehandler.core.GestureHandler.dispatchStateChange(GestureHandler.kt:84)
    at com.swmansion.gesturehandler.core.GestureHandlerOrchestrator.onHandlerStateChange(GestureHandlerOrchestrator.kt:157)
    at com.swmansion.gesturehandler.core.GestureHandler.moveToState(GestureHandler.kt:551)
    at com.swmansion.gesturehandler.core.GestureHandler.cancel(GestureHandler.kt:640)
    at com.swmansion.gesturehandler.core.GestureHandlerOrchestrator.cancelAll(GestureHandlerOrchestrator.kt:246)
    at com.swmansion.gesturehandler.core.GestureHandlerOrchestrator.onTouchEvent(GestureHandlerOrchestrator.kt:43)
    at com.swmansion.gesturehandler.react.RNGestureHandlerRootHelper.dispatchTouchEvent(RNGestureHandlerRootHelper.kt:97)
    at com.swmansion.gesturehandler.react.RNGestureHandlerRootView.dispatchTouchEvent(RNGestureHandlerRootView.kt:35)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3597)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3597)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3597)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3597)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3597)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3597)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3597)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3597)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3597)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3597)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3597)
    at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:1015)
    at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1962)
    at android.app.Activity.dispatchTouchEvent(Activity.java:4265)
    at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:69)
    at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:973)
    at android.view.View.dispatchPointerEvent(View.java:15335)
    at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:7807)
    at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:7580)
    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6914)
    at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:6971)
    at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:6937)
    at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:7135)
    at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:6945)
    at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:7192)
    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6918)
    at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:6971)
    at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:6937)
    at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:6945)
    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6918)
    at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:10367)
    at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:10215)
    at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:10171)
    at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:10499)
    at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:259)
    at android.os.MessageQueue.nativePollOnce(Native Method)
    at android.os.MessageQueue.next(MessageQueue.java:335)
    at android.os.Looper.loopOnce(Looper.java:186)
    at android.os.Looper.loop(Looper.java:313)
    at android.app.ActivityThread.main(ActivityThread.java:8663)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
laurent22 commented 1 year ago

@personalizedrefrigerator, it seems there are issues with this reanimated lib. Is it possible to revert the commit that added it?

As I understand we've added it to support sliding the sidebar, is that correct?

personalizedrefrigerator commented 1 year ago

The react-native-reanimated dependency was added when switching navigation drawer libraries, to @react-navigation/drawer. It doesn't seem to work without react-native-reanimated.

We can revert to react-native-sidemenu or react-native-sidemenu-updated, but both have accessibility and usability issues and are unmaintained.

I propose:

  1. Switching back to react-native-sidemenu-updated for now.
  2. Either forking react-native-sidemenu-updated and fixing the accessibility/usability issues or finding another navigation drawer library that doesn't depend on react-native-reanimated.
laurent22 commented 1 year ago

Thanks, your solution 1 sounds good, unless indeed you find a good replacement lib that doesn't rely on reanimated. We'll do a patch release once this is fixed

Wladefant commented 1 year ago

Thank you. Don't know if it is the same thing or not but every time I use the back Android gesture it crashes

FATAL EXCEPTION: main
Process: net.cozic.joplin, PID: 24107
com.facebook.jni.CppException: Exception in HostFunction: Incompatible object passed to scheduleOnJS. It is only allowed to schedule functions defined on the React Native JS runtime this way.

Error: Exception in HostFunction: Incompatible object passed to scheduleOnJS. It is only allowed to schedule functions defined on the React Native JS runtime this way.
    at _scheduleOnJS (native)
    at anonymous (JavaScript:1:192)
    at anonymous (JavaScript:1:211)
    at anonymous (JavaScript:1:628)
    at handleAndFlushAnimationFrame (JavaScript:1:147)
    at com.swmansion.reanimated.nativeProxy.EventHandler.receiveEvent(Native Method)
    at com.swmansion.reanimated.nativeProxy.EventHandler.receiveEvent(EventHandler.java:25)
    at com.swmansion.gesturehandler.react.RNGestureHandlerStateChangeEvent.dispatch(RNGestureHandlerStateChangeEvent.kt:42)
    at com.swmansion.reanimated.NodesManager.handleEvent(NodesManager.java:314)
    at com.swmansion.reanimated.NodesManager.onEventDispatch(NodesManager.java:290)
    at com.facebook.react.uimanager.events.EventDispatcherImpl.dispatchEvent(EventDispatcherImpl.java:116)
    at com.swmansion.gesturehandler.ReactContextExtensionsKt.dispatchEvent(ReactContextExtensions.kt:9)
    at com.swmansion.gesturehandler.react.RNGestureHandlerModule.sendEventForDirectEvent(RNGestureHandlerModule.kt:638)
    at com.swmansion.gesturehandler.react.RNGestureHandlerModule.sendEventForReanimated(RNGestureHandlerModule.kt:624)
    at com.swmansion.gesturehandler.react.RNGestureHandlerModule.onStateChange(RNGestureHandlerModule.kt:576)
    at com.swmansion.gesturehandler.react.RNGestureHandlerModule.access$onStateChange(RNGestureHandlerModule.kt:38)
    at com.swmansion.gesturehandler.react.RNGestureHandlerModule$eventListener$1.onStateChange(RNGestureHandlerModule.kt:346)
    at com.swmansion.gesturehandler.core.GestureHandler.dispatchStateChange(GestureHandler.kt:84)
    at com.swmansion.gesturehandler.core.GestureHandlerOrchestrator.onHandlerStateChange(GestureHandlerOrchestrator.kt:157)
    at com.swmansion.gesturehandler.core.GestureHandler.moveToState(GestureHandler.kt:551)
    at com.swmansion.gesturehandler.core.GestureHandler.cancel(GestureHandler.kt:640)
    at com.swmansion.gesturehandler.core.GestureHandlerOrchestrator.cancelAll(GestureHandlerOrchestrator.kt:246)
    at com.swmansion.gesturehandler.core.GestureHandlerOrchestrator.onTouchEvent(GestureHandlerOrchestrator.kt:43)
    at com.swmansion.gesturehandler.react.RNGestureHandlerRootHelper.dispatchTouchEvent(RNGestureHandlerRootHelper.kt:97)
    at com.swmansion.gesturehandler.react.RNGestureHandlerRootView.dispatchTouchEvent(RNGestureHandlerRootView.kt:35)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3597)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3597)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3597)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3597)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3597)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3597)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3597)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3597)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3597)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3597)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3597)
    at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:1015)
    at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1962)
    at android.app.Activity.dispatchTouchEvent(Activity.java:4265)
    at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:69)
    at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:973)
    at android.view.View.dispatchPointerEvent(View.java:15335)
    at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:7807)
    at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:7580)
    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6914)
    at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:6971)
    at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:6937)
    at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:7135)
    at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:6945)
    at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:7192)
    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6918)
    at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:6971)
    at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:6937)
    at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:6945)
    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6918)
    at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:10367)
    at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:10215)
    at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:10171)
    at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:10499)
    at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:259)
    at android.os.MessageQueue.nativePollOnce(Native Method)
    at android.os.MessageQueue.next(MessageQueue.java:335)
    at android.os.Looper.loopOnce(Looper.java:186)
    at android.os.Looper.loop(Looper.java:313)
    at android.app.ActivityThread.main(ActivityThread.java:8663)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
Wladefant commented 1 year ago

@laurent22 @personalizedrefrigerator when will the new app version come out? Because it sure is very annoying that every time I click on the back button trh app crashes

laurent22 commented 1 year ago

What version do you use? It should be in v2.12.3

Wladefant commented 1 year ago

Yes still no 12.2 no new version on fdroid