Skip to content

Commit e52f13a

Browse files
committed
Patch react-native
Fix iOS native animation (non-nil/non-zero) assertion failure (on initial parentNode then childNode), after nav to bot 4th WebView tab (unable to load pages, likely caused by current excluded RN Promise polyfillGlobal) - Df (Foundation) *** Assertion failure in - disconnectAnimatedNodes:childTag - E [com.facebook.react.log:native] Exception thrown while executing UI block: 'parentNode' is a required parameter - Df (Foundation) *** Assertion failure in - connectAnimatedNodes:childTag - E [com.facebook.react.log:native] Exception thrown while executing UI block: 'childNode' is a required parameter Exclude iOS native animation (non-nil/non-zero) assertion macros - for now, when nodes (pointers to tags) attach/detach (to old/new parents and new views) QA: no empty animation frames observed ✅ Low probability possible risks introduced - incomplete node invalidation (outdated nodes) - race condition: prop updated before UIManager created view (outdated props) QA: no outdated animation frames observed ✅ iOS native animation assertion refs - Summary: facebook/react-native@c858420 - PR: facebook/react-native#10663 - Examples: facebook/react-native#9120 - nb: mimics ReactAndroid (i.e. NativeAnimatedNodesManager.java) nb: metro-react-native-babel-preset (0.72.3) - @babel/plugin-transform-regenerator has been removed since initial investigation - @babel/plugin-transform-runtime (removed) - 4 fewer SES warnings - intrinsics: Object.setPrototypeOf.default, Object.setPrototypeOf.__esModule, Reflect.construct.default, Reflect.construct.__esModule - @babel/plugin-transform-runtime > regenerator: false - immediate error thrown (recurring) Todo: Fix WebView page load (likely caused by current excluded RN Promise polyfillGlobal), thus fixing these assertion failures on nav, then revert this patch - Problem: Including (default) RN Promise polyfillGlobal causing app to boot empty root view Todo: Root cause of above 'regenerator: false' causing nil/zero parent/child nodes immediately to reoccur
1 parent d2d2bf4 commit e52f13a

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

patches/react-native+0.66.5.patch

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,32 @@ index f83fea9..be3ac2f 100644
1818
- polyfillGlobal('Promise', () => require('../Promise'));
1919
+ // polyfillGlobal('Promise', () => require('../Promise'));
2020
}
21+
diff --git a/node_modules/react-native/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.m b/node_modules/react-native/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.m
22+
index e7fb791..3334048 100644
23+
--- a/node_modules/react-native/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.m
24+
+++ b/node_modules/react-native/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.m
25+
@@ -121,8 +121,8 @@ - (void)connectAnimatedNodes:(nonnull NSNumber *)parentTag
26+
RCTAnimatedNode *parentNode = _animationNodes[parentTag];
27+
RCTAnimatedNode *childNode = _animationNodes[childTag];
28+
29+
- RCTAssertParam(parentNode);
30+
- RCTAssertParam(childNode);
31+
+ // RCTAssertParam(parentNode);
32+
+ // RCTAssertParam(childNode);
33+
34+
[parentNode addChild:childNode];
35+
[childNode setNeedsUpdate];
36+
@@ -137,8 +137,8 @@ - (void)disconnectAnimatedNodes:(nonnull NSNumber *)parentTag
37+
RCTAnimatedNode *parentNode = _animationNodes[parentTag];
38+
RCTAnimatedNode *childNode = _animationNodes[childTag];
39+
40+
- RCTAssertParam(parentNode);
41+
- RCTAssertParam(childNode);
42+
+ // RCTAssertParam(parentNode);
43+
+ // RCTAssertParam(childNode);
44+
45+
[parentNode removeChild:childNode];
46+
[childNode setNeedsUpdate];
2147
diff --git a/node_modules/react-native/ReactAndroid/build.gradle b/node_modules/react-native/ReactAndroid/build.gradle
2248
index edadad2..2cadd4f 100644
2349
--- a/node_modules/react-native/ReactAndroid/build.gradle

0 commit comments

Comments
 (0)