Error: Waited 20 secs for selendroid server and it never showed up

I’ve been having a problem that started in 1.2.0 with Selendroid. For some reason, the Selendroid server never shows up.

The server and logcat logs are here. Anyone else encountered this? Downgrading to 1.1.0 works for me.

This is not issue with appium. That is issue from selendroid side. I feced this issue long back and able to reproduce by using selendroid alone. So I raised issue with selendroid team but even in new release if selendroid 0.12.0 this still persist. So let’s wait for sometime.
Regarding your older version of appium will work because it uses underlying selendroid version 0.9.0 or 0.10.0 which are stable.

Thanks, @Priyank_Shah. I’ve been following this issue on the selendroid repo – I think it’s the one you’re talking about.

Is there a way to downgrade the Selendroid version used by Appium? This way, we can actually run Selendroid tests with Appium while we wait for the bug to be fixed.

You can do, but you need to spoil your hands with Appium code :frowning: and re-build appium. I think we can suggest that an improvement to appium. so like building appium using --selendroid (selendroid version) it should have selendroid version place holder. So we can build latest appium with specific version of selendroid.

It looks like Appium 1.1.0 uses Selendroid 0.10.0, which is only one version below the current one Appium uses on master (0.11.0). I wonder if it’s worth downgrading Selendroid back to 0.10.0 on master, since this bug probably affects more people than just us? It looks like added functionality from 0.10.0 -> 0.11.0 was backgroundApp() and resumeApp(), and other changes were mostly bug fixes/refactoring. So it wouldn’t be that much loss of functionality to downgrade.

Building and running Appium from source shouldn’t be that difficult (should just be changing the submodule commit, I think?). But since I manage Appium on 10+ buildslaves, downloading from npm is much easier. :confused: Maybe it’s what we need to do while we wait for Selendroid to be fixed, though. I’ll try and fork a branch that has 0.10.0 tomorrow morning.

Hi, I think we are riding in same boat :), So please let me know corrective changes so i would also make from my end and build.Testing in selendroid mode is quite challenging since u can not use advance feature of appium.

Priyank Shah

Same “Error: Waited 20 secs for selendroid server and it never showed up” issue when I’m trying to run test on automationName Selendroid. I even tried 1.1.0 with no luck.

info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}

Any solutions? Thanks.

Try to run it from source (using the v1.1.0 tag)? Run beforehand, to download the correct dependencies.

Hey I have the same problem. I did what you wrote here but with no success.

Could you help me?

Which OS are you running? Did run without errors?

OS X 10.8.5 was finished without errors

This is related to a currently opened bug on Selendroid Class resolved by unexpected DEX error · Issue #721 · selendroid/selendroid · GitHub

The issue is that the new version of Selendroid 0.11.0 and newer, uses the Gson library and probably your Android app does as I can see in your logcat log:

W/dalvikvm(10203): Class resolved by unexpected DEX: Lcom/foo/modules/ApiModule;(0x42068960):0x58b33000 ref [Lcom/google/gson/GsonBuilder;] Lcom/google/gson/GsonBuilder;(0x42068960):0x57a62000
W/dalvikvm(10203): (Lcom/foo/modules/ApiModule; had used a different Lcom/google/gson/GsonBuilder; during pre-verification)

They are currently working on removing that dependency in order to get things working again.

A possible work around for now is to use older Selendroid versions 0.10.0 or older.

This has been fixed in Selendroid .13 which was released today (!topic/selendroid/f3eBz6tyYxg)

Any chance we can get a new version of Appium with this fixed, we are currently having to run all our Android tests on 1.2.0 and our iOS tests on it would be great to only have to keep one version.

solve this problem by

set Selendroid port to 4724