Cordova + Appium + Node.JS can't run test

I’m trying to run the following test of Cordova app.

        driver
        .contexts().then(function (contexts) {
            return driver.context(contexts[1]);
        })
        .elementsByCss('input')
        .click()
        .sendKeys('[email protected]')
        .context('NATIVE_APP')
        .quit();

It seems like I manage to pass the first steps, getting the contexts and picking one but I can’t work on the context, see logs bellow:

RESPONSE init({“browserName”:“”,“appium-version”:“1.0”,“platformName”:“Android”,“platformVersion”:“4.4.2”,“deviceName”:“Android Emulator”,“app”:“/home/chaya/workspace/sample-code/sample-code/examples/node/CollectingApp.apk”}) “18d34aa8-e7d7-4d86-bf24-4757d4af823b”,null
CALL setImplicitWaitTimeout(3000)
POST /session/:sessionID/timeouts/implicit_wait {“ms”:3000}
RESPONSE setImplicitWaitTimeout(3000)
CALL contexts()
GET /session/:sessionID/contexts
RESPONSE contexts() [“NATIVE_APP”,“WEBVIEW_com.mycom.myapp”]
CALL context(“WEBVIEW_com.selfpoint.collectingapp”)
POST /session/:sessionID/context {“name”:“WEBVIEW_com.mycom.myapp”}

But it never passes this step, any ideas?

Thanks,
Chaya