question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[react-native-svg] regressions with react-native-reanimated 2.3.1

See original GitHub issue

Description

I have developed a small library to draw on pictures:

https://github.com/ArchireportTeam/react-native-svg-draw

When I use 2.3.1, I have the following issues (which are not present in 2.2.4):

On Android(only): fill: ‘none’ (in https://github.com/ArchireportTeam/react-native-svg-draw/blob/main/src/components/DrawCore/CurrentAnimatedItem.tsx) make a crash

java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
	at java.util.ArrayList.get(ArrayList.java:437)
	at com.facebook.react.bridge.JavaOnlyArray.getDouble(JavaOnlyArray.java:91)
	at com.horcrux.svg.RenderableView.setupPaint(RenderableView.java:485)
	at com.horcrux.svg.RenderableView.setupFillPaint(RenderableView.java:435)

On iOS and Android: Markers are sometimes not displayed (while drawing arrow for example)

Expected behavior

The library have the same behavior with reanimated 2.2.4 and 2.3.1

Actual behavior & steps to reproduce

Upgrade example app from https://github.com/ArchireportTeam/react-native-svg-draw to reanimated 2.3.1 and run the app

On Android, remove fill: 'none' in CurrentAnimatedItem.tsx to avoid the crash.

Try to add arrows (with 2.2.4 arrow head is displayed, with 2.3.1 not)

Snack or minimal code example

https://github.com/ArchireportTeam/react-native-svg-draw

Package versions

2.3.1

  • React Native: 0.66.2
  • React Native Reanimated: 2.3.1
  • NodeJS: 16.13.1
  • Xcode:
  • Java & Gradle: jdk 8.0.312-zulu / gradle 4.2.2

Affected platforms

  • Android
  • iOS
  • Web

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
schiller-manuelcommented, Jan 28, 2022

Hi @schiller-manuel,

Could you create a new issue with this information? These problems seem unrelated.

Cheers

@kacperkapusciak done => https://github.com/software-mansion/react-native-reanimated/issues/2900

1reaction
mlecoqcommented, Jan 28, 2022

@kacperkapusciak I have created a very small example here to reproduce crash on android : https://github.com/mlecoq/reanimated-2-svg-issue - app crashes on android on startup

Read more comments on GitHub >

github_iconTop Results From Across the Web

software-mansion/react-native-reanimated@7820ec0 - GitHub
[react-native-svg] regressions with react-native-reanimated 2.3.1 · Run details · Usage · Workflow file.
Read more >
Unable to resolve module `react-native-reanimated`
I figured out this because I deleted the node_modules folder and installed again all the dependencies by yarn install so, if have a...
Read more >
expo | Yarn - Package Manager
The expo package is a single package you can install in any React Native app to begin using Expo modules. includes core infrastructure...
Read more >
react-native-reanimated: Versions - Openbase
Full version history for react-native-reanimated including change logs. ... Add react-native-svg example in FabricExample by @tomekzaw in ...
Read more >
Intro to SVG Animations with React-Native ReAnimated 2
yarn add react-native-svg react-native-reanimated. Next, add the following to your babel.config.js to enable the ReAnimated plugin for the Metro Bundler.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found