Skip to content
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

Warning: Error: Exception in HostFunction: Loss of precision during arithmetic conversion: (long) 0.01 #2600

Open
neeteshraj opened this issue Jan 4, 2025 · 3 comments
Assignees
Labels
Platform: Android This issue is specific to Android Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snack or repo is provided

Comments

@neeteshraj
Copy link

Description

(NOBRIDGE) ERROR Warning: Error: Exception in HostFunction: Loss of precision during arithmetic conversion: (long) 0.01

This error is located at:
in RNSScreen (created by Animated(Anonymous))
in Animated(Anonymous)
in Suspender (created by Freeze)
in Suspense (created by Freeze)
in Freeze (created by DelayedFreeze)
in DelayedFreeze
in InnerScreen (created by Screen)
in Screen (created by SceneView)
in SceneView (created by NativeStackViewInner)
in RNSScreenStack (created by ScreenStack)
in Unknown (created by ScreenStack)
in ScreenStack (created by NativeStackViewInner)
in NativeStackViewInner (created by NativeStackView)
in RCTView (created by View)
in View (created by SafeAreaProviderCompat)
in SafeAreaProviderCompat (created by NativeStackView)
in NativeStackView (created by NativeStackNavigator)
in PreventRemoveProvider (created by NavigationContent)
in NavigationContent
in Unknown (created by NativeStackNavigator)
in NativeStackNavigator (created by ApplicationNavigator)
in EnsureSingleNavigator
in BaseNavigationContainer
in ThemeProvider
in NavigationContainerInner (created by ApplicationNavigator)
in RNCSafeAreaProvider (created by SafeAreaProvider)
in SafeAreaProvider (created by ApplicationNavigator)
in ApplicationNavigator (created by Root)
in ThemeProvider (created by Root)
in ThemeProvider (created by PaperProvider)
in RCTView (created by View)
in View (created by Portal.Host)
in Portal.Host (created by PaperProvider)
in RNCSafeAreaProvider (created by SafeAreaProvider)
in SafeAreaProvider (created by SafeAreaInsetsContext)
in SafeAreaProviderCompat (created by PaperProvider)
in PaperProvider (created by Root)
in RNGestureHandlerRootView (created by GestureHandlerRootView)
in GestureHandlerRootView (created by Root)
in Root
in RCTView (created by View)
in View (created by AppContainer)
in RCTView (created by View)
in View (created by AppContainer)
in AppContainer
in nkcc_mobile_app(RootComponent)

Steps to reproduce
Install react native 0.76.5
install these dependencies
"@react-native-masked-view/masked-view": "^0.3.2",
"@react-navigation/bottom-tabs": "^6.6.1",
"@react-navigation/native": "^6.1.18",
"@react-navigation/native-stack": "^6.11.0",
"@react-navigation/stack": "^6.4.1",
"i18next": "^24.2.0",
"intl-pluralrules": "^2.0.1",
"ky": "^1.7.4",
"lottie-react-native": "^7.1.0",
"react": "18.3.1",
"react-error-boundary": "^5.0.0",
"react-i18next": "^15.4.0",
"react-native": "0.76.5",
"react-native-bootsplash": "^6.3.2",
"react-native-gesture-handler": "^2.21.2",
"react-native-linear-gradient": "^2.8.3",
"react-native-mmkv": "^3.2.0",
"react-native-paper": "^5.12.5",
"react-native-reanimated": "^3.16.6",
"react-native-safe-area-context": "^5.0.0",
"react-native-screens": "4.4.0",
"react-native-svg": "^15.10.1",
"react-native-video": "^6.8.2",
"react-native-vision-camera": "^4.6.3",
"zod": "^3.24.1"

Steps to reproduce

  1. Create a new react native project.
  2. Install react navigation and native stack along with other required dependenices.
  3. Run the app on android.

Snack or a link to a repository

https://github.com/neeteshraj/nkcc/tree/feat/home-screen

Screens version

4.0.0

React Native version

0.76.5

Platforms

Android, iOS

JavaScript runtime

Hermes

Workflow

None

Architecture

Fabric (New Architecture)

Build type

Debug mode

Device

Android emulator

Device model

Galaxy S10

Acknowledgements

Yes

@github-actions github-actions bot added Repro provided A reproduction with a snack or repo is provided Platform: Android This issue is specific to Android Platform: iOS This issue is specific to iOS labels Jan 4, 2025
@kkafar
Copy link
Member

kkafar commented Jan 7, 2025

@neeteshraj Thanks for reporting, however the reproduction you posted is not accessible (most likely private repo, or the repo does not exist). I've also never seen the issue when running an app, therefore the reproduction steps are not valid. Please provide us with some more information, so that we can actually locate the issue / reproduce it.

If you're familiar with Android Studio you can try running the app through it & inspecting the stack trace printed at the moment of crash, most likely there will be much more of useful information there (including the line at which the error had been thrown).

@kkafar kkafar added the Close when stale This issue is going to be closed when there is no activity for a while label Jan 7, 2025
@kkafar kkafar self-assigned this Jan 7, 2025
@renopp
Copy link

renopp commented Jan 9, 2025

the error looks similar to my case after upgrade "react-native-screens": "4.4.0", but after going back to "react-native-screens": "3.35.0" seems like normal

I still figuring out how to replicate it in a clean project repo

  • "react-native": "0.76.5",
  • "react-native-screens": "4.4.0"
  • "@react-navigation/bottom-tabs": "7.2.0"
  • "@react-navigation/elements": "2.2.5"
  • "@react-navigation/native": "7.0.14"
  • "@react-navigation/stack": "7.1.1"

Screenshot_2025-01-09-15-49-31-136_com kumparan

@github-actions github-actions bot removed the Close when stale This issue is going to be closed when there is no activity for a while label Jan 9, 2025
@kkafar
Copy link
Member

kkafar commented Jan 9, 2025

@renopp do you happen to have access to native stacktrace?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: Android This issue is specific to Android Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snack or repo is provided
Projects
None yet
Development

No branches or pull requests

3 participants