TheWidlarzGroup / react-native-video

A <Video /> component for react-native
https://docs.thewidlarzgroup.com/react-native-video/
MIT License
7.23k stars 2.9k forks source link

[BUG]: View config not found for component RCTVideo #4248

Closed rastepanenko closed 17 hours ago

rastepanenko commented 1 month ago

Version

6.7.0

What platforms are you having the problem on?

Android

System Version

Android 14

On what device are you experiencing the issue?

Simulator

Architecture

Old architecture

What happened?

The bug occurs when rendering the component with Video and only on Android. It works perfectly on iOS! I'm on RN 0.75.3, JS.

My Package.json file

{
  "name": "awesomeProject",
  "version": "1.0.0,
  "dependencies": {
    "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
    "@babel/plugin-transform-class-properties": "^7.25.4",
    "@georstat/react-native-image-cache": "^3.1.0",
    "@gorhom/bottom-sheet": "^4.6.4",
    "@native-html/iframe-plugin": "^2.6.1",
    "@native-html/table-plugin": "^5.3.1",
    "@notifee/react-native": "^9.0.2",
    "@react-native-async-storage/async-storage": "^2.0.0",
    "@react-native-camera-roll/camera-roll": "^7.8.3",
    "@react-native-community/checkbox": "^0.5.17",
    "@react-native-community/netinfo": "^11.4.1",
    "@react-native-community/push-notification-ios": "^1.11.0",
    "@react-native-community/viewpager": "^5.0.11",
    "@react-native-firebase/analytics": "^21.0.0",
    "@react-native-firebase/app": "^21.0.0",
    "@react-native-firebase/dynamic-links": "^21.0.0",
    "@react-native-firebase/messaging": "^21.0.0",
    "@react-native-picker/picker": "^2.8.1",
    "@react-native/assets-registry": "^0.75.3",
    "@realm/react": "^0.11.0",
    "axios": "^1.7.7",
    "buffer": "^6.0.3",
    "events": "^3.3.0",
    "fbjs": "^3.0.5",
    "formik": "^2.4.6",
    "libphonenumber-js": "^1.11.9",
    "mobx": "^6.13.3",
    "mobx-react": "^9.1.1",
    "moment": "^2.30.1",
    "react": "18.3.1",
    "react-native": "0.75.3",
    "react-native-android-badge": "^0.5.0",
    "react-native-autoheight-webview": "^1.6.5",
    "react-native-base64": "^0.2.1",
    "react-native-blob-util": "^0.19.11",
    "react-native-circular-progress": "^1.4.0",
    "react-native-code-push": "^9.0.0",
    "react-native-contacts": "^8.0.2",
    "react-native-date-picker": "^5.0.7",
    "react-native-device-info": "^13.0.0",
    "react-native-document-picker": "^9.3.1",
    "react-native-email-link": "^1.16.1",
    "react-native-fast-image": "^8.6.3",
    "react-native-file-access": "^3.1.1",
    "react-native-file-viewer": "^2.1.5",
    "react-native-fs": "^2.20.0",
    "react-native-gesture-handler": "^2.20.0",
    "react-native-google-api-availability-bridge": "^1.3.0",
    "react-native-image-picker": "^7.1.2",
    "react-native-inappbrowser-reborn": "^3.7.0",
    "react-native-intersection-observer": "^0.2.0",
    "react-native-keyboard-aware-scroll-view": "^0.9.5",
    "react-native-masked-text": "^1.12.5",
    "react-native-mime-types": "^2.5.0",
    "react-native-modal": "^13.0.1",
    "react-native-month-picker": "^1.0.1",
    "react-native-navigation": "^7.40.1",
    "react-native-navigation-hooks": "^6.3.0",
    "react-native-network-logger": "^1.17.0",
    "react-native-paper": "^5.12.5",
    "react-native-permissions": "^4.1.5",
    "react-native-picker-select": "^9.3.1",
    "react-native-public-ip": "^1.0.2",
    "react-native-push-notification": "^8.1.1",
    "react-native-qrcode-svg": "^6.3.2",
    "react-native-reanimated": "3.15.3",
    "react-native-render-html": "^6.3.4",
    "react-native-safe-area-context": "^4.11.0",
    "react-native-scalable-image": "^1.1.0",
    "react-native-screens": "^3.34.0",
    "react-native-send-intent": "^1.3.0",
    "react-native-share": "^11.0.3",
    "react-native-sms": "^1.11.0",
    "react-native-svg": "^15.7.1",
    "react-native-swipe-list-view": "^3.2.9",
    "react-native-swiper-flatlist": "^3.2.5",
    "react-native-url-polyfill": "^2.0.0",
    "react-native-vector-icons": "^10.2.0",
    "react-native-video": "^6.7.0",
    "react-native-webview": "^13.12.2",
    "react-native-webview-ios-cache-clear": "^1.0.0",
    "realm": "^12.13.1",
    "sp-react-native-in-app-updates": "^1.4.0",
    "truncate-html": "^1.1.2",
    "yup": "^1.4.0"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@babel/plugin-proposal-decorators": "^7.25.7",
    "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
    "@babel/plugin-transform-class-properties": "^7.25.4",
    "@babel/preset-env": "^7.20.0",
    "@babel/runtime": "^7.20.0",
    "@react-native/babel-preset": "0.75.3",
    "@react-native/eslint-config": "0.75.3",
    "@react-native/metro-config": "0.75.3",
    "@types/react": "^18.2.6",
    "@types/react-test-renderer": "^18.0.0",
    "babel-jest": "^29.6.3",
    "babel-plugin-module-resolver": "^5.0.2",
    "eslint": "^8.19.0",
    "jest": "^29.6.3",
    "patch-package": "^7.0.0",
    "prettier": "2.8.8",
    "react-native-push-notification": "^8.1.1",
    "react-native-svg-transformer": "^1.5.0",
    "react-test-renderer": "18.3.1"
  },
  "jest": {
    "preset": "react-native"
  },
  "engines": {
    "node": ">=18"
  },
  "packageManager": "yarn@3.6.4"
}

Reproduction Link

No response

Reproduction

Step to reproduce this bug are:

github-actions[bot] commented 1 month ago
Previous bot comment (click to expand)
Previous bot comment (click to expand)
Previous bot comment (click to expand) Thank you for your issue report. Please note that the following information is missing or incomplete: - reproduction Please update your issue with this information to help us address it more effectively. > Note: issues without complete information have a lower priority
github-actions[bot] commented 1 month ago
Previous bot comment (click to expand)
Previous bot comment (click to expand) Thank you for your issue report. Please note that the following information is missing or incomplete: - reproduction Please update your issue with this information to help us address it more effectively. > Note: issues without complete information have a lower priority
github-actions[bot] commented 1 month ago
Previous bot comment (click to expand) Thank you for your issue report. Please note that the following information is missing or incomplete: - reproduction Please update your issue with this information to help us address it more effectively. > Note: issues without complete information have a lower priority
github-actions[bot] commented 1 month ago

Thank you for your issue report. Please note that the following information is missing or incomplete:

Please update your issue with this information to help us address it more effectively.

Note: issues without complete information have a lower priority

paulrinaldi commented 1 month ago

Getting same in running yarn run android in the expo example. Using jdk 17.0.12.

freeboub commented 1 month ago

I confirm this issue @paulrinaldi @KrzysztofMoch I think this should be solved by using following doc: https://docs.expo.dev/modules/autolinking/ But monorepo should be better to apply it :/ let me know your expectations

freeboub commented 1 month ago

@rastepanenko I don't think you have the same issue than the one reported by paul. Do you have the expo go issue ? please check other closed tickets which deals with the same issue

rastepanenko commented 1 month ago

@freeboub I'm not using expo in this project. This is pure RN

rastepanenko commented 1 month ago

@paulrinaldi Were you able to solve this problem?

freeboub commented 1 month ago

@rastepanenko The issue with the sample are different as the RNV code is directly linked without autolink. Can you recreate your issue in a very basic sample you can share ?

paulrinaldi commented 3 weeks ago

I confirm this issue @paulrinaldi @KrzysztofMoch I think this should be solved by using following doc: https://docs.expo.dev/modules/autolinking/ But monorepo should be better to apply it :/ let me know your expectations

Thank you, I followed the steps linked there plus my intuition and was not able to fix this problem. My expectations are that one can run yarn run install && yarn run android in the examples/expo directory without needing to run anything else. I am suspicious are that there is no declaration of react-native-video (even linking to like ../../src or whatever was there before) in the expo example.

Steps: I ran the command: npx expo-modules-autolinking search

In the ouput, I see there are 6 packages that are not in the package.json but are declared in the Podfile.lock and do exist in the node_modules folder. In the ouput, I also see two packages, "expo" and "expo-splash-screen", which are in the package.json but of different versions in the output than in the package.json). I haven't come across this before linking.

Running npx expo-doctor in this expo directory yields the following failure:

Screenshot 2024-10-28 at 9 49 43 AM
...
✖ Check for app config fields that may not be synced in a non-CNG project
✔ Check Expo config (app.json/ app.config.js) schema
✖ Check that packages match versions required by installed Expo SDK
...

Detailed check results:

This project contains native project folders but also has native configuration properties in app.json, indicating it is configured to use Prebuild. When the android/ios folders are present, if you don't run prebuild in your build pipeline, the following properties will not be synced: plugins, android, ios. 

Advice: Add '/android' and '/ios' to your .gitignore file if you intend to use CNG / Prebuild. Learn more: https://docs.expo.dev/workflow/prebuild/#usage-with-eas-build

(node:5782) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
The following packages should be updated for best compatibility with the installed expo version:
  @react-native-picker/picker@2.8.1 - expected version: 2.7.5
Your project may not work correctly until you install the expected versions of the packages.
Found outdated dependencies
Advice: Use 'npx expo install --check' to review and upgrade your dependencies.

One or more checks failed, indicating possible issues with the project.

Running 'npx expo install --check' changed the package.json's version of react native picker but after this, running yarn run android, still yields the error in this issue.

I ran npx expo-modules-autolinking resolve --platform apple and npx expo-modules-autolinking resolve --platform android and after each I ran npx expo-modules-autolinking verify which outputted "Everything is fine!"

Using yarn run start + a yields same issue as well.

paul-rinaldi commented 3 weeks ago

Also is the example/expo project for testing tvOS or android phone/tablet? I see, "react-native": "npm:react-native-tvos@~0.74.5-0" which confuses me.

KrzysztofMoch commented 3 weeks ago

Also is the example/expo project for testing tvOS or android phone/tablet? I see, "react-native": "npm:react-native-tvos@~0.74.5-0" which confuses me.

this is for tvOS support... tvOS is not separated package as visionsOS so this is only way to do it (I have do it as expo docs says to do it)

I am little busy right now, but I will try to debug it on my side and get back to you - Also thanks for sharing you research

paulrinaldi commented 3 weeks ago

Oh ok, understood @KrzysztofMoch this is not high priority for me. However, it was not obvious to me that this was for TV support until now.

freeboub commented 17 hours ago

@paul-rinaldi I fixed it in the expo sample ! As we don't have any news from @rastepanenko let's close this issue