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

Toast and ActionSheet both cause crashes on call #1895

Closed
AleskiWeb opened this issue May 14, 2018 · 9 comments
Closed

Toast and ActionSheet both cause crashes on call #1895

AleskiWeb opened this issue May 14, 2018 · 9 comments

Comments

@AleskiWeb
Copy link

AleskiWeb commented May 14, 2018

Hey there,

First of all, great project here. Makes prototyping very quick and basically has almost everything you need for your production application.

However there is two components that are causing me issues (and I see them logged in Firebase Crashlytics a lot) and that is the Toast and ActionSheet.

image

Looking through the issues on this repo, every time it is brought up, it is said that you just have to add <Root> as your top-most component to your application.

Whilst this does work a lot of the time, almost all of the time, there is a specific set of instructions, in a specific order that causes a cannot call show on undefined. This happens to both the Toast and ActionSheet

There have been work arounds suggested, and multiple issues opened and subsequently closed on this particular issue but I am not convinced any of the suggested workarounds have actually worked for very long.

react-native 0.52.0
react 16.3.2
native-base 2.4.3

Is the bug present in both ios and android or in any one of them? Both

I am following the documentation directly, my topmost component's first child is <Root> and the rest of my application is inside of that, including navigation, redux providers, etc.

@akhil-ga
Copy link
Contributor

@AleskiWeb can you try adding this to your code #1121 (comment)

@akhil-ga
Copy link
Contributor

@AleskiWeb this issue will be fixed once this PR is merged. See PR #1700

@AleskiWeb
Copy link
Author

@akhil-geekyants - In his workaround, he says "main component" is where he added that. Is that the top-most level component or does he mean in the component where the Toast/ActionSheet is instantiated?

Also, thanks for the PR. Means I don't have to find/make an alternative one 👌

@akhil-ga
Copy link
Contributor

@AleskiWeb it is safer to use it in all components where Toast/ActionSheet is used.

@AleskiWeb
Copy link
Author

@akhil-geekyants Still getting an issue when adding that unmount workaround. When will the PR likely be merged?

@kstolte
Copy link

kstolte commented May 18, 2018

@akhil-geekyants I am also still getting the issue after adding the unmount workaround. I have manually altered my node_module to match the changes to the pull request and it has resolved my issue entirely. Do we have an ETA on #1700 being merged? I see it has been open since mid-March.

@AleskiWeb
Copy link
Author

@kstolte I did the same 😂 - just awaiting release

@SupriyaKalghatgi
Copy link
Contributor

Will be merged this week, with some new components

@SupriyaKalghatgi
Copy link
Contributor

Fixed with 2.5.0

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

No branches or pull requests

4 participants