TheWidlarzGroup / react-native-video

A <Video /> component for react-native
https://thewidlarzgroup.github.io/react-native-video/
MIT License
7.19k stars 2.9k forks source link

[BUG]: codepush + RNV6, TypeError: Cannot read property 'ScaleAspectFill' of undefined #3553

Closed lovegaoshi closed 7 months ago

lovegaoshi commented 8 months ago

Version

v6 (Beta)

What platforms are you having the problem on?

No response

Architecture

Old architecture

What happened?

I pinned down enabling codepush will triggerTypeError: Cannot read property 'ScaleAspectFill' of undefined on my app, only on release + after the first app launch; the first launch is fine. subsequent launches will trigger this error and result in a white screen. error code is

TypeError: Cannot read property 'ScaleAspectFill' of undefined

This error is located at:
    in p
    in Unknown
    in RNCSafeAreaProvider
    in Unknown
    in RNGestureHandlerRootView
    in Unknown
    in Unknown
    in RCTView
    in Unknown
    in RCTView
    in Unknown
    in v, js engine: hermes, stack:
value@3444:6744
Ul@297:58354
Ll@297:58148
Ta@297:96569
yi@297:86585
vi@297:86487
mi@297:86252
ci@297:83185
pt@297:27170
ri@297:79805
sl@297:49408
tryCallOne@53:15
anonymous@139:26
anonymous@115:1470
T@115:418
p@115:691
callReactNativeMicrotasks@115:2861
value@54:2896
anonymous@54:983
value@54:2528
value@54:941
value@54:876

tbf it's codepush shenanigans I don't quite understand.

rnv 5.2.1 works fine.

Reproduction

Step to reproduce this bug are: i'll try to set up a codepush example app; but for now my app: https://github.com/lovegaoshi/azusa-player-mobile/tree/096e9f530d02878b2f43039ba3446450b6cc37b5 works and https://github.com/lovegaoshi/azusa-player-mobile/tree/a0bb33e8d0b530054956a3538748da59ec56ba09 doesnt work.

KrzysztofMoch commented 8 months ago

Huh... what beta version are you using? If I search project for "ScaleAspectFill" it's showing only in windows native code... (on master branch, but I think in beta.5 it same)

lovegaoshi commented 8 months ago

beta5 and alpha11 both

On Fri, Mar 1, 2024, 5:51 AM Krzysztof Moch @.***> wrote:

Huh... what beta version are you using? If I search project for "ScaleAspectFill" it's showing only in windows native code... (on master branch, but I think in beta.5 it same)

— Reply to this email directly, view it on GitHub https://github.com/react-native-video/react-native-video/issues/3553#issuecomment-1973242491, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZMOVVXMM3P7Y64APR2LO5TYWCBVVAVCNFSM6AAAAABEARSSRCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZTGI2DENBZGE . You are receiving this because you authored the thread.Message ID: @.***>

freeboub commented 8 months ago

I agree @KrzysztofMoch This is looking very strange... @lovegaoshi as you don't use windows, can you just try to remove function:

winrt::Microsoft::ReactNative::ConstantProviderDelegate ReactVideoViewManager::ExportedViewConstants() noexcept {

I expect it will fix your issue, but I don't really understand why you have it ...

genesy commented 4 months ago

This is also happening for me when upgrading to 6.3.0 with production build. Code only belongs on windows but affects android build somehow.

gmantuanrosa commented 3 months ago

Why was this closed @lovegaoshi ?

I just tested from the latest 6.4.3 version, when debugging the app, the video plays fine but after bundling an Android version the app has an error screen TypeError: Cannot read property 'ScaleAspectFill' of undefined.

It doesn't seem to have been resolved after checking other issues

lovegaoshi commented 3 months ago

bc sadly codepush is being deprecated by msft

On Tue, Jul 30, 2024, 2:21 PM Gian Carlo Mantuan @.***> wrote:

Why was this closed @lovegaoshi https://github.com/lovegaoshi ?

I just tested from the latest 6.4.3 version, when debugging the app, the video plays fine but after bundling an Android version the app has an error screen TypeError: Cannot read property 'ScaleAspectFill' of undefined.

It doesn't seem to have been resolved after checking other issues

— Reply to this email directly, view it on GitHub https://github.com/TheWidlarzGroup/react-native-video/issues/3553#issuecomment-2259233179, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZMOVVQLOTXZB5SEDF4G4DLZO77VVAVCNFSM6AAAAABEARSSRCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJZGIZTGMJXHE . You are receiving this because you were mentioned.Message ID: @.***>

gmantuanrosa commented 3 months ago

bc sadly codepush is being deprecated by msft

I don't know how but I am getting impacted on Android production build by this very same issue 😞