-
Notifications
You must be signed in to change notification settings - Fork 407
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
React Native 0.57 crash on Android when data changes for XAxis or YAxis #237
Comments
@JesperLekland & @krzysztof-miemiec - hello there. thanks for reporting this |
@krzysztof-miemiec @JesperLekland I am not sure if this is a confirmation of this issue or not, but I am seeing this only on iOS (so far simulated iPhone X). Did you do anything other than wrap the children components in
On initial render, an areachart with x/y axis is fine, but when I try to change what data is displayed (rerender), I get a Note that I have also tried Android seems fine as far as I can tell with the latest More details here: software-mansion/react-native-svg#848 (comment) My AreaChart looks nearly identical to the one posted in that thread. It is a slightly modified version of the areachart example with a gradient and both x and y axis. I also use clipPaths to remove pieces of the chart near the ends. I have made one customization to the x-axis to allow the SVGText child to take TSPan children, but I don't think this is relevant, since I have tested both the default x-axis and my modified version and both produce this crash. Let me know if there is anything I can do to further debug this issue. |
I only changed things that are in the Pull Request. Have you tried full rebuild (remove node_modules, clean react cache etc.) after changing
So we're couple versions behind. Also, we only experienced issues on Android devices. |
@krzysztof-miemiec I believe I have tried multiple full rebuilds (delete node_modules, clear npm cache, delete build directories/gradlew clean) with each version, but I am not certain I've been clearing the react cache correctly. My understanding is that all I should need to do is run https://gist.github.com/jarretmoses/c2e4786fd342b3444f3bc6beff32098d We are only experiencing issues on iOS devices, so maybe our issues are entirely unrelated. I've been having an issue with |
I guess that something has been changed even more since RN0.57.0 & RNSVG7.0.3 then. 😕 |
I've published a fix in v9.2.4 of react-native-svg, and opened an issue in react-native for the bug as well facebook/react-native#23350 |
What is the problem?
After the updating
react-native
to 0.57.0 andreact-native-svg
to 7 I experienced crashes on Android that prevent me from using the app.When does it happen?
The app crashes when I change the data for chart (the data changes in XAxis or YAxis to be specific).
What platform?
React Native version: 0.57.0+
Code to reproduce
I'll send a PR in a minut, this issue is just to track the bug. The details what happens and why it happens can be found in software-mansion/react-native-svg#789.
Solution
Wrap contents of Axis with
<G></G>
The text was updated successfully, but these errors were encountered: