-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
[0.76] AccessibilityValue in View throws exception: "Exception in HostFunction: Loss of precision during arithmetic conversion: (long) " #47635
Comments
Tip Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - 0.76.2. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases. |
Tip Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - undefined. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases. |
I have the same issue on iOS too. |
I also have this issue on iOS. |
I am using the |
updated to 0.76.2, issue remains |
@DominicWrege @okanisildar |
I have the same error after update to SDK 52. I use ProgressBar from react native paper and when I set its progress ratio to decimals, like 0.123, it throws error. But progress=1 works well. |
@vincicat you can check this expo snack. |
The floating-point item font size causes the crash in my case. |
Thank you. |
Thank you so much. Can confirm that issue occurs on iOS too. |
@react-native-bot can you add the label "Platform:iOS" into that issue? |
I'm getting the same issue via implementation of a ProgressBar from 'react-native-paper'. Older versions like 4.12.6 and newer versions like 5.12.5 both have the same problem. |
That is an approach 👍. |
hi @vincicat , does this issue happen in other versions as well?? |
For this issue, the So you may want to use other library. Here is the link: |
thanks @dnhan1707 |
Warning: Error: Exception in HostFunction: Loss of precision during arithmetic conversion: (long long) 52.493322164093 This error is located at: in RCTView (created by View) in View (created by ProgressBar) in ProgressBar (created by Importer) in RCTView (created by View) in View (created by Styled(View)) in Styled(View) (created by Importer) in Importer (created by SceneView) in StaticContainer callstack/react-native-paper#4544 facebook/react-native#47635
Workaround for users of ProgressBar from 'react-native-paper': - <ProgressBar progress={skinnyHtmlDownloadPercentage} color={MD3Colors.neutral30} />
+ <ProgressBar animatedValue={skinnyHtmlDownloadPercentage} color={MD3Colors.neutral30} /> |
This works, thank you! |
Description
Similar to react-native-elements/react-native-elements#3955 Sharcoux/slider#102 callstack/react-native-paper#4544, when any non-zero value is given to
AccessibilityValue.now
on Android & iOS, conversion occurs and an exception will be thrown.(remark: Using
Math.round()
to avoid any (long) value will fix the issue temporarily.)Both Expo (0.52) and bare React Native App (0.76.1 + SDK 34, 0.76.2 + SDK 35) can reproduce the bug. Expo 0.51 will not, so it is very likely related to New Architecture.
Same issue found in iOS 18 in some cases, but expo demo can show that
Steps to reproduce
React Native Version
0.76.2
Affected Platforms
Runtime - Android
Runtime - iOS
Areas
Fabric - The New Renderer
Output of
npx react-native info
Stacktrace or Logs
Android:
iOS:
Reproducer
https://snack.expo.dev/OEofab5meHPozAXyOQg6_
Screenshots and Videos
No response
The text was updated successfully, but these errors were encountered: