react-native-heap icon indicating copy to clipboard operation
react-native-heap copied to clipboard

App Freeze on iOS

Open plotic opened this issue 4 years ago • 5 comments

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%' }}/>
    )
}

image_2020_09_22T19_29_41_816Z

Fix

const EmptyScreen = props => {
    return (
        <View style={{ flex: 1, width: '100%' }} accessibilityLabel='test'/>
    )
}


plotic avatar Sep 22 '20 19:09 plotic

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 any Heap.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
  • 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 application rootView, as described in https://developers.heap.io/docs/react-native#ios-1?

jmtaber129 avatar Sep 23 '20 20:09 jmtaber129

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

plotic avatar Sep 24 '20 06:09 plotic

We have this same issue, except in our case it is much harder to identify which Component is "missing" an accessibilityLabel.

benmagos avatar Apr 30 '21 18:04 benmagos

Tested on 0.15.0 and the accessibilityLabel issue still persists.

benmagos avatar May 13 '21 18:05 benmagos

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!

NoAndThen avatar Aug 02 '23 04:08 NoAndThen