Skip to content

CameraRoll.getPhotos breaks with assetType = photos #13671

Closed

Description

@zackify

Description

I'm using this library: https://github.com/jeanpan/react-native-camera-roll-picker/blob/master/index.js under the hood it calls the cameraRoll api. When I pass in 'All' for the asset type, it works. When I use 'Photos' as the type, the app crashes inside of the RCTCameraRoll code:

screen shot 2017-04-26 at 10 11 19 am

Reproduction Steps and Sample Code

I was going to try and add an example on expo, but it won't work unless you have more than just photos in your camera roll. To reproduce, just call CameraRoll.getPhotos({assetType: 'Photos'})

  • React Native version: 0.43.4
  • Platform: iOS
  • Development Operating System: MacOS
  • Dev tools: Xcode 8.3.2, iOS 10.3.1

Activity

  1. elanini commented on May 17, 2017

    @elanini

    Hi zackify, I'm having the same issue. How did you solve it?

  2. klvs commented on May 17, 2017

    @klvs
    Contributor

    @zackify I'm running into this problem. I noticed you closed it, did you solve it or find a work around, if so what is it?

  3. zackify commented on May 17, 2017

    @zackify
    Author
  4. pentarex commented on Jan 11, 2018

    @pentarex
    Contributor

    I am having the same issue with CameraRoll from RN.

    CameraRoll.getPhotos({
                first: 20,
                groupTypes: 'All',
                assetType: 'Photos'
            }).then(r => {
                console.log(r);
                
            }).catch((err) => {
                 console.log('gallery', err);
            });

    The thing is that some photo for some reason filename is missing (maybe iCloud). And I think its crashing because of that (not completely sure), but as I see @zackify also his filename was nil.

    It doesn't fail under the simulator, but on my real device, where most of my photos are on iCloud.

  5. sujit13666 commented on Jan 11, 2018

    @sujit13666

    Same Here guys.

  6. added a commit that references this issue on Jan 11, 2018
  7. pentarex commented on Jan 12, 2018

    @pentarex
    Contributor

    The pull request was approved, it only needs to get merged.

  8. facuescobar commented on Feb 28, 2018

    @facuescobar

    @pentarex was this update merged?

    I can not see it in the latest version of RN

  9. pentarex commented on Feb 28, 2018

    @pentarex
    Contributor

    I don’t think. Check my profile for alternative library that I’ve wrote if you want

  10. facuescobar commented on Mar 2, 2018

    @facuescobar

    @pentarex I did the same update on my project and I think that fixed some cases.

    But I'm still having errors with iCloud files, I have reported this #18159

    It's being difficult to find the reason of this bug because I know that is happening for some people, but I couldn't reproduce it 🤯

    if you have any idea or suggestion let me know please!

  11. pentarex commented on Mar 2, 2018

    @pentarex
    Contributor

    @facuescobar except the thing that I've told you, I have no other clue. Also they are using old framework for the Gallery and this is taking the pictures from iTunes, it has some strange ordering, if you want to test out this one be my guest https://github.com/pentarex/react-native-gallery-manager

  12. locked as resolved and limited conversation to collaborators on May 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions