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

Stuck in IOS #72

Closed
vyasishanatc194 opened this issue Dec 4, 2018 · 12 comments
Closed

Stuck in IOS #72

vyasishanatc194 opened this issue Dec 4, 2018 · 12 comments

Comments

@vyasishanatc194
Copy link

When alert and spinner overlay working together,

alter will dismiss but spinner overlay stuck and nothing happened.

@cedoucette
Copy link

cedoucette commented Dec 11, 2018

I'm having this exact same issue. For some reason, it only fails on an iPad, not on an iPhone.

@hanyuei
Copy link

hanyuei commented Dec 13, 2018

same issue here. (works on Android, but not work on IOS)

@sryze
Copy link

sryze commented Dec 19, 2018

I'm working on a patch for this issue: facebook/react-native#22666, you are welcome to try it out

@hery
Copy link

hery commented Jan 3, 2019

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.

@just4fun
Copy link

Is there any workaround? Currently this issue will make the app frozen, users can only exit the app then open it again.

@hanyuei
Copy link

hanyuei commented Jan 12, 2019

@just4fun you could add a delay to alert as workaround.

global.alert = (message, title) => {
  setTimeout(() => Alert.alert(title || "Oops!", message), 500);
};

@just4fun
Copy link

@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.

@amireds
Copy link

amireds commented Jan 12, 2019

do we have any fix for this right now

@hery
Copy link

hery commented Jan 12, 2019 via email

@just4fun
Copy link

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.

@JeffGuKang
Copy link

JeffGuKang commented Jan 31, 2019

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 }) }
]);

@niftylettuce
Copy link
Collaborator

PR accepted. Please provide a reproducible test case.

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

No branches or pull requests

9 participants