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

Cannot read property 'resizeMode' of undefined #34054

Closed
heekyu-pu opened this issue Jun 23, 2022 · 4 comments
Closed

Cannot read property 'resizeMode' of undefined #34054

heekyu-pu opened this issue Jun 23, 2022 · 4 comments
Labels
Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Needs: Triage 🔍

Comments

@heekyu-pu
Copy link

heekyu-pu commented Jun 23, 2022

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

@cortinico
Copy link
Contributor

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

Can you provide a reproducer?

@cortinico cortinico added the Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. label Jun 24, 2022
@github-actions
Copy link

⚠️ 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.

@YangJonghun
Copy link

YangJonghun commented Jun 26, 2022

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

@heekyu-pu
Copy link
Author

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

Thanks!

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Jul 1, 2022
@cortinico cortinico removed the Needs: Attention Issues where the author has responded to feedback. label Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Needs: Triage 🔍
Projects
None yet
Development

No branches or pull requests

3 participants