error: Failed to start an Appium session, err was: Error: ‘java -version’ failed. Error: spawn ENOENT
info: Client User-Agent string: Apache-HttpClient/4.3.6 (java 1.5)
info: [debug] No appActivity desired capability or server param. Parsing from apk.
info: [debug] No appPackage desired capability or server param. Parsing from apk.
info: [debug] Using local app from desired caps: D:\Workspace\AppiumFirst\src\BookMyShow.apk
info: [debug] Creating new appium session 68eff98a-32e4-4486-8c35-0b7e5771e7a0
info: Starting android appium
info: [debug] Getting Java version
info: [debug] Cleaning up android objects
info: [debug] Cleaning up appium session
info: [debug] Error: ‘java -version’ failed. Error: spawn ENOENT
at [object Object]. (C:\Program Files (x86)\Appium\node_modules\appium\lib\devices\android\android-common.js:1057:17)
at exithandler (child_process.js:633:7)
at ChildProcess.errorhandler (child_process.js:649:5)
at ChildProcess.EventEmitter.emit (events.js:95:17)
at Process.ChildProcess._handle.onexit (child_process.js:795:12)
info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: ‘java -version’ failed. Error: spawn ENOENT)”,“origValue”:“‘java -version’ failed. Error: spawn ENOENT”},“sessionId”:null}
info: ← POST /wd/hub/session 500 34.764 ms - 208
Hi,
Adding system32 location “%SystemRoot%\system32” as PATH variable under System variables will resolve the issue because basically appium might need something from system32 directory to interact with adb command during run time.
Hope this resolves the issue.
Regards
@Abdul_Sathar_Beigh