-
-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to start an Appium session, err was: Error: 'java -version' failed. Error: spawn ENOENT [on hold] #4229
Comments
I think the error is pretty obvious. Either you don't have Java installed or it is not in the path. You can check that by running |
Hi, I have latest version java 8 update 25 in my PC. Still im getting the error on appium. In appium older version it working fine. Please check with this issue |
Im having the following setup things, Java 8 update 25 All the Path are setup perfectly.But Im getting java-version error :( |
Did you try running |
@sebv: any idea? (looks like spawn cannot find the Java binary) |
Just check PATH and JAVA_HOME at the time when appium is running. |
Now I changed the Java version to 1.7. But I still gtting same issue Microsoft Windows [Version 6.1.7601] C:\Users\elcot>java -version C:\Users\elcot> JAVA_HOME = C:\Program Files\Java\jdk1.7.0_71 PATH = C:\Program Files\Java\jdk1.7.0_71\bin;%ANDROID_HOME%/tools;%ANDROID_HOME%/platform-tools;C:\Program Files\nodejs\ |
Check the variables |
You mean this |
In error log it showing Java 1.5 info: Client User-Agent string: Apache-HttpClient/4.3.4 (java 1.5)
Shall I try with java 1.5 update? |
Nope nothing to do with Java version it's the way Java is installed. Did you restart your terminal? |
yeap now only i restarted my pc |
If you cannot figure out, just edit C:\Users\elcot\Downloads\Vijay_Important\Appium\node_modules\appium\lib\devices\android\android-common.js and add some debug line 1033:
|
Hey guys, I started having this issue after updating Appium to 1.3.4. I am using Ubuntu 14.10. I ran:
I also thought my Java had something wrong (spent sometime with the JAVA_HOME and update-alternatives) but it only got fixed after changing Appium version. FYI:
Using your tip @sebv I got this from appium 1.3.4:
I also checked on android-common.js in 1.2.4 and I see that this functionality that looks for Java is not there, so I did not add any debug information to it. It seems I'm always falling in the if in line 1040, even though JAVA_HOME is set correctly from what I see. Thanks! |
And the %PATH% is correct? |
yeah as I mentioned early it was correct only |
info: [debug] Getting Java version
|
appium also detected the path of java sdk |
Try this, need to understand why this would not work.
|
where at 1033 line of android common.js file? |
no just from command line. |
Hi @sebv, Just ran your command but I was also debugging on my side here. My issue is that I have a _JAVA_OPTIONS set on my /etc/environment. When running that command on cli I got this:
My problem is that on Line 1035 it gets the index from the split (the _JAVA_OPTIONS) and thats why it's not working for me. Thanks! |
I got this for ur command @sebv C:>node -e "require('child_process').exec('java -version', function (err, stdou C:> |
Try to change the |
Okay no problem I will try with older version of appium. Thanks for all to replying my issues and for helpful suggestion. |
@brenol can u please help me to run appium in 1.2.4 version please.... |
@vijay0850 did you install appium using npm? I don't have a Windows environment here set up so I can't really help. If you installed Appium using npm, then you can run this:
I'm not sure if it'll be added to your path directly but it might. |
okay i will try this thanks |
Thought of one thing, maybe it's a permission issue. |
I already tried with disabling firewall also..... :( On Wed, Dec 10, 2014 at 3:58 AM, seb vincent notifications@github.com
Regards, |
Not the firewall, the actual files permissions, or the permissions of one of the parent dirs. |
I gave all user permission still im getting java version failed |
I need solution for these issues......... |
need to raise new ticket again? |
I had the same issue i.e.
The problem was the %PATH% variable, in addition to the JAVA_HOME it must also contain the windows system directories (i.e. |
Hi Vijay, |
I can confirm that adding |
By adding [%SystemRoot%\system32;%SystemRoot%] to the System PATH,issue Fixed |
Looks like that error has nothing to do with your |
man you're great, that was the problem. My old ansicon installation was in registry and that was the root cause. |
Hi @sebv, I'm having the same issue and at a total loss. I am on Windows 10, have both %SystemRoot%\system32 and %SystemRoot% on my PATH variable, my java location on my path variable, and JAVA_HOME defined. Yet when I try to start appium in the GUI with "Pre-Launch" application, I get error: Could not pre-launch appium: Error: 'java -version' failed. Error: Command failed:
which makes no sense to me since java -version works fine in cmd.exe: $ java -version So I ran the command you mentioned: $ node -e "require('child_process').exec('java -version', function (err, stdout, stderr) { console.log(arguments); });" Which gives:
I just restarted my computer but still the same error. I am truly at a loss, would appreciate any help. Is it even important to run with the "Pre-Launch" application? |
Noticing this issue was closed I just created a new one - #6542. Would appreciate any help! |
Hi One & all, |
Did you update to the latest java jdk and jre and add both to your user path? How are you starting Appium? Also check your node version, java version, Appium version. I assume you're using Windows? |
Also confer issue #6542. |
Dear Support Team,
Good Day...
1..my java version is : [image: Inline image 1]
2.Did you update to the latest java jdk and add both to your user path?
Below given one is path under system variable
Answer : C:\Program Files\Java\jdk1.8.0_60\bin;F:\APPIUM Support install
softwares\SDK\tools;F:\APPIUM Support install
softwares\SDK\platform-tools;%SystemRoot%\system32;%SystemRoot%
3.How are you starting Appium?
Ans: After Connect the device with my windows system,Make sure USB
debugging ,then Start the APPIUM >after wards run the Script.
4. Node version: V8.9.1
5. Appium Version*:1.4.13.1*
*6. I assume you're using Windows? : yes windows*
*These are the Details,Kindly Guide Me to solve this issues ,As well kindly
Provide Know issues & solutions from your end.Based on that i can Proceed
further .*
…On Wed, Feb 7, 2018 at 10:17 PM, mmcintyre123 ***@***.***> wrote:
Did you update to the latest java jdk and add both to your user path? How
are you starting Appium? Also check your node version, java version, Appium
version. I assume you're using Windows?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4229 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AiHA2Oqo_kvV9uypxBuStPl27adfJTQjks5tSdO0gaJpZM4DFFyp>
.
--
*Best Regards,*
*ShowriReddy.V*
*General Manager*
*www.Vedaslabs.com <http://www.vedaslabs.com/>*
|
I'm not Appium support - just a user offering tips. But happy to help if I can. I assume the 1.4.13.1 is the version of Appium Server your desktop client is running - is that the latest client version? The latest desktop client is 1.3.2: https://github.com/appium/appium-desktop/releases/tag/v1.3.2. Have you tried running your tests without the GUI, i.e. from the command line with a later version of Appium Server? The java version actually didn't show up above, can you post it in text format? Lastly, can you post your whole (or at least more) log output like the first post above which includes the desired capabilities you are passing in? Best, |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hi Im getting these error message on Appium server please help me to resolve it.
Checking if an update is available
The text was updated successfully, but these errors were encountered: