mercredi 13 février 2019

Appium/Protractor - Cordova app - When I try to run simple test I get following error - Failed to get sockets matching: @webview_devtools_remote_

I'm trying to run a simple test on my hybrid app with Appium + Protractor and I am unable to since I am getting following error: Failed to get sockets matching: @webview_devtools_remote_.*15239

I am using Ubuntu, and on it I have set up Appium and Protractor, tried literally every solution I have found on the internet, could not resolve the issue.

Only thing that would "remove" the error is adding following code into capabilities:

chromeOptions: {
    androidPackage: "com.android.chrome"
},

But then I only get in the app, and Appium server just gets stuck at:

[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8001/wd/hub/session] with body: {"desiredCapabilities":{"chromeOption {"androidPackage":"com.android.chrome","androidUseRunningApp":true,"androidDeviceSerial":"1cdc4ed10c027ece"}}}

It won't start the spec file at all.

var SpecReporter = require('jasmine-spec-reporter').SpecReporter;

exports.config = { seleniumAddress: 'http://localhost:4723/wd/hub', allScriptsTimeout: 50976,

specs: [
    'test.js'
],

capabilities: {
    platformName: 'Android',
    platformVersion: '8.0.0',
    deviceName: 'Galaxy S9',
    app: 'path_to_app',
    autoWebview: true,
    browserName: '',
    appPackage: 'app_package_name',
    newCommandTimeout: '140',

    chromeOptions: {
        androidPackage: "com.android.chrome"
    }   
},

onPrepare: function () {
jasmine.getEnv().addReporter(new SpecReporter({displayStacktrace: 'all'}));
},

framework: 'jasmine',

jasmineNodeOpts: {
print: function () {}, //remove protractor dot reporter
defaultTimeoutInterval: 100000
}

}

Aucun commentaire:

Enregistrer un commentaire