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 #48421

Open
neeteshraj opened this issue Jan 1, 2025 · 7 comments
Labels
Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project.

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

  1. 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"

Try running on android.

React Native Version

0.76.5

Affected Platforms

Runtime - Android

Output of npx react-native info

npx react-native info
(node:27112) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
info Fetching system and libraries information...
System:
  OS: macOS 15.0
  CPU: (10) arm64 Apple M4
  Memory: 101.94 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 22.12.0
    path: ~/.nvm/versions/node/v22.12.0/bin/node
  Yarn:
    version: 4.6.0
    path: ~/.nvm/versions/node/v22.12.0/bin/yarn
  npm:
    version: 10.9.2
    path: ~/.nvm/versions/node/v22.12.0/bin/npm
  Watchman:
    version: 2024.12.02.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.14.3
    path: /Users/nitesh/.rvm/rubies/ruby-2.7.4/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.2
      - iOS 18.2
      - macOS 15.2
      - tvOS 18.2
      - visionOS 2.2
      - watchOS 11.2
  Android SDK:
    API Levels:
      - "31"
      - "33"
      - "34"
      - "35"
    Build Tools:
      - 33.0.1
      - 34.0.0
      - 35.0.0
      - 36.0.0
    System Images:
      - android-35 | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2024.2 AI-242.23339.11.2421.12700392
  Xcode:
    version: 16.2/16C5032a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.13
    path: /opt/homebrew/opt/openjdk@17/bin/javac
  Ruby:
    version: 2.7.4
    path: /Users/nitesh/.rvm/rubies/ruby-2.7.4/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.1.3
    wanted: 15.1.3
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.5
    wanted: 0.76.5
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Stacktrace or Logs

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)

Reproducer

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

Screenshots and Videos

Screenshot 2025-01-01 at 21 01 31
@shubhamguptadream11
Copy link
Collaborator

@neeteshraj
The reproducer you provided is currently not accessible. Could you please double-check it?
Additionally, is this crash occurring in a bare React Native project? If not, I recommend narrowing down the issue to a specific package and raising it in the respective repository.

If you still believe this is related to React Native core, please provide a valid reproducer. You can use the following repro template.

Thank you!

@shubhamguptadream11 shubhamguptadream11 added Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. and removed Needs: Triage 🔍 labels Jan 2, 2025
@react-native-bot
Copy link
Collaborator

Warning

Missing reproducer: We could not detect a reproducible example in your issue report. Please provide either:

@neeteshraj
Copy link
Author

The repo was private. I updated it to public.

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Jan 2, 2025
@cortinico cortinico added Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. and removed Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Needs: Attention Issues where the author has responded to feedback. labels Jan 2, 2025
@cortinico
Copy link
Contributor

Have you tried to open the issue also against react-native-screens @neeteshraj ?

@neeteshraj
Copy link
Author

No. Is it related to react-native-screens?

@cortinico
Copy link
Contributor

No. Is it related to react-native-screens?

By looking at the stacktrace I would say so:

This error is located at:
in RNSScreen (created by Animated(Anonymous))

RNSScreen is provided by react-native-screens

@neeteshraj
Copy link
Author

No. Is it related to react-native-screens?

By looking at the stacktrace I would say so:

This error is located at:
in RNSScreen (created by Animated(Anonymous))

RNSScreen is provided by react-native-screens

But same version of react-native-screens is working fine with react-native 0.75.4. I am currently using react-native-screens 4.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project.
Projects
None yet
Development

No branches or pull requests

4 participants