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

rn0.56 undefined is not an object (evaluating 'RCTImagePicker.canUserCamera') #21164

Closed
3 tasks
Dhams971 opened this issue Sep 18, 2018 · 6 comments
Closed
3 tasks
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@Dhams971
Copy link

Dhams971 commented Sep 18, 2018

Environment

React Native Environment Info:
System:
OS: macOS High Sierra 10.13.1
CPU: x64 Intel(R) Core(TM) i5-4278U CPU @ 2.60GHz
Memory: 40.60 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 8.9.3 - /usr/local/bin/node
Yarn: 1.7.0 - /usr/local/bin/yarn
npm: 6.4.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 11.0, macOS 10.13, tvOS 11.0, watchOS 4.0
IDEs:
Android Studio: 3.1 AI-173.4819257
Xcode: 9.0/9A235 - /usr/bin/xcodebuild
npmPackages:
react: 16.4.1 => 16.4.1
react-native: 0.56.0 => 0.56.0
npmGlobalPackages:
create-react-native-app: 1.0.0
react-native-cli: 2.0.1

Description

simulator screen shot - iphone 6 - 2018-09-18 at 12 22 01

Reproducible Demo

steps to reproduce the issue from the demo

  1. install node_modules
  2. eject ios
  3. react-native run ios

RN_Tutorial.zip

@react-native-bot
Copy link
Collaborator

It looks like you are using an older version of React Native. Please update to the latest release, v0.57 and verify if the issue still exists.

The ":rewind:Old Version" label will be removed automatically once you edit your original post with the results of running react-native info on a project using the latest release.

@balajipolamreddy25
Copy link

balajipolamreddy25 commented Sep 18, 2018 via email

@Dhams971
Copy link
Author

I have upgraded the React Native version by following the steps from Upgrading to new React Native versions

React Native Environment Info:
System:
OS: macOS High Sierra 10.13.1
CPU: x64 Intel(R) Core(TM) i5-4278U CPU @ 2.60GHz
Memory: 566.66 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 8.9.3 - /usr/local/bin/node
npm: 6.4.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 11.0, macOS 10.13, tvOS 11.0, watchOS 4.0
IDEs:
Android Studio: 3.1 AI-173.4819257
Xcode: 9.0/9A235 - /usr/bin/xcodebuild
npmPackages:
react: 16.5.0 => 16.5.0
react-native: 0.57.0 => 0.57.0
npmGlobalPackages:
react-native-cli: 2.0.1

now I am getting the following errors while running react-native run-ios command

❌  /MobileTechnologies/Reactnative/RN_Tutorial/node_modules/react-native/Libraries/LinkingIOS/RCTLinkingManager.h:14:36: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]

+ (BOOL)application:(UIApplication *)app
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



❌  /MobileTechnologies/Reactnative/RN_Tutorial/node_modules/react-native/Libraries/LinkingIOS/RCTLinkingManager.h:25:29: block pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]

  restorationHandler:(void (^)(NSArray * __nullable))restorationHandler;
                                   ^


** BUILD FAILED **


The following commands produced analyzer issues:

	Analyze Base/RCTModuleMethod.mm
	Analyze Modules/RCTUIManager.m
(2 commands with analyzer issues)

The following build commands failed:
	CompileC /MobileTechnologies/Reactnative/RN_Tutorial/ios/build/Build/Intermediates.noindex/RCTLinking.build/Debug-iphonesimulator/RCTLinking.build/Objects-normal/x86_64/RCTLinkingManager.o RCTLinkingManager.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

Installing build/Build/Products/Debug-iphonesimulator/RN_Tutorial.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/RN_Tutorial.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist


Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/RN_Tutorial.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

    at checkExecSyncError (child_process.js:601:13)
    at Object.execFileSync (child_process.js:621:13)
    at Promise.then (/MobileTechnologies/Reactnative/RN_Tutorial/node_modules/react-native/local-cli/runIOS/runIOS.js:208:5)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

@hramos
Copy link
Contributor

hramos commented Sep 18, 2018

Can you try using Xcode 9.4?

@Dhams971
Copy link
Author

Dhams971 commented Sep 19, 2018

@hramos

Thanks for the suggestion.

I figured out the solution for the above errors.

  • For nullability check, I found a solution in this link

  • And for Print: Entry, ":CFBundleIdentifier", Does Not Exist I found that @babel/core is not default added in package.json>dependencies when creating new project or updating the existing so I have installed it using command: npm install @babel/core

now I am working with the latest React Native version.

React Native Environment Info:
System:
      OS: macOS High Sierra 10.13.1
      CPU: x64 Intel(R) Core(TM) i5-4278U CPU @ 2.60GHz
      Memory: 44.59 MB / 8.00 GB
      Shell: 3.2.57 - /bin/bash
Binaries:
      Node: 8.12.0 - /usr/local/bin/node
      Yarn: 1.9.4 - /usr/local/bin/yarn
      npm: 6.4.1 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
      iOS SDK:
        Platforms: iOS 11.0, macOS 10.13, tvOS 11.0, watchOS 4.0
IDEs:
      Android Studio: 3.1 AI-173.4819257
      Xcode: 9.0/9A235 - /usr/bin/xcodebuild
npmPackages:
      react: 16.5.0 => 16.5.0 
      react-native: 0.57.0 => 0.57.0 
npmGlobalPackages:
      create-react-native-app: 1.0.0
      react-native-cli: 2.0.1

but still undefined is not an object (evaluating 'RCTImagePicker.canUserCamera') this error is not resolved. I have also searched for RCTImagePicker module but not getting any information regarding this.

can you please help me with this?

@Dhams971
Copy link
Author

the issue is resolved by linking CameraRoll Library.
linking-libraries-ios

@facebook facebook locked as resolved and limited conversation to collaborators Sep 19, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Sep 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants