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

Progress.Circle is not working on Android - -Error while updating property 'stroke' in shadow node of type: ARTShape

Open dogaoz opened this issue 6 years ago • 54 comments

This happens when we used Progress.Circle and Progress.CircleSnail "Error while updating property 'stroke' in shadow node of type: ARTShape

Value for stroke cannot be cast from String to ReadableArray"

Progress.Bar might be working fine since it doesn't cause this error but we don't need the bar version for our app.

dogaoz avatar Nov 18 '19 23:11 dogaoz

me too

jiaozhouzhou avatar Nov 19 '19 10:11 jiaozhouzhou

me too

I switched back to version 3.5.0. Even 3.6.0 is not working..

dogaoz avatar Nov 20 '19 00:11 dogaoz

Install this lib and check https://github.com/react-native-community/art

sandeepsinghs avatar Nov 21 '19 09:11 sandeepsinghs

Install this lib and check https://github.com/react-native-community/art

I tried that before opening this issue. It didn't work.

dogaoz avatar Nov 21 '19 22:11 dogaoz

Install this lib and check https://github.com/react-native-community/art

This is working for me, but I hope we don't have to install an extra package.

jonnynfb avatar Nov 26 '19 20:11 jonnynfb

Not working for me too, same issue running on android.

premhowli avatar Dec 02 '19 15:12 premhowli

I fixed this problem, and it working , following is the method

see https://github.com/react-native-community/art readme, we should migrating from the core react-native module

import {ART} from 'react-native'; const {Surface, Shape} = ART;

to

import {Surface, Shape} from '@react-native-community/art';

so , I override react-native-progress code ,modify import ART from '@react-native-community/art', like this : `// import { ART } from 'react-native';

import * as ART from '@react-native-community/art'`,

remember modify all file in react-native-progress;

good luck.

sszcome avatar Dec 04 '19 02:12 sszcome

@sszcome did anyone create a pull request yet?

dogaoz avatar Dec 04 '19 19:12 dogaoz

@dogaoz I can have a look at creating a PR tonight

dkwl93 avatar Dec 05 '19 03:12 dkwl93

I created a PR at https://github.com/oblador/react-native-progress/pull/181

danielwinkler avatar Dec 05 '19 13:12 danielwinkler

It is finally merged. Imagine how tired we are lmao

meme below tempsnip

dogaoz avatar Dec 18 '19 18:12 dogaoz

has anyone succeeded to resolve this issue ?

thanks was resolved by update @react-native-community/art to version 1.0.4

andreferi3 avatar Dec 19 '19 13:12 andreferi3

I have @react-native-community/art version 1.1.2 and I have exactly the same issue. Any news on this ?

Adeams1805 avatar Jan 02 '20 10:01 Adeams1805

I have @react-native-community/art version 1.1.2 and I have exactly the same issue. Any news on this ?

Yeah I also encounter this.

I'm investigating and for now I've pinpointed this part of code:

return (
      <ARTShape
        d={path}
        strokeCap={strokeCap}
        strokeWidth={strokeWidth}
        {...restProps}
      />

The {...restProps} containing stroke property which causing the error

I noticed that if I pass color:{null} it stops the error.

Rotemy avatar Jan 02 '20 10:01 Rotemy

For some reason my project is trying to use Facebook's old ARTShapeShadowNode which has

@ReactProp(name = "stroke")
  public void setStroke(@Nullable ReadableArray strokeColors) {
    mStrokeColor = PropHelper.toFloatArray(strokeColors);
    markUpdated();
  }

don't know how to tell my project to not use this.

Rotemy avatar Jan 02 '20 12:01 Rotemy

Managed to "fix" the problem right now with installing version 1.0.2 of art library as someone suggested here: https://github.com/oblador/react-native-progress/issues/179

I hope to find a proper fix.

Rotemy avatar Jan 02 '20 13:01 Rotemy

Hi @Rotemy,

I installed the 1.0.2 of Art library but I still have the issue, what version of Progress are you using?

Thanks, Théo

minuitagency avatar Jan 02 '20 14:01 minuitagency

Hi @Rotemy,

I installed the 1.0.2 of Art library but I still have the issue, what version of Progress are you using?

Thanks, Théo

I have 4.0.3, but I got to say that nothing (Circle, CircleSnail) is working for me, especially in iOS.

Very annoying.

Rotemy avatar Jan 02 '20 14:01 Rotemy

me too... going crazy with this right now, I'm gonna use Activity Indicator for the time being.

minuitagency avatar Jan 02 '20 15:01 minuitagency

eu também ... enlouquecendo com isso agora, vou usar o Indicador de Atividade por enquanto.

Veja isso https://github.com/expo/expo/issues/6523#issuecomment-571001942

emersonwdesigner avatar Jan 06 '20 05:01 emersonwdesigner

me too

maxlxq avatar Jan 06 '20 12:01 maxlxq

Downgrade it work for me: yarn add react-native-progress@^3.6.0

15110011 avatar Jan 08 '20 08:01 15110011

Downgrade it work for me: yarn add react-native-progress@^3.6.0

I tried all the above suggestions, but only downgrading to 3.6.0 solved the issue on android.

benazir46 avatar Jan 28 '20 07:01 benazir46

yarn add @react-native-community/art and rebuilding the app worked for me. I believe because this package doesn't have any native code, autolinking for @react-native-communit/art doesn't work. For RN < 0.60, react-native link @react-native-communit/art is also required.

The fix should be that this library set up the native dependency properly, or at least add linking instructions to the readme.

autoreleasefool avatar Feb 04 '20 11:02 autoreleasefool

Any new update on this, try latest version "@react-native-community/art": "^1.1.2" and "react-native-progress": "^4.0.3" but it's still not work.

hqdai avatar Feb 12 '20 09:02 hqdai

Any new update on this, try latest version "@react-native-community/art": "^1.1.2" and "react-native-progress": "^4.0.3" but it's still not work.

Sorry, I miss do the linking on Android for react-native-art, for those who getting this issue just follow these steps to link on android: https://github.com/react-native-community/art

Screen Shot 2020-02-13 at 10 07 18

hqdai avatar Feb 13 '20 03:02 hqdai

I have been upgraded "react-native-progress": "4.0.3",and "@react-native-community/art": "1.2.0", this issue was resolved

pahmcoung avatar Mar 21 '20 05:03 pahmcoung

@sandeepsinghs thanks for the solution

It works for me

allan-trabacus avatar Mar 24 '20 17:03 allan-trabacus

If you are on expo version 36 this wont work

anpct avatar Mar 26 '20 15:03 anpct

problms with PieChart. help me please

DavidDem249 avatar Mar 27 '20 05:03 DavidDem249