Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork149
Fix fontWeight again#806
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Freddy03h commentedMar 7, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@cknitt which version of Number values are accepted since I didn't experience any crash on Android or iOS. |
cknitt commentedMar 7, 2024
That's weird as I had the crash on Android with 0.73.5. |
Freddy03h commentedMar 7, 2024
I'm still on 0.71.14 so maybe there is a regression on this in |
Freddy03h commentedMar 7, 2024
I tested it on a 0.73.4 project and it work well on Android, without crashing. |
cknitt commentedJul 1, 2024
Sorry, patched this in the project I was working on at the time and then lost track of it. Now a colleague has encountered the same problem in another project with RN 0.74.2. So this is definitely still an issue. Will merge now. |
Freddy03h commentedJul 1, 2024
I still not experienced the issue since 0.71 Are you using a custom font? Are you using the new architecture? |
Freddy03h commentedJul 3, 2024
@cknitt Hi!
It's seems to be definitively an issue… but only on your project? Can you repro the issue outside? This type was change 1 year ago, no one else seems to experienced the issue since, and I'm worried the revert to the old type will annoy people… |
cknitt commentedJul 3, 2024
This is not specific to a particular project of ours. My colleague encountered the issue in a new project, not in the one where I originally experienced it. I will try to create a repo with a simple reproduction. |
cknitt commentedJul 3, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@Freddy03h Ok, here is a simple repro:
The problem does not occur for the other styles in that file. |
Freddy03h commentedJul 5, 2024
@cknitt Hi! Thank you for all the informations! I opened an issue an the I never experienced the issue on my project because now with dynamic style (dark/light mode) there's always a variable color to dynamically pass to the style prop in an array. And because the error is not effective on Release mode, I never saw it on crashlytics (even with 2 text in my entire app where the issue should happen). It's possible to create a patch-package with this tiny fix that will be fixed soon I hope :https://github.com/facebook/react-native/pull/45299/files So, what's your opinion about reverting the type to the polymorphic variant? I think it would be nice not to have to rewrite the type for everyone for an issue that happen only in Dev mode in the old architecture. Thank you. |
cknitt commentedJul 6, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Hi@Freddy03h! Thank you very much for opening the issue on the React Native repo to get to the bottom of this.
I can confirm that this fixes the issue. This solution is fine with me, I'll make a PR to revert the type to the polymorphic variant. |

Fixes#775 again by reverting the
fontWeighttype definition to its pre-#793 state.Unfortunately this is a breaking change yet again. But better than crashes on Android...