-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
currentColor not using correct color sometimes #2566
Comments
Hey! 👋 The issue doesn't seem to contain a minimal reproduction. Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem? |
Hey! 👋 It looks like you've omitted a few important sections from the issue template. Please complete Snack or a link to a repository section. |
Not sure if this is the same issue, but we've also recently noticed that navigating around (particularly when doing a |
As clarification: we are also occasionally seeing the issue mentioned by OP where SVGs revert back to some default color that isn't the one specified in the component tree. It also happens pretty randomly. We strongly suspect that this and the aforementioned |
Yes, we are using |
Hey, I've never come across that bug before, so please provide a minimal reproduction (can't be random), otherwise I won't be able to debug it |
Will try to create a reproduction of it next week! |
Just got a crash in
There's hundred of lines of the |
@jakex7 we just experienced the exact same crash and also noticed the issue with incorrect colors, but only on iOS (Android works fine), [email protected] with new architecture enabled. No clear repro, it seems to be frequent though |
@jakex7 I've tried to create a minimal reproduction, but I can't get it to crash or show the wrong colors. There seems to be something though, since more people are reporting similar issues, but I'm sorry that I can't provide a clear case where it fails. |
Ohh awesome, we've patched it in and initial results look very promising! We have a case where a logo consistently lost its color (couldn't repro it though 😅) and this now seems to work. We'll continue testing it during the day to see if we get weird colors or crashes. Will report back later today! |
We haven't seen any crashes or color issues since we added the patch earlier today. I believe this was the fix 🎉 Thank you so much @jakex7! |
My team is also experiencing this issue (no crash though, just After seeing #2570 I tried applying a similar fix for This might not be the actual fix but I hope this helps in finding the actual cause 🙏 |
# Summary This is a blind fix for issue #2566 that resets the caller on `prepareForRecycle`. While it should help address the overflow happening in some cases, I cannot guarantee that it will fully resolve the issue due to the lack of a reproducible scenario. ## Compatibility | OS | Implemented | | ------- | :---------: | | iOS | ✅ | | MacOS | ✅ |
@jakex7 do we have expected release date for this one? |
We are experiencing the same thing in our app. Only happens when using navigation.reset. First reset, a lot of svg's changes color and some disappears, and after second reset the app crashes completely :-) *** After implementing the provided patch, we don't get the svg bugs and app crash as well! So great job! |
I can also confirm that the patch works! Thanks @jakex7! |
I'm planning to release a new version early next week. Thanks everyone for testing it! |
# Summary This is another fix for issue #2566 that also resets the color on prepareForRecycle (in the same manner of this fix #2570). I also don't have a sandboxed reproduce, but was able to verify the fix on my company's code which I unfortunately can't share. ## Compatibility OS | Implemented -- | -- iOS | ✅ MacOS | ✅ Co-authored-by: Jakub Grzywacz <[email protected]>
Hi @jakex7 Thank you for your work. |
Description
We have SVG icons that use
currentColor
for strokes and fills. These are styled using NativeWind which sets the color on the SVG.In the screenshots below, both SVGs display that the
color
property is defined asrgba(171, 171, 171, 1)
in light mode andrgba(94, 94, 94, 1)
in dark mode. But, the left icon is clearly using some other color. They should both look like the right icon.Reloading the app solves the problem temporarily.
We don't remember that this was happening before we upgraded to the New Architecture, so there might be something related with that?
Steps to reproduce
Unfortunately, we don't have a clear reproduction.
react-native-svg-transformer
to convert imported SVGscolor
property of imported SVGsSnack or a link to a repository
SVG version
15.10.0
React Native version
0.76.3
Platforms
iOS
JavaScript runtime
Hermes
Workflow
React Native
Architecture
Fabric (New Architecture)
Build type
Debug app & dev bundle
Device
iOS simulator
Device model
No response
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: