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

Invariant Violation When Using 'dashedBackground' Prop

Open erolg opened this issue 5 years ago • 0 comments

I got error when I try to use dashedBackground prop with the example app

My expo version is 3.0.9 and I am using 1.3.4 version of the package

Component Usage:

        <AnimatedCircularProgress
          size={200}
          width={3}
          backgroundWidth={30}
          fill={fill}
          tintColor="#00e0ff"
          backgroundColor="#3d5875"
          dashedBackground={{ width: 1, gap: 1 }}
        >
          {fill => <Text style={styles.points}>{Math.round((MAX_POINTS * fill) / 100)}</Text>}
        </AnimatedCircularProgress>

Error:

Invariant Violation: [3,"RNSVGPath",11,{"matrix":[1,0,0,1,0,0],"propList":["fill","stroke","strokeWidth","strokeDasharray","strokeLinecap"],"opacity":1,"fill":[0,0],"fillRule":1,"fillOpacity":1,"stroke":[0,4282210421],"strokeOpacity":1,"strokeLinecap":0,"strokeLinejoin":0,"strokeDasharray":[1,"<<NaN>>","<<NaN>>",1],
"strokeWidth":30,"strokeDashoffset":0,"strokeMiterlimit":4,"vectorEffect":0,"d":"M 99.94659292840299 15.000016778326938 A 85 85 0 1 0 100 15"}] is not usable as a native method argument

This error is located at:
    in RNSVGPath (at Path.js:12)
    in Path (at CircularProgress.js:100)
    in RNSVGGroup (at G.js:23)
    in G (at CircularProgress.js:98)
    in RNSVGGroup (at G.js:23)
    in G (at Svg.js:127)
    in RNSVGSvgView (at Svg.js:116)
    in Svg (at CircularProgress.js:97)
    in RCTView (at View.js:45)
    in View (at CircularProgress.js:96)
    in CircularProgress (at createAnimatedComponent.js:151)
    in AnimatedComponent (at AnimatedCircularProgress.js:65)
    in AnimatedCircularProgress (at App.tsx:56)
    in RCTView (at View.js:45)
    in View (at App.tsx:55)
    in App (at withExpoRoot.js:20)
    in RootErrorBoundary (at withExpoRoot.js:19)
    in ExpoRootComponent (at renderApplication.js:35)
    in RCTView (at View.js:45)
    in View (at AppContainer.js:98)
    in RCTView (at View.js:45)
    in View (at AppContainer.js:115)
    in AppContainer (at renderApplication.js:34)
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:253:8 in enqueueNativeCall
- node_modules/react-native/Libraries/BatchedBridge/NativeModules.js:137:8 in fn
- ... 21 more stack frames from framework internals

Warning: %s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI., RootErrorBoundary
- node_modules/expo/build/environment/muteWarnings.fx.js:27:24 in error
- ... 28 more stack frames from framework internals

Error: Exception in HostFunction: Malformed calls from JS: field sizes are different.

[[152,152],[5,5],[[5,"RCTRawText",11,{"text":"0"}]],9]

This error is located at:
    in RCTText (at Text.js:154)
    in TouchableText (at Text.js:278)
    in Text (at App.tsx:65)
    in RCTView (at View.js:45)
    in View (at CircularProgress.js:121)
    in RCTView (at View.js:45)
    in View (at CircularProgress.js:96)
    in CircularProgress (at createAnimatedComponent.js:151)
    in AnimatedComponent (at AnimatedCircularProgress.js:65)
    in AnimatedCircularProgress (at App.tsx:56)
    in RCTView (at View.js:45)
    in View (at App.tsx:55)
    in App (at withExpoRoot.js:20)
    in RootErrorBoundary (at withExpoRoot.js:19)
    in ExpoRootComponent (at renderApplication.js:35)
    in RCTView (at View.js:45)
    in View (at AppContainer.js:98)
    in RCTView (at View.js:45)
    in View (at AppContainer.js:115)
    in AppContainer (at renderApplication.js:34)
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:271:39 in enqueueNativeCall
- node_modules/react-native/Libraries/BatchedBridge/NativeModules.js:137:8 in fn
- ... 21 more stack frames from framework internals

Warning: %s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI., RootErrorBoundary
- node_modules/expo/build/environment/muteWarnings.fx.js:27:24 in error
- ... 28 more stack frames from framework internals

erolg avatar Dec 05 '19 22:12 erolg