react-native-compressor icon indicating copy to clipboard operation
react-native-compressor copied to clipboard

Expo 52: Warning: Error: Exception in HostFunction: Loss of precision during arithmetic conversion: (long)

Open serolgames opened this issue 1 year ago • 3 comments

On expo 52 when I compress any image I get the error : "Warning: Error: Exception in HostFunction: Loss of precision during arithmetic conversion: (long)"

It happens on Android (I didn't test on IOS tho)

React Native Version

0.76.2

React Native Compressor Version

1.9.0

serolgames avatar Nov 22 '24 09:11 serolgames

I have the same error.

I don't even know where does it happen. But yes, it started to happen after I updated the app to v52.

image

In my case this error was caused by zIndex, I used react-native-ui-lib for View:

<View
        style={{
           position: "absolute",
           top: 0,
           left: 0,
           right: 0,
           bottom: 0,
          //zIndex: Math.round(Number.MAX_VALUE),
          pointerEvents: "none",
        }}
      >

It works if I change that to zIndex: Number.MAX_SAFE_INTEGER

PavelPolyakov avatar Nov 26 '24 15:11 PavelPolyakov

In my case it's occurring in iOS, Android working fine. And yeah removing zindex fixed issue.

muhammad-kumail avatar Nov 28 '24 09:11 muhammad-kumail

Hello, I don't understand, what does your <View> has anything to do with the method compress() ?

serolgames avatar Nov 28 '24 09:11 serolgames