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

ERROR TypeError: undefined is not an object (evaluating '_reactNative.Image.propTypes.resizeMode') #2714

Closed
devon-whil opened this issue Jun 10, 2022 · 16 comments · Fixed by #2718

Comments

@devon-whil
Copy link
Contributor

devon-whil commented Jun 10, 2022

Bug

Platform

Which player are you experiencing the problem on:

  • iOS

Environment info

React native info output:

 ERROR  TypeError: undefined is not an object (evaluating '_reactNative.Image.propTypes.resizeMode')

Library version: react-native@0.69.0-rc.6, react@18.1.0 and react-native-video@^5.2.0

Steps To Reproduce

Trying out all the latest stuff and I get the error shown above. I'm using nx & react-native without expo. The following code seems to be the culprit:
https://github.com/react-native-video/react-native-video/blob/master/Video.js#L429

@devon-whil
Copy link
Contributor Author

A few other mentions of this same error:
#1672 (comment)
#2065 (comment)

@devon-whil
Copy link
Contributor Author

Here is the react-native commit that removed propTypes from the Image component:
facebook/react-native@3e229f2

@freeboub
Copy link
Collaborator

freeboub commented Jun 10, 2022

@devon-whil thanks for the detail report !
Similar fix was done here: https://github.com/react-native-video/react-native-video/pull/2625/files
We should use:
import {ImagePropTypes} from 'deprecated-react-native-prop-types';
from:
https://www.npmjs.com/package/deprecated-react-native-prop-types/v/2.2.0
If you can open a PR that would be helpful !
Thank you

@imshreyansh
Copy link

imshreyansh commented Jun 24, 2022

@hueniverse @devon-whil Is it fixed ? I am still facing the issue in React Native 0.69 !
Please help

@freeboub
Copy link
Collaborator

@imshreyansh it is fixed in v6 pre release ? Are you one this one ?

@imshreyansh
Copy link

@freeboub
Oops my mistake !! My package.json contained version "^5.2.0", I just upgraded the react native video to version "^6.0.0-alpha.1" and everything works absolutely fine.
Thanks :-)

@Abhishek2250
Copy link

I'm getting issues while installing the pods after upgrading the lib to version 6.0.0-alpha.1. When I degrade the lib to version 5.2.0 then it's working fine.

@SakeFabi
Copy link

SakeFabi commented Jul 1, 2022

I also ran into this, does it mean that I cannot use 6.0.0 for iOS? We definitely need both.

@LeviWilliams
Copy link

Had issues installing 6.0.0-alpha.1 as well, had to enable use_modular_headers! in my podfile as well as manually override it for glog pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec', :modular_headers => false

@kevinhylant
Copy link

Also running into this issue on 5.2.0 with RN 0.91.1 and react 18.0.0.

Any recommendations here?

@JoshiAditi1993
Copy link

Hi, I tried to upgrade to react 0.69.1 and react-native-video to 6.0.0-alpha.1. I am still facing this issue.
Please help

@Iheb-miled
Copy link

Iheb-miled commented Jul 18, 2022

I just upgraded the react native video to version "^6.0.0-alpha.1" and everything works fine, after upgrade execute " npx react-native run-android " then "npx react-native start --reset-cache"
RN: 0.69.1
React: 18.0.0

@Abhishek2250
Copy link

I've upgraded to "^6.0.0-alpha.1" and now getting below issue while installing pods. When I install the version "5.2..0" then pod error is not coming.

System:
OS: macOS 12.3.1
CPU: (8) x64 Apple M1 Pro
Memory: 143.45 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 17.9.0 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 8.5.5 - /usr/local/bin/npm
Watchman: 2022.03.21.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /Users/abhishek/.rvm/rubies/ruby-2.7.5/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
Android SDK:
Android NDK: 22.1.7171670
IDEs:
Android Studio: 2021.1 AI-211.7628.21.2111.8309675
Xcode: 13.2/13C90 - /usr/bin/xcodebuild
Languages:
Java: 11.0.13 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: ^18.0.0 => 18.2.0
react-native: ^0.69.0 => 0.69.0

Error:
LoadError - dlopen(/Users/abhishek/.rvm/gems/ruby-2.7.5/gems/ffi-1.15.5/lib/ffi_c.bundle, 0x0009): tried: '/Users/abhishek/.rvm/gems/ruby-2.7.5/gems/ffi-1.15.5/lib/ffi_c.bundle' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')) - /Users/abhishek/.rvm/gems/ruby-2.7.5/gems/ffi-1.15.5/lib/ffi_c.bundle
/Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in require' /Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in require'
/Users/abhishek/.rvm/gems/ruby-2.7.5/gems/ffi-1.15.5/lib/ffi.rb:5:in rescue in <top (required)>' /Users/abhishek/.rvm/gems/ruby-2.7.5/gems/ffi-1.15.5/lib/ffi.rb:2:in <top (required)>'
/Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in require' /Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in require'
/Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/ethon-0.15.0/lib/ethon.rb:3:in <top (required)>' /Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in require'
/Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in require' /Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/typhoeus-1.4.0/lib/typhoeus.rb:2:in <top (required)>'
/Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in require' /Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in require'
/Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/cdn_source.rb:440:in download_typhoeus_impl_async' /Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/cdn_source.rb:372:in download_and_save_with_retries_async'
/Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/cdn_source.rb:365:in download_file_async' /Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/cdn_source.rb:338:in download_file'
/Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/cdn_source.rb:284:in ensure_versions_file_loaded' /Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/cdn_source.rb:208:in search'
/Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/source/aggregate.rb:83:in block in search' /Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/source/aggregate.rb:83:in select'
/Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/source/aggregate.rb:83:in search' /Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:416:in create_set_from_sources'
/Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:385:in find_cached_set' /Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:360:in specifications_for_dependency'
/Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:165:in search_for' /Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:274:in block in sort_dependencies'
/Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:267:in each' /Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:267:in sort_by'
/Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:267:in sort_by!' /Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:267:in sort_dependencies'
/Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:60:in block in sort_dependencies' /Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:77:in with_no_such_dependency_error_handling'
/Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:59:in sort_dependencies' /Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:754:in push_state_for_requirements'
/Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:744:in require_nested_dependencies_for' /Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:727:in activate_new_spec'
/Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:684:in attempt_to_activate' /Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:254:in process_topmost_state'
/Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:182:in resolve' /Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/molinillo-0.8.0/lib/molinillo/resolver.rb:43:in resolve'
/Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:94:in resolve' /Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1078:in block in resolve_dependencies'
/Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in section' /Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1076:in resolve_dependencies'
/Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:124:in analyze' /Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:416:in analyze'
/Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:241:in block in resolve_dependencies' /Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in section'
/Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:240:in resolve_dependencies' /Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:161:in install!'
/Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/command/install.rb:52:in run' /Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/claide-1.1.0/lib/claide/command.rb:334:in run'
/Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in run' /Users/abhishek/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/bin/pod:55:in <top (required)>'
/Users/abhishek/.rvm/rubies/ruby-2.7.5/bin/pod:23:in load' /Users/abhishek/.rvm/rubies/ruby-2.7.5/bin/pod:23:in

'


――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

[!] Oh no, an error occurred.

Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=dlopen%28%2FUsers%2Fabhishek%2F.rvm%2Fgems%2Fruby-2.7.5%2Fgems%2Fffi-1.15.5%2Flib%2Fffi_c.bundle%2C+0x0009%29%3A+tried%3A+%27%2FUsers%2Fabhishek%2F.rvm%2Fgems%2Fruby-2.7.5%2Fgems%2Fffi-1.15.5%2Flib%2Fffi_c.bundle%27+%28mach-o+file%2C+but+is+an+incompatible+architecture+%28have+%27x86_64%27%2C+need+%27arm64e%27%29%29+-+%2FUsers%2Fabhishek%2F.rvm%2Fgems%2Fruby-2.7.5%2Fgems%2Fffi-1.15.5%2Flib%2Fffi_c.bundle&type=Issues

If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new

Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md

Don't forget to anonymize any private data!

Looking for related issues on cocoapods/cocoapods...
Searching for inspections failed: undefined method `map' for nil:NilClass
abhishek@Abhis-Mac ios % 

@TALBI-svg
Copy link

@freeboub Oops my mistake !! My package.json contained version "^5.2.0", I just upgraded the react native video to version "^6.0.0-alpha.1" and everything works absolutely fine. Thanks :-)

i already try to upgrade 5.2.0 to 6.0.0 alpha1 and it's not working

@freeboub
Copy link
Collaborator

freeboub commented Aug 6, 2022

@TALBI-svg can you try with this branch please: #2795
It is plan to be a 5.2.1 ! (And approve the PR if it is OK)
Thank you

@galaxyreal
Copy link

The issue was solved after upgrading to version 5.2.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.