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

Error when using RN 0.42.3 #48

Closed
yaronlevi opened this issue Mar 22, 2017 · 6 comments
Closed

Error when using RN 0.42.3 #48

yaronlevi opened this issue Mar 22, 2017 · 6 comments

Comments

@yaronlevi
Copy link

I've created a barebones react-native [email protected] project and copied the carousel:

<View style={styles.container}>
        <Carousel ref={'carousel'} sliderWidth={200} itemWidth={100}>
          <Text>aaa</Text>
        </Carousel>
      </View>

And getting this error:
screenshot_20170322-141944

@bd-arc
Copy link
Contributor

bd-arc commented Mar 22, 2017

@yaronlevi This error is triggered when the carousel only has one children. I thought I had already pushed a fix, but I apparently forgot. I'll do it shortly.

In the meantime, can you confirm that with two or more children the error is gone?

@yaronlevi
Copy link
Author

yaronlevi commented Mar 22, 2017

Ok, I've tried putting two child Image elements, and the error is gone, but now I only see the first image. When I swipe to the second one, I just see white background. As if the image was not loaded.

screenshot_20170322-160725

I've created a repo to reproduce the bug:

https://github.com/yaronlevi/carousel

(code is in index.android.js)

@bd-arc
Copy link
Contributor

bd-arc commented Mar 22, 2017

@yaronlevi I've just downloaded and built your project, but I didn't face any issue. You can see the result with this gif.

You might be facing #38. Can you try on an emulator, on another device, and/or with another Android version?

@yaronlevi
Copy link
Author

Mmm very strange
My device is nexus 5
lollipop
how can this be related to the device...?

@bd-arc
Copy link
Contributor

bd-arc commented Mar 22, 2017

@yaronlevi Well, this kind of issues has only been experimented on Google devices; this might be linked to React Native's ScrollView implementation.

Unfortunately, we haven't been able to reproduce the issues so far (it works properly on every one of our Android devices, including a LG G3). This makes them pretty complicated to debug.

We're working on implementing a custom PanResponder that may resolve the issue, but it's not going to be released in the near future.

@bd-arc
Copy link
Contributor

bd-arc commented Mar 24, 2017

Follow-up discussion about the Android issue will take place in #38

@bd-arc bd-arc closed this as completed Mar 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants