wordpress-mobile / gutenberg-mobile

Mobile version of Gutenberg - native iOS and Android
GNU General Public License v2.0
243 stars 56 forks source link

SIGABRT: Assertion failed: (object->ctx_ == ctx_ && "Don't try to clone an object backed by a different Runtime") #5862

Closed sentry-io[bot] closed 1 year ago

sentry-io[bot] commented 1 year ago

Sentry Issue: JETPACK-IOS-D8

SIGABRT: Assertion failed: (object->ctx_ == ctx_ && "Don't try to clone an object backed by a different Runtime"), function cloneObject, file JSCRuntime.cpp, line 619.
 > cloneObject > JSCRuntime.cpp > object->ctx_ == ctx_ && "Don't try to clone an object backed by a different Runtime"
  File "JSCRuntime.cpp", line 617, in facebook::jsc::JSCRuntime::cloneObject
  File "JSCRuntime.cpp", line 617, in facebook::jsc::JSCRuntime::cloneObject
  File "jsi.h", line 1005, in facebook::jsi::Value::Value
  File "jsi-inl.h", line 40, in facebook::jsi::detail::toValue<T>
  File "jsi-inl.h", line 117, in facebook::jsi::Object::setProperty<T>
...
(115 additional frame(s) were not displayed)

How to reproduce it

  1. Navigate to the post list screen.
  2. Create a new empty post via tapping the FAB then "Blog post."
  3. Await for the title to receive focus and keyboard to begin displaying.
  4. Close the post around the time when the title focus occurs to (presumably) disrupt keyboard-related animations.
  5. Repeat steps 2-4 until the app crashes. Note that a crash occurs quite infrequently.
dcalhoun commented 1 year ago

I was able to reproduce this crash (TestFlight report, Sentry issue) using an iPhone SE running iOS 16.5 and Jetpack 22.6.0.0 with the following steps:

  1. Navigate to the post list screen.
  2. Create a new empty post via tapping the FAB then "Blog post."
  3. Await for the title to receive focus and keyboard to begin displaying.
  4. Close the post around the time when the title focus occurs to (presumably) disrupt keyboard-related animations.
  5. Repeat steps 2-4 until the app crashes. Note that a crash occurs quite infrequently.
derekblank commented 1 year ago

I wasn't able to reproduce this after following the steps above for 50+ repetitions, both .com and self-hosted sites. iPhone SE, iOS 16.3.1 and iOS 16.5, Jetpack 22.6.0.0.

From https://github.com/WordPress/gutenberg/issues/41686:

Upgrading to Reanimated 2.6.0 might solve the issue. Another possible culprit might be our version of the React Navigation library, which uses Reanimated and might produce a conflict between using v1 and v2 of Reanimated.

This is plausible. A React Navigation upgrade may help. Gutenberg Mobile currently implements react-navigation/core@5.12.0, and the latest is 6.4.8. A comparison of the Reanimated versions each of those implements:

react-navigation/core@5.12.0 (current) -> react-native-reanimated@1.8.0 react-navigation/core@6.4.8 (latest) -> react-native-reanimated@2.9.1

fluiddot commented 1 year ago

Version 23.0 has been released already for a week and no events have been reported related to this crash 🎊. Hence we can consider it as solved.