Closed vyasishanatc194 closed 5 years ago
I'm having this exact same issue. For some reason, it only fails on an iPad, not on an iPhone.
same issue here. (works on Android, but not work on IOS)
I'm working on a patch for this issue: https://github.com/facebook/react-native/pull/22666, you are welcome to try it out
Hello! Same issue here, even without using an Alert
though.
I've made sure to include the Spinner
only in my top-level screen, but I still occasionally get a sticky spinner.
Something interesting to note is that it doesn't happen in Debug
and Release
builds that I build on my device, but it seems to only affect Fabric Crashlytics ad-hoc builds we deploy remotely.
This is super weird. Keeping an eye out for a fix.
Is there any workaround? Currently this issue will make the app frozen, users can only exit the app then open it again.
@just4fun you could add a delay to alert as workaround.
global.alert = (message, title) => {
setTimeout(() => Alert.alert(title || "Oops!", message), 500);
};
@zhuang17 - Thanks, it seems like Alert and Modal are running in same event loop then cause the issue? I remembered Modal will not be supported soon in React Native, so for long term, I think the best solution is to replace Modal with something like the modal in react navigation.
do we have any fix for this right now
What if I'm not using an Alert, and only have a spinner in the topmost component? Any idea why I get that sticky spinner sometimes?
On 12 Jan 2019, at 15:10, Tailor at Hand notifications@github.com wrote:
do we have any fix for this right now
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
My solution for this issue is to replace Alert(IOS)
with another message library like react-native-message-bar
, instead of using wired workaround setTimeout
which may has timing issue.
Make spinner hidden after pressing Alert
buttons. I think it is the safe and easy way on now.
Alert.alert("!!!", "Error", [
{ text: "OK", onPress: () => this.setState({ spinner: false }) }
]);
PR accepted. Please provide a reproducible test case.
When alert and spinner overlay working together,
alter will dismiss but spinner overlay stuck and nothing happened.