react-native-heap
react-native-heap copied to clipboard
App Freeze on iOS
Prerequisites: react-native 0.62.2 React Navigation 5
We created a loading screen before entering into the app.
Taping on an 'empty' screen inside the stack navigator is triggering recursive infinite loop on RCTRecursiveAccesibilityLabel. The only way to fix it is by setting accessibilityLabel on View.
For example:
const EmptyScreen = props => {
return (
<View style={{ flex: 1, width: '100%' }}/>
)
}
Fix
const EmptyScreen = props => {
return (
<View style={{ flex: 1, width: '100%' }} accessibilityLabel='test'/>
)
}
Hi @plotic! Could you please provide us with the following information:
- Which version of
react-native-heap
are you using? - Does the issue persist when you:
- Disable Heap initialization (e.g. setting
heapAutoInit
to false and/or removing anyHeap.init()
calls) - Disable the instrumentor plugin in your
babel.config.js
- Install Heap from the
develop
branch of this repo - Remove the Heap library from your project entirely (i.e.
npm uninstall @heap/react-native-heap
- Disable Heap initialization (e.g. setting
- Does this only happen on iOS, or does a similar issue manifest on Android builds?
- Does this happen on only certain versions of iOS (e.g. only iOS 13), or does it occur on multiple iOS versions?
- Are you using React Navigation Heap autocapture via the HOC?
- Is
heapIgnore
set to true on the applicationrootView
, as described in https://developers.heap.io/docs/react-native#ios-1?
hey @jmtaber129 thanks for the answer. We use Heap version 0.13.0, once the heap version is removed the issue disappears we observed this just on iOS - iOS 13 and iOS 14 We are not using React Navigation Heap autocapture via the HOC. Heap ignore is not set. We followed the steps from this github readme
We have this same issue, except in our case it is much harder to identify which Component is "missing" an accessibilityLabel.
Tested on 0.15.0 and the accessibilityLabel
issue still persists.
Unbelievable..... I just got bitten by this as well.
react-native: 0.67.5 react-navigation: 5
We had stack navigator containing screen which consisted of an animation wrapped in a view with an accessibilityRole
with no accessibilityLabel
and thought it was related to the animation.
The crash report produced when the app was killed lead us here:
{"imageOffset":9951054,"sourceLine":85,"sourceFile":"RCTView.m","symbol":"RCTRecursiveAccessibilityLabel","imageIndex":2,"symbolLocation":78},
{"imageOffset":9951386,"sourceLine":89,"sourceFile":"RCTView.m","symbol":"RCTRecursiveAccessibilityLabel","imageIndex":2,"symbolLocation":410},
{"imageOffset":9951386,"sourceLine":89,"sourceFile":"RCTView.m","symbol":"RCTRecursiveAccessibilityLabel","imageIndex":2,"symbolLocation":410},
{"imageOffset":9951386,"sourceLine":89,"sourceFile":"RCTView.m","symbol":"RCTRecursiveAccessibilityLabel","imageIndex":2,"symbolLocation":410},
{"imageOffset":9950925,"sourceLine":226,"sourceFile":"RCTView.m","symbol":"-[RCTView accessibilityLabel]","imageIndex":2,"symbolLocation":109},
{"imageOffset":9951345,"sourceLine":87,"sourceFile":"RCTView.m","symbol":"RCTRecursiveAccessibilityLabel","imageIndex":2,"symbolLocation":369},
{"imageOffset":9951386,"sourceLine":89,"sourceFile":"RCTView.m","symbol":"RCTRecursiveAccessibilityLabel","imageIndex":2,"symbolLocation":410},
{"imageOffset":9950925,"sourceLine":226,"sourceFile":"RCTView.m","symbol":"-[RCTView accessibilityLabel]","imageIndex":2,"symbolLocation":109},
{"imageOffset":9951345,"sourceLine":87,"sourceFile":"RCTView.m","symbol":"RCTRecursiveAccessibilityLabel","imageIndex":2,"symbolLocation":369},
{"imageOffset":9950925,"sourceLine":226,"sourceFile":"RCTView.m","symbol":"-[RCTView accessibilityLabel]","imageIndex":2,"symbolLocation":109},
... many many more....
As suggested, merely adding an accessibilityLabel
resolved the issue!