diff --git a/.yarn/patches/react-native-animation-fix/react-native-npm-0.71.10-f9c32562d8.patch b/.yarn/patches/react-native-animation-fix/react-native-npm-0.71.10-f9c32562d8.patch new file mode 100644 index 000000000..f3abb4278 --- /dev/null +++ b/.yarn/patches/react-native-animation-fix/react-native-npm-0.71.10-f9c32562d8.patch @@ -0,0 +1,25 @@ +diff --git a/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedModule.java b/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedModule.java +index 0f52b73c61625db2a3081c0950b6bdd2b06e3d40..b0fc3de4be0b3a26b638683613c63c783c2739bb 100644 +--- a/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedModule.java ++++ b/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedModule.java +@@ -38,7 +38,7 @@ import com.facebook.react.uimanager.common.ViewUtil; + import java.util.ArrayList; + import java.util.List; + import java.util.Queue; +-import java.util.concurrent.ConcurrentLinkedQueue; ++import java.util.concurrent.LinkedBlockingQueue; + import java.util.concurrent.atomic.AtomicReference; + + /** +@@ -151,7 +151,10 @@ public class NativeAnimatedModule extends NativeAnimatedModuleSpec + } + + private class ConcurrentOperationQueue { +- private final Queue mQueue = new ConcurrentLinkedQueue<>(); ++ // Patch: Use LinkedBlockingQueue instead of ConcurrentLinkedQueue. ++ // In some versions of Android, ConcurrentLinkedQueue is known to drop ++ // items, causing crashing. See https://github.com/laurent22/joplin/issues/8425 ++ private final Queue mQueue = new LinkedBlockingQueue<>(); + @Nullable private UIThreadOperation mPeekedOperation = null; + + @AnyThread diff --git a/.yarn/patches/react-native-animation-fix/react-native-reanimated-npm-3.3.0-fb4272741c.patch b/.yarn/patches/react-native-animation-fix/react-native-reanimated-npm-3.3.0-fb4272741c.patch new file mode 100644 index 000000000..24a97b696 --- /dev/null +++ b/.yarn/patches/react-native-animation-fix/react-native-reanimated-npm-3.3.0-fb4272741c.patch @@ -0,0 +1,27 @@ +diff --git a/android/src/main/java/com/swmansion/reanimated/NodesManager.java b/android/src/main/java/com/swmansion/reanimated/NodesManager.java +index e974f8eb827a35be4d7e5fa9b096af9387c595dd..bc9e5ff566c9484274e8eacefc88327a5ff30def 100644 +--- a/android/src/main/java/com/swmansion/reanimated/NodesManager.java ++++ b/android/src/main/java/com/swmansion/reanimated/NodesManager.java +@@ -34,7 +34,7 @@ import java.util.List; + import java.util.Map; + import java.util.Queue; + import java.util.Set; +-import java.util.concurrent.ConcurrentLinkedQueue; ++import java.util.concurrent.LinkedBlockingQueue; + import java.util.concurrent.Semaphore; + import java.util.concurrent.TimeUnit; + import java.util.concurrent.atomic.AtomicBoolean; +@@ -80,7 +80,12 @@ public class NodesManager implements EventDispatcherListener { + private ReactApplicationContext mReactApplicationContext; + private RCTEventEmitter mCustomEventHandler; + private List mFrameCallbacks = new ArrayList<>(); +- private ConcurrentLinkedQueue mEventQueue = new ConcurrentLinkedQueue<>(); ++ ++ // Patch: On some versions of Android, ConcurrentLinkedQueue is known to ++ // drop items. LinkedBlockingQueue is a potentially-slower alternative that ++ // should not drop items. ++ // See https://github.com/laurent22/joplin/issues/8425 ++ private LinkedBlockingQueue mEventQueue = new LinkedBlockingQueue<>(); + public double currentFrameTimeMs; + public Set uiProps = Collections.emptySet(); + public Set nativeProps = Collections.emptySet(); diff --git a/package.json b/package.json index 4a0eb0a14..a93e590de 100644 --- a/package.json +++ b/package.json @@ -99,6 +99,8 @@ "react-native-vosk@0.1.12": "patch:react-native-vosk@npm%3A0.1.12#./.yarn/patches/react-native-vosk-npm-0.1.12-76b1caaae8.patch", "eslint@8.39.0": "patch:eslint@npm%3A8.39.0#./.yarn/patches/eslint-npm-8.39.0-d92bace04d.patch", "eslint@^8.13.0": "patch:eslint@npm%3A8.39.0#./.yarn/patches/eslint-npm-8.39.0-d92bace04d.patch", - "app-builder-lib@24.4.0": "patch:app-builder-lib@npm%3A24.4.0#./.yarn/patches/app-builder-lib-npm-24.4.0-05322ff057.patch" + "app-builder-lib@24.4.0": "patch:app-builder-lib@npm%3A24.4.0#./.yarn/patches/app-builder-lib-npm-24.4.0-05322ff057.patch", + "react-native@0.71.10": "patch:react-native@npm%3A0.71.10#./.yarn/patches/react-native-animation-fix/react-native-npm-0.71.10-f9c32562d8.patch", + "react-native-reanimated@3.3.0": "patch:react-native-reanimated@npm%3A3.3.0#./.yarn/patches/react-native-animation-fix/react-native-reanimated-npm-3.3.0-fb4272741c.patch" } } diff --git a/yarn.lock b/yarn.lock index 55f6792a0..1882696f2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -27963,6 +27963,27 @@ __metadata: languageName: node linkType: hard +"react-native-reanimated@patch:react-native-reanimated@npm%3A3.3.0#./.yarn/patches/react-native-animation-fix/react-native-reanimated-npm-3.3.0-fb4272741c.patch::locator=root%40workspace%3A.": + version: 3.3.0 + resolution: "react-native-reanimated@patch:react-native-reanimated@npm%3A3.3.0#./.yarn/patches/react-native-animation-fix/react-native-reanimated-npm-3.3.0-fb4272741c.patch::version=3.3.0&hash=13daee&locator=root%40workspace%3A." + dependencies: + "@babel/plugin-transform-object-assign": ^7.16.7 + "@babel/preset-typescript": ^7.16.7 + convert-source-map: ^2.0.0 + invariant: ^2.2.4 + peerDependencies: + "@babel/core": ^7.0.0-0 + "@babel/plugin-proposal-nullish-coalescing-operator": ^7.0.0-0 + "@babel/plugin-proposal-optional-chaining": ^7.0.0-0 + "@babel/plugin-transform-arrow-functions": ^7.0.0-0 + "@babel/plugin-transform-shorthand-properties": ^7.0.0-0 + "@babel/plugin-transform-template-literals": ^7.0.0-0 + react: "*" + react-native: "*" + checksum: 5d73a35e694ab6c37b5f12530e1acdac822f2cceef7d04dcc060cc4c9221f51cf6bb68ed16737b25e79086de9dca6cd322819c6d04d668c9b97526408e97db68 + languageName: node + linkType: hard + "react-native-rsa-native@npm:2.0.5": version: 2.0.5 resolution: "react-native-rsa-native@npm:2.0.5" @@ -28173,6 +28194,52 @@ __metadata: languageName: node linkType: hard +"react-native@patch:react-native@npm%3A0.71.10#./.yarn/patches/react-native-animation-fix/react-native-npm-0.71.10-f9c32562d8.patch::locator=root%40workspace%3A.": + version: 0.71.10 + resolution: "react-native@patch:react-native@npm%3A0.71.10#./.yarn/patches/react-native-animation-fix/react-native-npm-0.71.10-f9c32562d8.patch::version=0.71.10&hash=d4015e&locator=root%40workspace%3A." + dependencies: + "@jest/create-cache-key-function": ^29.2.1 + "@react-native-community/cli": 10.2.2 + "@react-native-community/cli-platform-android": 10.2.0 + "@react-native-community/cli-platform-ios": 10.2.1 + "@react-native/assets": 1.0.0 + "@react-native/normalize-color": 2.1.0 + "@react-native/polyfills": 2.0.0 + abort-controller: ^3.0.0 + anser: ^1.4.9 + base64-js: ^1.1.2 + deprecated-react-native-prop-types: ^3.0.1 + event-target-shim: ^5.0.1 + invariant: ^2.2.4 + jest-environment-node: ^29.2.1 + jsc-android: ^250231.0.0 + memoize-one: ^5.0.0 + metro-react-native-babel-transformer: 0.73.9 + metro-runtime: 0.73.9 + metro-source-map: 0.73.9 + mkdirp: ^0.5.1 + nullthrows: ^1.1.1 + pretty-format: ^26.5.2 + promise: ^8.3.0 + react-devtools-core: ^4.26.1 + react-native-codegen: ^0.71.5 + react-native-gradle-plugin: ^0.71.19 + react-refresh: ^0.4.0 + react-shallow-renderer: ^16.15.0 + regenerator-runtime: ^0.13.2 + scheduler: ^0.23.0 + stacktrace-parser: ^0.1.3 + use-sync-external-store: ^1.0.0 + whatwg-fetch: ^3.0.0 + ws: ^6.2.2 + peerDependencies: + react: 18.2.0 + bin: + react-native: cli.js + checksum: c8c3cd4abfe4031f2c91baa6b26e2a43421dc3a3b221fec408d67c788e477b90dc4c0b206c1a24f82d5d7dae319b5da8ce6a472e346b48936813001d8276a279 + languageName: node + linkType: hard + "react-reconciler@npm:^0.26.2": version: 0.26.2 resolution: "react-reconciler@npm:0.26.2"