The terminal process failed to launch: A native exception occurred during launch (Error relocating /usr/lib/node_modules/code-server/lib/vscode/node_modules/node-pty/build/Release/pty.node: _ZN2v816FunctionTemplate3NewEPNS_7IsolateEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEENS_5LocalIS4_EENSA_INS_9SignatureEEEiNS_19ConstructorBehaviorENS_14SideEffectTypeEPKNS_9CFunctionE: symbol not found).
My user settings value:
{
"go.useLanguageServer": true
}
My terminal logs showed these errors:
[2021-01-14T08:11:39.587Z] info code-server 3.8.0 c4610f7829701aadb045d450013b84491c30580d
[2021-01-14T08:11:39.590Z] info Using user-data-dir ~/.local/share/code-server
[2021-01-14T08:11:39.695Z] info Using config file ~/.config/code-server/config.yaml
[2021-01-14T08:11:39.695Z] info HTTP server listening on http://127.0.0.1:8080
[2021-01-14T08:11:39.696Z] info - Authentication is enabled
[2021-01-14T08:11:39.696Z] info - Using password from ~/.config/code-server/config.yaml
[2021-01-14T08:11:39.696Z] info - Not serving HTTPS
Error: Error relocating /usr/lib/node_modules/code-server/lib/vscode/node_modules/spdlog/build/Release/spdlog.node: _ZN2v816FunctionTemplate3NewEPNS_7IsolateEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEENS_5LocalIS4_EENSA_INS_9SignatureEEEiNS_19ConstructorBehaviorENS_14SideEffectTypeEPKNS_9CFunctionE: symbol not found
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1057:18)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at Module.patchedRequire [as require] (/usr/lib/node_modules/code-server/lib/vscode/node_modules/diagnostic-channel/dist/src/patchRequire.js:14:46)
at require (internal/modules/cjs/helpers.js:74:18)
at bindings (/usr/lib/node_modules/code-server/lib/vscode/node_modules/bindings/bindings.js:112:48)
at Object.<anonymous> (/usr/lib/node_modules/code-server/lib/vscode/node_modules/spdlog/index.js:3:35)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at Module.patchedRequire [as require] (/usr/lib/node_modules/code-server/lib/vscode/node_modules/diagnostic-channel/dist/src/patchRequire.js:14:46)
at require (internal/modules/cjs/helpers.js:74:18)
at t.load (/usr/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:17:960)
at e.load (/usr/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:13:941)
at o (/usr/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:31:189)
at Object.errorback (/usr/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:31:313)
at e.triggerErrorback (/usr/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:14:306)
at /usr/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:14:10
at ReadFileContext.callback (/usr/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:18:342)
at FSReqCallback.readFileAfterOpen [as oncomplete] (fs.js:261:13) {
phase: 'loading',
moduleId: 'spdlog',
neededBy: [ '===anonymous3===' ]
}
Error: Error relocating /usr/lib/node_modules/code-server/lib/vscode/node_modules/spdlog/build/Release/spdlog.node: _ZN2v816FunctionTemplate3NewEPNS_7IsolateEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEENS_5LocalIS4_EENSA_INS_9SignatureEEEiNS_19ConstructorBehaviorENS_14SideEffectTypeEPKNS_9CFunctionE: symbol not found
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1057:18)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at Module.patchedRequire [as require] (/usr/lib/node_modules/code-server/lib/vscode/node_modules/diagnostic-channel/dist/src/patchRequire.js:14:46)
at require (internal/modules/cjs/helpers.js:74:18)
at bindings (/usr/lib/node_modules/code-server/lib/vscode/node_modules/bindings/bindings.js:112:48)
at Object.<anonymous> (/usr/lib/node_modules/code-server/lib/vscode/node_modules/spdlog/index.js:3:35)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at Module.patchedRequire [as require] (/usr/lib/node_modules/code-server/lib/vscode/node_modules/diagnostic-channel/dist/src/patchRequire.js:14:46)
at require (internal/modules/cjs/helpers.js:74:18)
at t.load (/usr/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:17:960)
at e.load (/usr/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:13:941)
at o (/usr/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:31:189)
at Object.errorback (/usr/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:31:313)
at e.triggerErrorback (/usr/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:14:306)
at /usr/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:14:10
at ReadFileContext.callback (/usr/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:18:342)
at FSReqCallback.readFileAfterOpen [as oncomplete] (fs.js:261:13) {
phase: 'loading',
moduleId: 'spdlog',
neededBy: [ '===anonymous3===' ]
}
[2021-01-14T08:11:52.407Z] error exthost console {"arguments":"[\"Error: Error relocating /usr/lib/node_modules/code-server/lib/vscode/node_modules/spdlog/build/Release/spdlog.node: _ZN2v816FunctionTemplate3NewEPNS_7IsolateEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEENS_5LocalIS4_EENSA_INS_9SignatureEEEiNS_19ConstructorBehaviorENS_14SideEffectTypeEPKNS_9CFunctionE: symbol not found\\n at Object.Module._extensions..node (internal/modules/cjs/loader.js:1057:18)\\n at Module.load (internal/modules/cjs/loader.js:863:32)\\n at Function.Module._load (internal/modules/cjs/loader.js:708:14)\\n at Function.t._load (/usr/lib/node_modules/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:1065:961)\\n at Function.i._load (/usr/lib/node_modules/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:1035:665)\\n at Module.require (internal/modules/cjs/loader.js:887:19)\\n at require (internal/modules/cjs/helpers.js:74:18)\\n at bindings (/usr/lib/node_modules/code-server/lib/vscode/node_modules/bindings/bindings.js:112:48)\\n at Object.<anonymous> (/usr/lib/node_modules/code-server/lib/vscode/node_modules/spdlog/index.js:3:35)\\n at Module._compile (internal/modules/cjs/loader.js:999:30)\\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\\n at Module.load (internal/modules/cjs/loader.js:863:32)\\n at Function.Module._load (internal/modules/cjs/loader.js:708:14)\\n at Function.t._load (/usr/lib/node_modules/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:1065:961)\\n at Function.i._load (/usr/lib/node_modules/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:1035:665)\\n at Module.require (internal/modules/cjs/loader.js:887:19)\\n at require (internal/modules/cjs/helpers.js:74:18)\\n at t.load (/usr/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:17:960)\\n at e.load (/usr/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:13:941)\\n at o (/usr/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:31:189)\\n at Object.errorback (/usr/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:31:313)\\n at e.triggerErrorback (/usr/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:14:306)\\n at /usr/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:14:10\\n at ReadFileContext.<anonymous> (/usr/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:18:342)\\n at ReadFileContext.callback (/usr/lib/node_modules/code-server/lib/vscode/node_modules/graceful-fs/graceful-fs.js:115:16)\\n at FSReqCallback.readFileAfterOpen [as oncomplete] (fs.js:261:13)\"]","token":"cc585d5e-035d-4875-9d18-cdd3e2a29183"}
innerError Error: Cannot find module '../build/Debug/pty.node'
Require stack:
- /usr/lib/node_modules/code-server/lib/vscode/node_modules/node-pty/lib/unixTerminal.js
- /usr/lib/node_modules/code-server/lib/vscode/node_modules/node-pty/lib/index.js
- /usr/lib/node_modules/code-server/lib/vscode/out/bootstrap-amd.js
- /usr/lib/node_modules/code-server/lib/vscode/out/vs/server/fork.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
at Function.Module._load (internal/modules/cjs/loader.js:667:27)
at Module.require (internal/modules/cjs/loader.js:887:19)
at Module.patchedRequire [as require] (/usr/lib/node_modules/code-server/lib/vscode/node_modules/diagnostic-channel/dist/src/patchRequire.js:14:46)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/usr/lib/node_modules/code-server/lib/vscode/node_modules/node-pty/lib/unixTerminal.js:31:15)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at Module.patchedRequire [as require] (/usr/lib/node_modules/code-server/lib/vscode/node_modules/diagnostic-channel/dist/src/patchRequire.js:14:46)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/usr/lib/node_modules/code-server/lib/vscode/node_modules/node-pty/lib/index.js:14:20)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at Module.patchedRequire [as require] (/usr/lib/node_modules/code-server/lib/vscode/node_modules/diagnostic-channel/dist/src/patchRequire.js:14:46)
at require (internal/modules/cjs/helpers.js:74:18)
at t.load (/usr/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:17:960)
at e.load (/usr/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:13:941)
at o (/usr/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:31:189)
at Object.errorback (/usr/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:31:313)
at e.triggerErrorback (/usr/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:14:306)
at /usr/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:14:10
at ReadFileContext.callback (/usr/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:18:342)
at FSReqCallback.readFileAfterOpen [as oncomplete] (fs.js:261:13) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/usr/lib/node_modules/code-server/lib/vscode/node_modules/node-pty/lib/unixTerminal.js',
'/usr/lib/node_modules/code-server/lib/vscode/node_modules/node-pty/lib/index.js',
'/usr/lib/node_modules/code-server/lib/vscode/out/bootstrap-amd.js',
'/usr/lib/node_modules/code-server/lib/vscode/out/vs/server/fork.js'
]
}
PROTOCOL CORRUPTION, LAST SAW MSG 0 AND HAVE NOW RECEIVED MSG 38
I solved this entirely by accident, by being accommodating to external developers. The error is misleading, implying the nonexistence of needed libraries, but it assumes bash is installed.
Either install bash or add a terminal profile for ash in Settings, then use it as your terminal shell.
Related
Hello: I'm on Windows 11 trying to check-in from VSCode to Github (I have Github desktop installed) - I am receiving the error below - What am I missing ?
[2022-03-16T21:53:28.727Z] > git config --get commit.template [56ms]
[2022-03-16T21:53:28.727Z] node:internal/modules/cjs/loader:943
throw err; ^
Error: Cannot find module
'C:\Users[user]\AppData\Local\GitHubDesktop\app-2.9.11\config'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:940:15)
at Module._load (node:internal/modules/cjs/loader:785:27)
at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:17:47 { code: 'MODULE_NOT_FOUND', requireStack: [] }
[2022-03-16T21:54:24.486Z] > git symbolic-ref --short HEAD [59ms]
[2022-03-16T21:54:24.486Z] node:internal/modules/cjs/loader:943
throw err;
^Error: Cannot find module
'C:\Users[user]\AppData\Local\GitHubDesktop\app-2.9.11\symbolic-ref'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:940:15)
at Module._load (node:internal/modules/cjs/loader:785:27)
at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:17:47 { code: 'MODULE_NOT_FOUND', requireStack: [] }
[2022-03-16T21:54:24.545Z] > git rev-parse HEAD [56ms]
[2022-03-16T21:54:24.545Z] node:internal/modules/cjs/loader:943
throw err; ^
Error: Cannot find module
'C:\Users[user]\AppData\Local\GitHubDesktop\app-2.9.11\rev-parse'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:940:15)
at Module._load (node:internal/modules/cjs/loader:785:27)
at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:17:47 { code: 'MODULE_NOT_FOUND', requireStack: [] }
The login page of my app is not built with angular, but after the login, the pages that its lands and remaining app is built with angularjs.
To get the url I used browser.driver.get('//appurl'); which works fine.
After the login, element(by.css('a[href="#!/test"]')).click(); does not work, where as browser.driver.findElement(by.css('a[href="#!/test"]')).click(); worked !!
Below is the error
ScriptTimeoutError: script timeout: result was not received in 11
seconds
(Session info: chrome...
(Driver info: ...,...)
at Object.checkLegacyResponse (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\error.js:546:15)
at parseHttpResponse (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\http.js:509:13)
at doSend.then.response (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\http.js:441:30)
at process._tickCallback (internal/process/next_tick.js:68:7)
From: Task: Protractor.waitForAngular() - Locator: By(css selector, a[href="#!/workpieces"])
at thenableWebDriverProxy.schedule (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver.js:807:17)
at ProtractorBrowser.executeAsyncScript_ (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\built\browser.js:425:28)
at angularAppRoot.then (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\built\browser.js:456:33)
at ManagedPromise.invokeCallback_
(C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:1376:14)
at TaskQueue.execute_ (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:3084:14)
at TaskQueue.executeNext_ (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:3067:27)
at asyncRun (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2927:27)
at C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:668:7
at process._tickCallback (internal/process/next_tick.js:68:7)Error
at ElementArrayFinder.applyAction_ (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\built\element.js:459:27)
at ElementArrayFinder.(anonymous function).args [as click] (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\built\element.js:91:29)
at ElementFinder.(anonymous function).args [as click] (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\built\element.js:831:22)
at UserContext. (C:\Users\testuser\repos\test\spec.js:21:53)
at C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:112:25
at new ManagedPromise (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:1077:7)
at ControlFlow.promise (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2505:12)
at schedulerExecute (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:95:18)
at TaskQueue.execute_ (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:3084:14)
at TaskQueue.executeNext_ (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:3067:27)
From: Task: Run it("Test") in control flow
at UserContext. (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:94:19)
From asynchronous test:
Error
at Suite. (C:\Users\testuser\repos\test\spec.js:20:5)
at Object. (C:\Users\testuser\repos\test\spec.js:1:63)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
i am brand new to protractor and did setup as per the instructions from the protractor website. When i try to run the protractor test with the a cucumber framework i always get "Error: Error: Cannot find module 'cucumber'". Any help on this? below are by configurations.
cucumber-conf.js
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
capabilities: {
browserName:'chrome'
},
framework: 'custom',
frameworkPath: require.resolve('protractor-cucumber-framework'),
specs: [
'./cucumber/*.feature'
],
cucumberOpts: {
require: ['./cucumber/*.js'],
tags: [],
strict: true,
format: ["pretty"],
dryRun: false,
compiler: []
},
onPrepare: function () {
browser.manage().window().maximize();
}
};
when i run protractor cucumber-conf.js i get below error.
/opt/protractor_tests
➔ protractor cucumber-conf.js
(node:5681) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[12:06:55] I/launcher - Running 1 instances of WebDriver
[12:06:55] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
[12:06:57] E/launcher - Error: Error: Cannot find module 'cucumber'
at Function.Module._resolveFilename (module.js:472:15)
at Function.Module._load (module.js:420:25)
at Module.require (module.js:500:17)
at require (internal/module.js:20:19)
at Object.module.exports.load (/opt/protractor_tests/node_modules/protractor-cucumber-framework/lib/cucumberLoader.js:5:12)
at Object.<anonymous> (/opt/protractor_tests/node_modules/protractor-cucumber-framework/index.js:5:48)
at Module._compile (module.js:573:32)
at Object.Module._extensions..js (module.js:582:10)
at Module.load (module.js:490:32)
at tryModuleLoad (module.js:449:12)
[12:06:57] E/launcher - Process exited with error code 100
I am trying to automate and rum a simple register form but i am getting error saying "Failed: Fn is not a function". Below is my code
describe('Locator testing by model', function(){
it('automate user register form', function(){
browser.get('http://www.way2automation.com/angularjs-protractor/registeration/#/login');
element(by.model('Auth.user.name')).sendKeys('angular');
element(by.model('Auth.user.password')).sendKeys('password');
element(by.model('model[options.key]')).sendKeys('zafaque');
element(by.buttonText('Login')).click();
browser.wait(3000);
});
});
below is the error detail
1) Locator testing by model automate user register form
Message:
Failed: fn is not a function
Stack:
TypeError: fn is not a function
at /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:716:14
at TaskQueue.execute_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2913:14)
at TaskQueue.executeNext_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2896:21)
at /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2820:25
at /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:639:7
at process._tickCallback (node.js:369:9)
From: Task: <anonymous>
at pollCondition (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2359:16)
at /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2355:9
at new ManagedPromise (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:1082:7)
at /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2354:14
at TaskQueue.execute_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2913:14)
at TaskQueue.executeNext_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2896:21)
at /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2775:27
at /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:639:7
at process._tickCallback (node.js:369:9)
From: Task: <anonymous wait>
at ControlFlow.wait (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2352:17)
at Driver.wait (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:712:29)
at ProtractorBrowser.to.(anonymous function) [as wait] (/usr/local/lib/node_modules/protractor/built/browser.js:60:29)
at Object.<anonymous> (/Users/zafaque/WebstormProjects/autotation/udemyProject/loginTest.js:12:17)
at /usr/local/lib/node_modules/protractor/node_modules/jasminewd2/index.js:94:23
at new ManagedPromise (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:1082:7)
at controlFlowExecute (/usr/local/lib/node_modules/protractor/node_modules/jasminewd2/index.js:80:18)
at TaskQueue.execute_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2913:14)
at TaskQueue.executeNext_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2896:21)
at /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2820:25
From: Task: Run it("automate user register form") in control flow
at Object.<anonymous> (/usr/local/lib/node_modules/protractor/node_modules/jasminewd2/index.js:79:14)
From asynchronous test:
Error
at Suite.<anonymous> (/Users/zafaque/WebstormProjects/autotation/udemyProject/loginTest.js:6:5)
at Object.<anonymous> (/Users/zafaque/WebstormProjects/autotation/udemyProject/loginTest.js:4:1)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
You are using browser.wait() incorrectly. Refer the official documentation for correct usage here
browser.wait() accepts params in the below order
first argument is a condition which can be a function or a
webdriver.promise.Promise or a Expected Condition Second Argument is
the timeout
But you are passing timeout as the first argument. Incase you just wait a conditionless wait - Just use browser.sleep(3000)
i download a new ionic project and i am trying to test the header contains these elements ""
my config file is
exports.config = {
framework: 'jasmine2',
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['../www/head.spec.js'],
multiCapabilities: [
{
browserName: 'chrome'
}]
}
named this as e2e.js
my test case file is
describe('header Module', function(){
var header;
beforeEach(function() {
header = element(by.css('title'));
});
it('should check title text',function(){
expect(header.getText()).toContain('Ionic Blank Starter');
});
});
and i named this as head.spec.js
my issue is that i could see the browser opened and my protractor sends an error msg
empresss-Mac-mini:myApp admin$ protractor test/e2e.js
Using the selenium server at http://localhost:4444/wd/hub
[launcher] Running 1 instances of WebDriver
/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/http/index.js:172
callback(new Error(message));
^
Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:4444
at ClientRequest. (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/http/index.js:172:16)
at emitOne (events.js:77:13)
at ClientRequest.emit (events.js:169:7)
at Socket.socketErrorListener (_http_client.js:259:9)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at emitErrorNT (net.js:1253:8)
at doNTCallback2 (node.js:439:9)
at process.tickCallback (node.js:353:17)
From: Task: WebDriver.createSession()
at Function.webdriver.WebDriver.acquireSession (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:157:22)
at Function.webdriver.WebDriver.createSession (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:131:30)
at [object Object].Builder.build (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/builder.js:445:22)
at [object Object].DriverProvider.getNewDriver (/usr/local/lib/node_modules/protractor/lib/driverProviders/driverProvider.js:38:7)
at [object Object].Runner.createBrowser (/usr/local/lib/node_modules/protractor/lib/runner.js:182:37)
at /usr/local/lib/node_modules/protractor/lib/runner.js:263:21
at _fulfilled (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:797:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:826:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:759:13)
at /usr/local/lib/node_modules/protractor/node_modules/q/q.js:525:49
[launcher] Process exited with error code 1
could someone help to fix this issue
when i try to webdriver-manager update err msg is displayed
empresss-Mac-mini:~ admin$ webdriver-manager update
fs.js:799
return binding.mkdir(pathModule._makeLong(path),
^
Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/protractor/selenium'
at Error (native)
at Object.fs.mkdirSync (fs.js:799:18)
at Object.<anonymous> (/usr/local/lib/node_modules/protractor/bin/webdriver-manager:126:6)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Function.Module.runMain (module.js:467:10)
at startup (node.js:134:18)
at node.js:961:3
empresss-Mac-mini:~ admin$