Open jgillick opened 7 months ago
FYI, this PR seems to be a duplicate of https://github.com/akveo/react-native-ui-kitten/pull/1752 and https://github.com/akveo/react-native-ui-kitten/pull/1790, but resolves it differently.
Feel free to close this if you prefer the other solutions.
Please read and mark the following check list before creating a pull request:
[x] I read and followed the CONTRIBUTING.md guide.
Short description of what this resolves:
Calling
UIManager.measureInWindow
can throw an exception and crash the app if the UIManager isn't defined yet (seenullthrows
in the react native code). I have not been able to reproduce this directly, but have been getting a handful of app crash reports per day that point to this (see stack trace below).My proposed solution is to catch the exception and then try again after a short delay. The delay is to prevent a possible infinite loop slowing down the app.
Stack trace