Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Carousel crashes when swiping in the opposite direction #215

Closed
aditya-keri-betterhalf opened this issue Jun 26, 2022 · 6 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@aditya-keri-betterhalf
Copy link

Describe the bug
I've been trying out the examples from exampleExpo repo. Whenever I swipe the cards in the opposite direction of their design, the carousel crashes.
Example : Open StackCards and swipe right or left when the direction is actually vertical. Or open Parallax and swipe up or down when the direction is actually horizontal.

To Reproduce
Steps to reproduce the behavior:

  1. Open any example in exampleExpo.
  2. Swipe horizontally if the carousel is vertical or swipe vertically if the carousel is horizontal.
  3. Carousel crashes

Expected behavior
Carousel should not crash and should just ignore the swipe that was done in the opposite diretion.

Screenshots

Carousel.Crash.mov

Versions (please complete the following information):

  • react: v17.0.2
  • react-native: v0.68.2
  • react-native-reanimated: v~2.8.0
  • react-native-reanimated-carousel: latest
  • react-native-gesture-handler: v~2.2.1

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6] iPhone 13 simulator
  • OS: [e.g. iOS8.1] iOS
  • Browser [e.g. stock browser, safari] NA
  • Version [e.g. 22] NA

Additional context
NA

@aditya-keri-betterhalf aditya-keri-betterhalf added the bug Something isn't working label Jun 26, 2022
@oliverloops
Copy link
Collaborator

Hi @aditya-keri-betterhalf, I'm running multiple examples and I found the same gesture issue, let me see what's happening behind the scenes and why is crashing

@oliverloops
Copy link
Collaborator

I have an implementation of the carousel in production and everything seems to behave correctly, don't crashing reports or bugs. this is a related problem to our exampleExpo project, we will be fixing this soon.

@AleRaDev12
Copy link

Hi, @dohooo, thank you for the good carousel module.

I have same problem, what described by @aditya-keri-betterhalf.

I checked it for the different versions of react-native-reanimated-carousel and dependenced modules (react-native-reanimated and react-native-gesture-handler) and found this bug only in 3.0.1 (there is no bug in 3.0.0).

Proof: https://user-images.githubusercontent.com/98889055/176166354-ce74fced-53c1-4aff-9f40-0de4c70ee1b7.mp4

But its reproduced not only for swipe in the opposite direction. I get a similar error on a smartphone (both Android and iOS) with a normal swipe.

At first I got this error not on your example, but on prod application.
Proof (recorded on Android device, without using Expo):
https://user-images.githubusercontent.com/98889055/176169926-84b23a68-e853-42e1-b50a-0fb7b4e33137.mp4

Proof on your example (recorded on iOS device).
https://user-images.githubusercontent.com/98889055/176170340-2a447c10-21cc-4ffc-8a78-67a9260428e3.mp4

Links for tests:
https://snack.expo.dev/@alexeymcc/simple-carousel---3-0-0---without-bug
https://snack.expo.dev/@alexeymcc/simple-carousel---3-0-1---with-bug

@dohooo
Copy link
Owner

dohooo commented Jun 28, 2022

@aditya-keri-betterhalf @AleRaDev12 Thanks for the detailed information, I'll fix it ASAP.

@dohooo dohooo closed this as completed in b5fc081 Jun 28, 2022
@dohooo
Copy link
Owner

dohooo commented Jun 28, 2022

Fixed in 3.0.3.

@AleRaDev12
Copy link

Fixed in 3.0.3.

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants