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

Undefined is not an object (evaluating '_reactNative.Image.resizeMode.stretch') #20409

Closed
1fabiopereira opened this issue Jul 26, 2018 · 3 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@1fabiopereira
Copy link

Environment

React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: x64 Intel(R) Core(TM) i5-4278U CPU @ 2.60GHz
      Memory: 30.31 MB / 8.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 8.9.1 - /usr/local/bin/node
      npm: 5.5.1 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3
      Android SDK:
        Build Tools: 23.0.1, 23.0.3, 25.0.0, 25.0.1, 25.0.2, 25.0.3, 26.0.0, 26.0.1, 26.0.2, 26.0.3, 27.0.0, 27.0.1, 27.0.2, 27.0.3
        API Levels: 21, 22, 23, 24, 25, 26, 27
    IDEs:
      Android Studio: 3.1 AI-173.4819257
      Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild
    npmPackages:
      react: ^16.2.0 => 16.4.1
      react-native: ^0.56.0 => 0.56.0
    npmGlobalPackages:
      react-native-cli: 2.0.1
      react-native-git-upgrade: 0.2.7
      react-native-rename: 2.1.5

Description

I did the react-native upgrade to 0.56 after compiling on the android I get the following error when trying to open the application:

E/ReactNativeJS: undefined is not an object (evaluating '_reactNative.Image.resizeMode.stretch')
E/unknown:ReactNative: Unable to launch redbox because react activity is not available, here is the error that redbox would've displayed: undefined is not an object (evaluating '_reactNative.Image.resizeMode.stretch')
@JimmiHagen
Copy link

my code uses Image.resizeMode.cover and triggers the same error after upgrade, also on Android.

@kebernet
Copy link

Anything here?

@kelset
Copy link
Contributor

kelset commented Aug 31, 2018

That's because since 0.56 Image.resizeMode is not exposed anymore. You just need to use the string value instead.

@kelset kelset closed this as completed Aug 31, 2018
@facebook facebook locked as resolved and limited conversation to collaborators Aug 31, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Aug 31, 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

5 participants