Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App Freeze on iOS #223

Open
plotic opened this issue Sep 22, 2020 · 5 comments
Open

App Freeze on iOS #223

plotic opened this issue Sep 22, 2020 · 5 comments

Comments

@plotic
Copy link

plotic commented Sep 22, 2020

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


@jmtaber129
Copy link
Contributor

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?

@plotic
Copy link
Author

plotic commented Sep 24, 2020

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

@benmagos
Copy link

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

@benmagos
Copy link

Tested on 0.15.0 and the accessibilityLabel issue still persists.

@NoAndThen
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants