Invariant Violation When Using 'dashedBackground' Prop

Aperta
#223 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript, react-native
Ambito
mobile

Direzione di ricerca

Riproduci l’app di esempio con Expo 3.0.9, la versione 1.3.4 del package e la prop dashedBackground mostrata. Parti da CircularProgress.js:100 e dall’errore RNSVGPath, quindi verifica che la prop non produca più valori NaN né il fallimento dell’invariante nativa.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
JavaScript
Stelle
2.2k
Fork
418
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di bartgryszko/react-native-circular-progress

Tutte le issue di bartgryszko/react-native-circular-progress

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.