Skip to content

Cannot read property 'resizeMode' of undefined #34054

Closed

Description

@heekyu-ridi

Description

Error Occurred after upgrade to 0.69

ERROR TypeError: Cannot read property 'resizeMode' of undefined, js engine: hermes
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native., js engine: hermes

ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native., js engine: hermes

Version

0.69.0

Output of npx react-native info

app % npx react-native info
warn Package @sentry/react-native has been ignored because it contains invalid configuration. Reason: "dependency.platforms.ios.sharedLibraries" is not allowed
warn Package appcenter has been ignored because it contains invalid configuration. Reason: "dependency.platforms.ios.podspecPath" is not allowed
warn Package appcenter-analytics has been ignored because it contains invalid configuration. Reason: "dependency.platforms.ios.podspecPath" is not allowed
warn Package appcenter-crashes has been ignored because it contains invalid configuration. Reason: "dependency.platforms.ios.podspecPath" is not allowed
warn Package react-native-appsflyer has been ignored because it contains invalid configuration. Reason: "dependency.platforms.ios.podspecPath" is not allowed
warn Package react-native-vector-icons has been ignored because it contains invalid configuration. Reason: "dependency.assets" is not allowed
info Fetching system and libraries information...
System:
OS: macOS 11.6
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 104.66 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.13.1 - ~/.nvm/versions/node/v16.13.1/bin/node
Yarn: 1.22.17 - ~/.nvm/versions/node/v16.13.1/bin/yarn
npm: 8.3.0 - ~/.nvm/versions/node/v16.13.1/bin/npm
Watchman: 2022.06.13.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
Android SDK: Not Found
IDEs:
Android Studio: 4.1 AI-201.8743.12.41.7042882
Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
Languages:
Java: 11.0.11 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: 0.69.0 => 0.69.0
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

Steps to reproduce

  1. upgraded from 0.68.1
  2. yarn android
  3. android build success
  4. metro bundler bundle success
  5. app failed to launch with above error (resizeMode)

react-native/Libraries/NewAppScreen works well

Snack, code example, screenshot, or link to a repository

스크린샷 2022-06-23 오후 6 30 23

Activity

  1. cortinico commented on Jun 24, 2022

    @cortinico
    Contributor

    Snack, code example, screenshot, or link to a repository

    Can you provide a reproducer?

  2. added
    Needs: ReproThis issue could be improved with a clear list of steps to reproduce the issue.
    on Jun 24, 2022
  3. github-actions commented on Jun 24, 2022

    @github-actions
    ⚠️ Missing Reproducible Example
    ℹ️ It looks like your issue is missing a reproducible example. Please provide a Snack or a repository that demonstrates the issue you are reporting in a minimal, complete, and reproducible manner.
  4. YangJonghun commented on Jun 26, 2022

    @YangJonghun
    Contributor

    maybe Invariant Violation Error is related with TypeError
    TypeError: Cannot read property 'resizeMode' of undefined occurred when use Image.propTypes.resizeMode (it should be replaced by deprecated-react-native-prop-types).
    If you don't use above code, please check your dependencies.
    (I don't know why initial bundle load show Invariant Violation Error, but HMR with error show just above TypeError)

    also, output of your react-native info is related with react-native-cli's breaking change about react-native.config.js

    warn Package @sentry/react-native has been ignored because it contains invalid configuration. Reason: "dependency.platforms.ios.sharedLibraries" is not allowed
    warn Package appcenter has been ignored because it contains invalid configuration. Reason: "dependency.platforms.ios.podspecPath" is not allowed
    warn Package appcenter-analytics has been ignored because it contains invalid configuration. Reason: "dependency.platforms.ios.podspecPath" is not allowed
    warn Package appcenter-crashes has been ignored because it contains invalid configuration. Reason: "dependency.platforms.ios.podspecPath" is not allowed
    warn Package react-native-appsflyer has been ignored because it contains invalid configuration. Reason: "dependency.platforms.ios.podspecPath" is not allowed
    warn Package react-native-vector-icons has been ignored because it contains invalid configuration. Reason: "dependency.assets" is not allowed
    

    (FYI. https://reactnative.dev/blog/2022/06/21/version-069#breaking-changes)
    (FYI2. react-native-community/cli#1537)
    so, you have to wait until library update or patch it

  5. heekyu-ridi commented on Jul 1, 2022

    @heekyu-ridi
    Author

    it turns out that react-native-video issue
    TheWidlarzGroup/react-native-video#2752

    Thanks!

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

    Needs: ReproThis issue could be improved with a clear list of steps to reproduce the issue.Needs: Triage 🔍

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions