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

CameraRoll.getPhotos Invalid filter option with assetType on iOS #23891

Closed
JulienUsson opened this issue Mar 13, 2019 · 2 comments
Closed

CameraRoll.getPhotos Invalid filter option with assetType on iOS #23891

JulienUsson opened this issue Mar 13, 2019 · 2 comments
Labels
API: CameraRoll Bug Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.

Comments

@JulienUsson
Copy link

JulienUsson commented Mar 13, 2019

🐛 Bug Report

I have an Invalid filter option: '(null)'. Expected one of 'photos','videos' or 'all'. when i call CameraRoll.getPhotos({ first: 1}) on iOS with rn 0.59. It works on Android.

assetType has not the Photos default value as wrote in https://facebook.github.io/react-native/docs/cameraroll

Invalid filter option: '(null)'. Expected one of 'photos','videos' or 'all'.

+[RCTConvert(PHFetchOptions) PHFetchOptionsFromMediaType:]
    RCTCameraRollManager.m:61
-[RCTCameraRollManager getPhotos:resolve:reject:]
__invoking___
-[NSInvocation invoke]
-[NSInvocation invokeWithTarget:]
-[RCTModuleMethod invokeWithBridge:module:arguments:]
facebook::react::invokeInner(RCTBridge*, RCTModuleData*, unsigned int, folly::dynamic const&)
facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int)::$_0::operator()() const
invocation function for block in facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int)
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_lane_serial_drain
_dispatch_lane_invoke
_dispatch_workloop_worker_thread
_pthread_wqthread
start_wqthread

This error message comes from

RCTLogError(@"Invalid filter option: '%@'. Expected one of 'photos',"

To Reproduce

Call CameraRoll.getPhotos({ first: 1}) on iOS with rn 0.59

Expected Behavior

No errors.

Environment

  React Native Environment Info:
    System:
      OS: macOS 10.14.3
      CPU: x64 Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz
      Memory: 22.60 MB / 8.00 GB
      Shell: 5.7.1 - /usr/local/bin/zsh
    Binaries:
      Node: 11.10.0 - /usr/local/bin/node
      Yarn: 1.10.1 - /usr/local/bin/yarn
      npm: 6.7.0 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
      Android SDK:
        Build Tools: 23.0.1, 24.0.3, 25.0.2, 26.0.1, 26.0.2, 27.0.3, 28.0.2, 28.0.3
        API Levels: 23, 24, 25, 26, 27, 28
    IDEs:
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      react: ^16.8.4 => 16.8.4 
      react-native: ^0.59.0 => 0.59.0 
    npmGlobalPackages:
      react-native-cli: 2.0.1
      react-native-git-upgrade: 0.2.7
@Salakar
Copy link
Contributor

Salakar commented Mar 19, 2019

Hey @JulienUsson thank you for reporting this issue 💛

As part of the React Native Lean Core initiative we're moving cameraroll to its own community package.

We'll get this issue moved there to be reviewed.

@cpojer
Copy link
Contributor

cpojer commented Mar 19, 2019

This issue has been moved to react-native-cameraroll/react-native-cameraroll#11.

@cpojer cpojer closed this as completed Mar 19, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Mar 19, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Mar 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
API: CameraRoll Bug Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants