Appium run from command line can't find element

I have an Android test that passes on my local machine where I run appium application from .dmg ver 1.3.0 Beta.

At some point it finds and clicks a button using UiSelector, here is the log from the server

info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[TEXT=Envoyer, CLASS=android.widget.Button]

info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":{"ELEMENT":"16"},"status":0}

info: [debug] Responding to client with success: {"status":0,"value":{"ELEMENT":"16"},"sessionId":"c7c353a2-e1fc-4f08-ac4e-d7e6ba904603"}

As you can see appium finds it just fine.

Now, when I run exactly same code with same .apk on jenkins slave, with appium .js version 1.3.0, it can’t locate it anymore :

 info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[TEXT=Envoyer, CLASS=android.widget.Button]
    
 info: [debug] Condition unmet after 509ms. Timing out.
    
 info: [debug] Responding to client with error: {"status" :7, "value": {"message": "An element could not be located on the page using the given search parameters." ..............}

Any ideas what could be a problem ? Again, the only difference seems to be the server app, .dmg vs command-line appium.js, but both same version 1.3.0

It also looks to me that the machine running tests is less performant and generally low on memory, I suspect the server could be timing before getting result from bootstrap running on emulator in 509 ms.

info: [debug] Condition unmet after 509ms. Timing out. 

Is there way to increase this timeout ?

I am seeing this now (inconsistent behavior), and it may be related to An element could not be located on the page using the given search parameters

Did you ever find a solution to this?

@Android_Android @jwallis
I am having the same issue where my tests run just fine locally but the element cannot be located when they are run on a cloud-based CI tool. I hope I could figure out the reason :confused:

@Styris, did you find a solution?
I also cannot run my tests on TestObject cloud platform…