-
Notifications
You must be signed in to change notification settings - Fork 504
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
Modal opens once #248
Comments
react native version:0.57.3 java.lang.ArrayIndexOutOfBoundsException: length=4; index=4 |
Im facing the exactly same issue, app crashes when i try to open the modal second time... |
iOS seems to be fine. Android breaks on second try. That's one of the most stupid workarounds I did, but I was able to resolve it by forcing a re-render
Works but makes it slower |
@gawrysiak , thanks for your workaround mahn... |
actually it’s fine this way, I’m using it in one app already after my customer reported the error. Just get rid of the ref and make it controlled with the visible state |
Same error here, this is too boring! Please help :( |
This is kind of hacky but at least it is working for now... Also i am not experiencing any lag etc... It is working well |
This problem is still happening on React-native v0.59.8, but the workaround proposed by @gawrysiak worked fine to me. |
Ok, I got stop by this error also and I figured out what was causing it. It looks like modalbox plugin conflicts with other plugins or functions that are using also native Android modals. For instance, in my project everything was working fine until I created a Drawer using React Navigation, which is using a native Modal. When disabling the Drawer, everything worked fine again. |
@gawrysiak That's good ,it's worked for me ,thank you |
This simple change fixed my issue: #291 |
This doesn't work in the latest RN |
This doesn't work for me. The modal does not open after wrapping inside KeyboardAvoidingView |
@desaiparv5 Do you have useRef() initialized and assigned to that modal?. Kindly share your code so I can assist. |
|
i still face this issue, and none of those solution above work for me. Anyone have other solution for this? |
hello everyone, i also got this crash, but i found a solution, @gawrysiak answer is correct, but its not working for me whatever i did, but i still force it to rerender, just disabling and enabling the component is enough example: |
Thank you guys @Solid-Metal @Michaelvons . I have applied the both and the trick worked. I think the problem is with @react-navigation/material-bottom-tabs because on other screens working perfect. |
I got my fixed without sacrificing the close transition. but it's at the library side hope it'll help |
The modal opens correctly the first time, but when I close and try to open it again, the app crashes.
Same issue when I try to open a different modal after successfully opening the first one
The text was updated successfully, but these errors were encountered: