react-native-image-crop-picker icon indicating copy to clipboard operation
react-native-image-crop-picker copied to clipboard

ios App crash at once

Open amitbravo opened this issue 6 years ago • 5 comments

Version

Tell us which versions you are using:

  • react-native-image-crop-picker v0.26.1?
  • react-native v0.61.2

Platform

Tell us to which platform this issue is related

  • iOS

Actual behaviour

"libc++abi.dylib: terminating with uncaught exception of type NSException"

Steps to reproduce

  1. yarn add react-native-image-crop-picker

  2. cd ios && pod install

  3. pod 'QBImagePickerController', :path => '../node_modules/react-native-image-crop-picker/ios/QBImagePicker/QBImagePickerController.podspec'

  4. added NSPhotoLibraryUsageDescription NSMicrophoneUsageDescription NSCameraUsageDescription into info.plist

  5. react-native run-ios

after these as it didn't work, I tried to use react-native link react-native-image-crop-picker cleaned, ios build, erase from simulator, nothing worked.

Screenshot 2019-10-23 at 12 34 47 PM

Podfile content:

latform :ios, '9.0' require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

target 'xycabs' do

Pods for xcabs

pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons' pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector" pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec" pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired" pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety" pod 'React', :path => '../node_modules/react-native/' pod 'React-Core', :path => '../node_modules/react-native/' pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules' pod 'React-Core/DevSupport', :path => '../node_modules/react-native/' pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS' pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation' pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob' pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image' pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS' pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network' pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings' pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text' pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration' pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'

pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact' pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi' pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor' pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector' pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon" pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon" pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec' pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec' pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

pod 'Firebase/Core', '~> 6.3.0' pod 'Firebase/Auth', '~> 6.3.0' pod 'Firebase/Messaging', '~> 6.3.0' pod 'Firebase/Storage', '~> 6.3.0' pod 'Firebase/Firestore', '~> 6.3.0'

pod 'QBImagePickerController', :path => '../node_modules/react-native-image-crop-picker/ios/QBImagePicker/QBImagePickerController.podspec'

target 'xycabsTests' do inherit! :search_paths # Pods for testing end

use_native_modules! end

amitbravo avatar Oct 22 '19 14:10 amitbravo

hmmm i may be experiencing something similar. I have existing projects that all work fine however for a new project created with Xcode 11.2 i get this issue. Wondering if its related to all the new Application Scene Manifest stuff in info.plist and the new iOS 13 methods in AppDelegate under UISceneSession lifecycle that get scaffolded in with a new project.

Looking more at the error: [GUL_AppDelegate-87E382F8-4D6E-4BA5-8909-BC2B4AD3061D window]: unrecognized selector sent to instance

Is the library calling a method on window that no longer exists?

Happens on ImageCropPicker.openCamera({ and ImageCropPicker.openPicker({

devpascoe avatar Nov 06 '19 07:11 devpascoe

Update: got it going with... AppDelegate.h add a missing @property (strong, nonatomic) UIWindow *window;

AppDelegate.m Comment out all the UISceneSession lifecycle events relating to UISceneConfiguration and UISceneSession

Info.plist Delete the property dictionary: Application Scene Manifest

Those actions should revert the project to support pre iOS 13. With the new version they do away with window and its all about Scene. Performing above makes the project backwards compatible hence why my old projects remained functional.

At some stage the getRootVC method in ImageCropPicker.m will need to be updated to support this new way of obtaining the rootViewController.

devpascoe avatar Nov 06 '19 09:11 devpascoe

Hey @amitbravo did solution provided by @devpascoe solve your problem and you are still using this library? Or you come up with something else? Thanks

olegmilan avatar Nov 22 '19 07:11 olegmilan

Tried the solution suggested by @devpascoe, no luck whatsoever

  • React Native 0.61.0
  • Library Version: 0.28.0

Same error:

-[NSNull length]: unrecognized selector sent to instance 0x1f6ed7c00 ** Terminating app due to uncaught exception 'NSInvalidArgumentException'

RamonAcedoM avatar Feb 26 '20 04:02 RamonAcedoM

Just curios if any developers have got a resolution for this long-standing issue

dearsikandarkhan avatar Sep 12 '23 04:09 dearsikandarkhan