appium / appium-windows-driver

Appium's interface to WindowsAppDriver provided by Microsoft
Apache License 2.0
123 stars 35 forks source link

Error Loading with Node.js v20.12.1 #255

Open MrGultekin opened 5 months ago

MrGultekin commented 5 months ago

Having Node.js v20.12.1

C:\Users\cax>appium [Appium] Welcome to Appium v2.5.1 [Appium] The autodetected Appium home path: C:\Users\cax.appium [Appium] Attempting to load driver windows... [Appium] Requiring driver at C:\Users\cax.appium\node_modules\appium-windows-driver\build\index.js [Appium] Could not load driver 'windows', so it will not be available. Error in loading the driver was: Unexpected External value as type specifier, expected string or type [Appium] TypeError: Unexpected External value as type specifier, expected string or type [Appium] at Object. (C:\Users\cax.appium\node_modules\appium-windows-driver\lib\commands\winapi\user32.js:102:49) [Appium] at Module._compile (node:internal/modules/cjs/loader:1369:14) [Appium] at Object.Module._extensions..js (node:internal/modules/cjs/loader:1427:10) [Appium] at Module.load (node:internal/modules/cjs/loader:1206:32) [Appium] at Function.Module._load (node:internal/modules/cjs/loader:1022:12) [Appium] at Module.require (node:internal/modules/cjs/loader:1231:19) [Appium] at require (node:internal/modules/helpers:179:18) [Appium] at Object. (C:\Users\cax.appium\node_modules\appium-windows-driver\lib\commands\gestures.js:2:1) [Appium] at Module._compile (node:internal/modules/cjs/loader:1369:14) [Appium] at Object.Module._extensions..js (node:internal/modules/cjs/loader:1427:10) [Appium] at Module.load (node:internal/modules/cjs/loader:1206:32) [Appium] at Function.Module._load (node:internal/modules/cjs/loader:1022:12) [Appium] at Module.require (node:internal/modules/cjs/loader:1231:19) [Appium] at require (node:internal/modules/helpers:179:18) [Appium] at Object. (C:\Users\cax.appium\node_modules\appium-windows-driver\lib\commands\index.js:9:1) [Appium] at Module._compile (node:internal/modules/cjs/loader:1369:14) [Appium] at Object.Module._extensions..js (node:internal/modules/cjs/loader:1427:10) [Appium] at Module.load (node:internal/modules/cjs/loader:1206:32) [Appium] at Function.Module._load (node:internal/modules/cjs/loader:1022:12) [Appium] at Module.require (node:internal/modules/cjs/loader:1231:19) [Appium] at require (node:internal/modules/helpers:179:18) [Appium] at Object. (C:\Users\cax.appium\node_modules\appium-windows-driver\lib\driver.js:6:1) [Appium] Appium REST http interface listener started on http://0.0.0.0:4723 [Appium] You can provide the following URLs in your client code to connect to this server: [Appium] http://172.25.10.65:4723/ [Appium] http://127.0.0.1:4723/ (only accessible from the same host) [Appium] Available drivers: [Appium] - windows@2.12.17 (automationName 'Windows') [Appium] No plugins have been installed. Use the "appium plugin" command to install the one(s) you want to use. [Appium] Received SIGINT - shutting down [AppiumDriver@9b25] There are no active sessions for cleanup [HTTP] Waiting until the server is closed [HTTP] Received server close event

Workaround: Downgraded to Node.js v20.11.1. then it has worked.

mykola-mokhnach commented 5 months ago

Please upgrade the driver to version 2.12.19+