Skip to content

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

Closed
@devon-whil

Description

@devon-whil
Contributor

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

Activity

devon-whil

devon-whil commented on Jun 10, 2022

@devon-whil
ContributorAuthor

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

devon-whil

devon-whil commented on Jun 10, 2022

@devon-whil
ContributorAuthor

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

freeboub

freeboub commented on Jun 10, 2022

@freeboub
Collaborator

@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

added this to the 6.0.0-alpha.1 milestone on Jun 15, 2022
imshreyansh

imshreyansh commented on Jun 24, 2022

@imshreyansh

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

freeboub

freeboub commented on Jun 24, 2022

@freeboub
Collaborator

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

imshreyansh

imshreyansh commented on Jun 24, 2022

@imshreyansh

@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

Abhishek2250 commented on Jun 27, 2022

@Abhishek2250

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

SakeFabi commented on Jul 1, 2022

@SakeFabi

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

LeviWilliams

LeviWilliams commented on Jul 5, 2022

@LeviWilliams

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

kevinhylant commented on Jul 6, 2022

@kevinhylant

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

Any recommendations here?

JoshiAditi1993

JoshiAditi1993 commented on Jul 15, 2022

@JoshiAditi1993

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

6 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      Participants

      @hueniverse@kevinhylant@LeviWilliams@imshreyansh@Iheb-miled

      Issue actions

        ERROR TypeError: undefined is not an object (evaluating '_reactNative.Image.propTypes.resizeMode') · Issue #2714 · TheWidlarzGroup/react-native-video