appium / appium-doctor

[Deprecated] Please use https://github.com/appium/appium/tree/master/packages/doctor
Apache License 2.0
128 stars 34 forks source link

opencv4nodejs not exist while appium-doctor passes #104

Closed NirBY closed 1 year ago

NirBY commented 4 years ago

From Appium Log: 2020-07-12 08:58:13:274 [Support] Initializing opencv 2020-07-12 08:58:13:274 [Support] Loading local package 'opencv4nodejs' 2020-07-12 08:58:15:138 [Support] Failed to load local package 'opencv4nodejs': The module '/usr/local/lib/node_modules/opencv4nodejs/build/Release/opencv4nodejs.node' 2020-07-12 08:58:15:138 [Support] was compiled against a different Node.js version using 2020-07-12 08:58:15:138 [Support] NODE_MODULE_VERSION 64. This version of Node.js requires 2020-07-12 08:58:15:139 [Support] NODE_MODULE_VERSION 72. Please try re-compiling or re-installing 2020-07-12 08:58:15:139 [Support] the module (for instance, using npm rebuild or npm install). 2020-07-12 08:58:15:173 [Support] Failed to load global package 'opencv4nodejs': The "path" argument must be of type string. Received undefined 2020-07-12 08:58:15:173 [Support] Linking package 'opencv4nodejs' 2020-07-12 08:58:15:680 [Support] Retrying load of linked package 'opencv4nodejs' 2020-07-12 08:58:15:683 [Support] Unable to load package 'opencv4nodejs': Module did not self-register: '/usr/local/lib/node_modules/opencv4nodejs/build/Release/opencv4nodejs.node'. 2020-07-12 08:58:15:683 [Support] Unable to load 'opencv4nodejs': Unable to load package 'opencv4nodejs': Module did not self-register: '/usr/local/lib/node_modules/opencv4nodejs/build/Release/opencv4nodejs.node'. 2020-07-12 08:58:15:684 [W3C (3d97b46b)] Encountered internal error running command: Error: 'opencv4nodejs' module is required to use OpenCV features. Please install it first ('npm i -g opencv4nodejs') and restart Appium. Read https://github.com/justadudewhohacks/opencv4nodejs#how-to-install for more details on this topic. 2020-07-12 08:58:15:684 [W3C (3d97b46b)] at initOpenCV (/usr/local/lib/node_modules/appium/node_modules/appium-support/lib/image-util.js:109:11)

From appium-doctor log: info AppiumDoctor Appium Doctor v.1.15.3 info AppiumDoctor ### Diagnostic for necessary dependencies starting ### info AppiumDoctor ✔ The Node.js binary was found at: /usr/local/bin/node info AppiumDoctor ✔ Node version is 12.18.2 info AppiumDoctor ✔ Xcode is installed at: /Applications/Xcode.app/Contents/Developer info AppiumDoctor ✔ Xcode Command Line Tools are installed in: /Applications/Xcode.app/Contents/Developer info AppiumDoctor ✔ DevToolsSecurity is enabled. info AppiumDoctor ✔ The Authorization DB is set up properly. info AppiumDoctor ✔ Carthage was found at: /usr/local/bin/carthage. Installed version is: 0.33.0 info AppiumDoctor ✔ HOME is set to: /Users/cellactqa info AppiumDoctor ✔ ANDROID_HOME is set to: /Users/cellactqa/Library/Android/sdk info AppiumDoctor ✔ JAVA_HOME is set to: /Library/Java/JavaVirtualMachines/jdk1.8.0_141.jdk/Contents/Home info AppiumDoctor Checking adb, android, emulator info AppiumDoctor 'adb' is in /Users/cellactqa/Library/Android/sdk/platform-tools/adb info AppiumDoctor 'android' is in /Users/cellactqa/Library/Android/sdk/tools/android info AppiumDoctor 'emulator' is in /Users/cellactqa/Library/Android/sdk/emulator/emulator info AppiumDoctor ✔ adb, android, emulator exist: /Users/cellactqa/Library/Android/sdk info AppiumDoctor ✔ Bin directory of $JAVA_HOME is set info AppiumDoctor ### Diagnostic for necessary dependencies completed, no fix needed. ### info AppiumDoctor info AppiumDoctor ### Diagnostic for optional dependencies starting ### info AppiumDoctor ✔ opencv4nodejs is installed at: /usr/local/lib. Installed version is: 5.6.0 info AppiumDoctor ✔ ffmpeg is installed at: /usr/local/bin/ffmpeg. ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers info AppiumDoctor ✔ mjpeg-consumer is installed at: /usr/local/lib. Installed version is: 2.0.0 info AppiumDoctor ✔ set-simulator-location is installed info AppiumDoctor ✔ idb and idb_companion are installed info AppiumDoctor ✔ applesimutils is installed at: /usr/local/bin/applesimutils. Installed versions are: applesimutils 0.7.2 info AppiumDoctor ✔ ios-deploy is installed at: /usr/local/bin/ios-deploy. Installed version is: 1.9.4 info AppiumDoctor ✔ bundletool.jar is installed at: /Users/cellactqa/Library/Android/sdk/platform-tools/bundletool.jar info AppiumDoctor ✔ gst-launch-1.0 and gst-inspect-1.0 are installed at: /usr/local/bin/gst-launch-1.0 and /usr/local/bin/gst-inspect-1.0 info AppiumDoctor ### Diagnostic for optional dependencies completed, no fix possible. ### info AppiumDoctor info AppiumDoctor Everything looks good, bye! info AppiumDoctor

KazuCocoa commented 3 years ago

2020-07-12 08:58:15:138 [Support] Failed to load local package 'opencv4nodejs': The module '/usr/local/lib/node_modules/opencv4nodejs/build/Release/opencv4nodejs.node' 2020-07-12 08:58:15:138 [Support] was compiled against a different Node.js version using 2020-07-12 08:58:15:138 [Support] NODE_MODULE_VERSION 64. This version of Node.js requires 2020-07-12 08:58:15:139 [Support] NODE_MODULE_VERSION 72. Please try re-compiling or re-installing

You installed the opencv4nodejs with _NODE_MODULEVERSION 64, but ran Appium with _NODE_MODULEVERSION 72?

Appium doctor only checks if the module has been installed. Probably it can add require the module to check if opencv4nodejs can load, but the logic also results ok when you run the doctor command with different node version Appium runs with.

KazuCocoa commented 1 year ago

opencv4nodejs is no longer needed