GithubHelp home page GithubHelp logo

🐛 system/camera-module-not-found: Failed to initialize VisionCamera: The native Camera Module (`NativeModules.CameraView`) could not be found about react-native-vision-camera HOT 11 CLOSED

ginxx009 avatar ginxx009 commented on June 4, 2024
🐛 system/camera-module-not-found: Failed to initialize VisionCamera: The native Camera Module (`NativeModules.CameraView`) could not be found

from react-native-vision-camera.

Comments (11)

k-saparia avatar k-saparia commented on June 4, 2024 4

Same issue on my side while running yarn test

from react-native-vision-camera.

mrousavy avatar mrousavy commented on June 4, 2024

What's the output of npx react-native config?

from react-native-vision-camera.

ginxx009 avatar ginxx009 commented on June 4, 2024

here's the npx react-native config

npx react-native config
warn Multiple Podfiles were found: ios/Podfile,vendor/bundle/ruby/2.7.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/Podfile. Choosing ios/Podfile automatically. If you would like to select a different one, you can configure it via "project.ios.sourceDir". You can learn more about it here: https://github.com/react-native-community/cli/blob/master/docs/configuration.md
{
  "root": "/Users/ginxx009/Documents/VisionCameraProject/VisionCameraProject",
  "reactNativePath": "/Users/ginxx009/Documents/VisionCameraProject/VisionCameraProject/node_modules/react-native",
  "dependencies": {
    "react-native-vision-camera": {
      "root": "/Users/ginxx009/Documents/VisionCameraProject/VisionCameraProject/node_modules/react-native-vision-camera",
      "name": "react-native-vision-camera",
      "platforms": {
        "ios": {
          "podspecPath": "/Users/ginxx009/Documents/VisionCameraProject/VisionCameraProject/node_modules/react-native-vision-camera/VisionCamera.podspec",
          "configurations": [],
          "scriptPhases": []
        },
        "android": {
          "sourceDir": "/Users/ginxx009/Documents/VisionCameraProject/VisionCameraProject/node_modules/react-native-vision-camera/android",
          "packageImportPath": "import com.mrousavy.camera.CameraPackage;",
          "packageInstance": "new CameraPackage()",
          "buildTypes": [],
          "componentDescriptors": [],
          "androidMkPath": "/Users/ginxx009/Documents/VisionCameraProject/VisionCameraProject/node_modules/react-native-vision-camera/android/build/generated/source/codegen/jni/Android.mk",
          "cmakeListsPath": "/Users/ginxx009/Documents/VisionCameraProject/VisionCameraProject/node_modules/react-native-vision-camera/android/build/generated/source/codegen/jni/CMakeLists.txt"
        }
      }
    }
  },
  "commands": [
    {
      "name": "log-ios",
      "description": "starts iOS device syslog tail"
    },
    {
      "name": "run-ios",
      "description": "builds your app and starts it on iOS simulator",
      "examples": [
        {
          "desc": "Run on a different simulator, e.g. iPhone SE (2nd generation)",
          "cmd": "react-native run-ios --simulator \"iPhone SE (2nd generation)\""
        },
        {
          "desc": "Run on a connected device, e.g. Max's iPhone",
          "cmd": "react-native run-ios --device \"Max's iPhone\""
        },
        {
          "desc": "Run on the AppleTV simulator",
          "cmd": "react-native run-ios --simulator \"Apple TV\"  --scheme \"helloworld-tvOS\""
        }
      ],
      "options": [
        {
          "name": "--simulator <string>",
          "description": "Explicitly set simulator to use. Optionally include iOS version between parenthesis at the end to match an exact version: \"iPhone 6 (10.0)\""
        },
        {
          "name": "--mode <string>",
          "description": "Explicitly set the scheme configuration to use"
        },
        {
          "name": "--configuration <string>",
          "description": "[Deprecated] Explicitly set the scheme configuration to use"
        },
        {
          "name": "--scheme <string>",
          "description": "Explicitly set Xcode scheme to use"
        },
        {
          "name": "--device [string]",
          "description": "Explicitly set device to use by name.  The value is not required if you have a single device connected."
        },
        {
          "name": "--udid <string>",
          "description": "Explicitly set device to use by udid"
        },
        {
          "name": "--verbose",
          "description": "Do not use xcbeautify or xcpretty even if installed"
        },
        {
          "name": "--port <number>",
          "default": 8081
        },
        {
          "name": "--terminal <string>",
          "description": "Launches the Metro Bundler in a new window using the specified terminal path.",
          "default": "Apple_Terminal"
        },
        {
          "name": "--xcconfig [string]",
          "description": "Explicitly set xcconfig to use"
        },
        {
          "name": "--buildFolder <string>",
          "description": "Location for iOS build artifacts. Corresponds to Xcode's \"-derivedDataPath\"."
        },
        {
          "name": "--no-packager",
          "description": "Do not launch packager while building"
        },
        {
          "name": "--binary-path <string>",
          "description": "Path relative to project root where pre-built .app binary lives."
        },
        {
          "name": "--list-devices",
          "description": "List all available iOS devices and simulators and let you choose one to run the app. "
        }
      ]
    },
    {
      "name": "build-ios",
      "description": "builds your app on iOS simulator",
      "examples": [
        {
          "desc": "Build the app for the IOS simulator",
          "cmd": "react-native build-ios"
        },
        {
          "desc": "Build the app for all IOS devices",
          "cmd": "react-native build-ios --mode \"Release\""
        },
        {
          "desc": "Build the app for a specific IOS device",
          "cmd": "react-native build-ios --simulator \"IPhone 11\""
        }
      ],
      "options": [
        {
          "name": "--simulator <string>",
          "description": "Explicitly set simulator to use. Optionally include iOS version between parenthesis at the end to match an exact version: \"iPhone 6 (10.0)\""
        },
        {
          "name": "--mode <string>",
          "description": "Explicitly set the scheme configuration to use"
        },
        {
          "name": "--configuration <string>",
          "description": "[Deprecated] Explicitly set the scheme configuration to use"
        },
        {
          "name": "--scheme <string>",
          "description": "Explicitly set Xcode scheme to use"
        },
        {
          "name": "--device [string]",
          "description": "Explicitly set device to use by name.  The value is not required if you have a single device connected."
        },
        {
          "name": "--udid <string>",
          "description": "Explicitly set device to use by udid"
        },
        {
          "name": "--verbose",
          "description": "Do not use xcbeautify or xcpretty even if installed"
        },
        {
          "name": "--port <number>",
          "default": 8081
        },
        {
          "name": "--terminal <string>",
          "description": "Launches the Metro Bundler in a new window using the specified terminal path.",
          "default": "Apple_Terminal"
        },
        {
          "name": "--xcconfig [string]",
          "description": "Explicitly set xcconfig to use"
        },
        {
          "name": "--buildFolder <string>",
          "description": "Location for iOS build artifacts. Corresponds to Xcode's \"-derivedDataPath\"."
        }
      ]
    },
    {
      "name": "log-android",
      "description": "starts logkitty"
    },
    {
      "name": "run-android",
      "description": "builds your app and starts it on a connected Android emulator or device",
      "options": [
        {
          "name": "--mode <string>",
          "description": "Specify your app's build variant"
        },
        {
          "name": "--variant <string>",
          "description": "Specify your app's build variant. Deprecated! Use 'mode' instead"
        },
        {
          "name": "--no-packager",
          "description": "Do not launch packager while building"
        },
        {
          "name": "--port <number>",
          "default": 8081
        },
        {
          "name": "--terminal <string>",
          "description": "Launches the Metro Bundler in a new window using the specified terminal path.",
          "default": "Apple_Terminal"
        },
        {
          "name": "--tasks <list>",
          "description": "Run custom Gradle tasks. By default it's \"assembleDebug\". Will override passed mode and variant arguments."
        },
        {
          "name": "--active-arch-only",
          "description": "Build native libraries only for the current device architecture for debug builds.",
          "default": false
        },
        {
          "name": "--extra-params <string>",
          "description": "Custom properties passed to gradle build command"
        },
        {
          "name": "--appId <string>",
          "description": "Specify an applicationId to launch after build. If not specified, `package` from AndroidManifest.xml will be used.",
          "default": ""
        },
        {
          "name": "--appIdSuffix <string>",
          "description": "Specify an applicationIdSuffix to launch after build.",
          "default": ""
        },
        {
          "name": "--main-activity <string>",
          "description": "Name of the activity to start",
          "default": "MainActivity"
        },
        {
          "name": "--deviceId <string>",
          "description": "builds your app and starts it on a specific device/simulator with the given device id (listed by running \"adb devices\" on the command line)."
        },
        {
          "name": "--list-devices",
          "description": "Lists all available Android devices and simulators and let you choose one to run the app",
          "default": false
        },
        {
          "name": "--binary-path <string>",
          "description": "Path relative to project root where pre-built .apk binary lives."
        }
      ]
    },
    {
      "name": "build-android",
      "description": "builds your app",
      "options": [
        {
          "name": "--mode <string>",
          "description": "Specify your app's build variant"
        },
        {
          "name": "--variant <string>",
          "description": "Specify your app's build variant. Deprecated! Use 'mode' instead"
        },
        {
          "name": "--no-packager",
          "description": "Do not launch packager while building"
        },
        {
          "name": "--port <number>",
          "default": 8081
        },
        {
          "name": "--terminal <string>",
          "description": "Launches the Metro Bundler in a new window using the specified terminal path.",
          "default": "Apple_Terminal"
        },
        {
          "name": "--tasks <list>",
          "description": "Run custom Gradle tasks. By default it's \"assembleDebug\". Will override passed mode and variant arguments."
        },
        {
          "name": "--active-arch-only",
          "description": "Build native libraries only for the current device architecture for debug builds.",
          "default": false
        },
        {
          "name": "--extra-params <string>",
          "description": "Custom properties passed to gradle build command"
        }
      ]
    }
  ],
  "healthChecks": [],
  "platforms": {
    "ios": {},
    "android": {}
  },
  "project": {
    "ios": {
      "sourceDir": "/Users/ginxx009/Documents/VisionCameraProject/VisionCameraProject/ios",
      "xcodeProject": {
        "name": "VisionCameraProject.xcworkspace",
        "isWorkspace": true
      }
    },
    "android": {
      "sourceDir": "/Users/ginxx009/Documents/VisionCameraProject/VisionCameraProject/android",
      "appName": "app",
      "packageName": "com.visioncameraproject"
    }
  }
}

from react-native-vision-camera.

mrousavy avatar mrousavy commented on June 4, 2024

Hm it did resolve properly - can you try clearing everything/cache to see if that fixes it?

from react-native-vision-camera.

ginxx009 avatar ginxx009 commented on June 4, 2024

tried clearing it actually and it did not resolve anything . By the way on android it works but on iOS it does not .

from react-native-vision-camera.

juninhoall avatar juninhoall commented on June 4, 2024

same issue =[

from react-native-vision-camera.

ginxx009 avatar ginxx009 commented on June 4, 2024

What I am trying to do right now is upgrade the react native versions to see where it is compatible .

from react-native-vision-camera.

nthegedus avatar nthegedus commented on June 4, 2024

Hi everyone, I'm not facing the same @ginxx009 error, but there's something wrong here

I'm trying this:

const { hasPermission, requestPermission } = useCameraPermission()
console.log('hasPermission:', hasPermission)

const devices = useCameraDevices()
console.log('devices: ', JSON.stringify(devices))

const device = useCameraDevice('back')
console.log('device:', device)

I've requested permission, and it's ok, but devices are empty, and I cannot set current device

LOG  hasPermission: true
LOG  devices:  []
LOG  device: undefined

I've already tried on Simulator and physical device, and got the same problem.

My env:

"react-native": "0.73.4",
"react-native-vision-camera": "3.9.0",

And already "react-native-vision-camera": "3.8.2"

This problems occurs on iOS. On Android the camera appears normally, but cant take photo because got this error
capture/timed-out: (capture/timed-out The image capture was aborted because it timed out.

android

from react-native-vision-camera.

ginxx009 avatar ginxx009 commented on June 4, 2024

on 0.72 version of react native I have tried and on iOS and it works

from react-native-vision-camera.

amisrs avatar amisrs commented on June 4, 2024

I started encountering the same issue camera-module-not-found on Android, but it stopped happening once I manually uninstalled the app from the physical device and reinstalled

"react-native": "^0.73.4",
"react-native-vision-camera": "^3.9.0",

from react-native-vision-camera.

ginxx009 avatar ginxx009 commented on June 4, 2024

Hi everyone . If you are still encountering this problem . What I did was

Make sure that the swift version you are using on your xcode is 5.2 . Mine was default 5.0 so I change it on the build setting of the xcode then rebuild it . And it was working for both iOS and Android.

from react-native-vision-camera.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.