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

CircleSnail - Invariant violation ARTShape is not usable as a native method argument

Open gpawlik opened this issue 5 years ago • 3 comments
trafficstars

After the upgrade from 4.1.0 to 4.1.2 the CircleSnail component crashes when useNativeDriver prop is specified.

Working:

          <Progress.CircleSnail
            style={styles.progress}
            color={['#F44336', '#2196F3', '#009688']}
          />

Crashing:

          <Progress.CircleSnail
            style={styles.progress}
            color={['#F44336', '#2196F3', '#009688']}
            useNativeDriver
          />

It has been reproduced in the Example project that is a part of this repository.

Invariant Violation: [47,"ARTShape",{"d":[0,20,4.5,2,"<<NaN>>","<<NaN>>"]}] is not usable as a native method argument

This error is located at:
    in ARTShape (at Shape.js:61)
    in Shape (at Arc.js:89)
    in Arc (at createAnimatedComponent.js:144)
    in AnimatedComponent (at createAnimatedComponent.js:194)
    in ForwardRef(AnimatedComponentWrapper) (at CircleSnail.js:167)
    in ARTSurfaceView (at Surface.js:37)
    in Surface (at CircleSnail.js:166)
    in RCTView (at createAnimatedComponent.js:144)
    in AnimatedComponent (at createAnimatedComponent.js:194)
    in ForwardRef(AnimatedComponentWrapper) (at CircleSnail.js:148)
    in CircleSnail (at App.js:87)
    in RCTView (at App.js:85)
    in RCTView (at App.js:60)
    in Example (at renderApplication.js:45)
    in RCTView (at AppContainer.js:109)
    in RCTView (at AppContainer.js:135)
    in AppContainer (at renderApplication.js:39)

invariant
    browser.js:38:14
enqueueNativeCall
    MessageQueue.js:307:15
nonPromiseMethodWrapper
    NativeModules.js:139:8
commitUpdate
    ReactNativeRenderer-dev.js:4451:4
commitWork
    ReactNativeRenderer-dev.js:19088:22
commitMutationEffects
    ReactNativeRenderer-dev.js:21503:18
invokeGuardedCallbackImpl
    ReactNativeRenderer-dev.js:286:4
invokeGuardedCallback
    ReactNativeRenderer-dev.js:497:2
commitRootImpl
    ReactNativeRenderer-dev.js:21231:29
commitRootImpl
    [native code]:0
unstable_runWithPriority
    scheduler.development.js:818:23
commitRoot
    ReactNativeRenderer-dev.js:21109:17
finishSyncRender
    ReactNativeRenderer-dev.js:20514:12
performSyncWorkOnRoot
    ReactNativeRenderer-dev.js:20493:24
performSyncWorkOnRoot
    [native code]:0
runWithPriority$argument_1
    ReactNativeRenderer-dev.js:5703:31
unstable_runWithPriority
    scheduler.development.js:818:23
flushSyncCallbackQueueImpl
    ReactNativeRenderer-dev.js:5698:21
flushSyncCallbackQueue
    ReactNativeRenderer-dev.js:5686:28
scheduleUpdateOnFiber
    ReactNativeRenderer-dev.js:19845:30
updateContainer
    ReactNativeRenderer-dev.js:23608:14
ReactNativeRenderer.render
    ReactNativeRenderer-dev.js:24593:19
renderApplication
    renderApplication.js:54:4
runnables.appKey.run
    AppRegistry.js:117:25
runApplication
    AppRegistry.js:202:4
__callFunction
    MessageQueue.js:425:19
__guard$argument_0
    MessageQueue.js:112:6
__guard
    MessageQueue.js:373:10
callFunctionReturnFlushedQueue
    MessageQueue.js:111:4
callFunctionReturnFlushedQueue
    [native code]:0

gpawlik avatar May 14 '20 17:05 gpawlik

Yes, same issue with RN 0.62. Just install @react-native-community/art and update pods

evolvan avatar Jun 05 '20 12:06 evolvan

I had this problem but what I was doing was setting the progress to NaN. Fixed that and the problem was gone

manishoo avatar Sep 18 '20 14:09 manishoo

I have the same problem, even though @react-native-community/art is already installed. I'm using indeterminate={true} but tried anyway to set the progress. It makes no difference, the error occurs nevertheless.

maevic avatar Dec 30 '20 20:12 maevic