I am configuring to run a Protractor test and below are the steps added in Azure devops
When I run this pipeline, it gets struck at webdriver-manager start --standalone. Not coming out of it so that it runs the next command to start test.
Error Log
2021-03-12T09:02:39.2180071Z ##[section]Starting: Run Test Cases
2021-03-12T09:02:39.3078252Z ==============================================================================
2021-03-12T09:02:39.3082840Z Task : Command line
2021-03-12T09:02:39.3085464Z Description : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
2021-03-12T09:02:39.3086081Z Version : 2.182.0
2021-03-12T09:02:39.3086701Z Author : Microsoft Corporation
2021-03-12T09:02:39.3087524Z Help : https://learn.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
2021-03-12T09:02:39.3088140Z ==============================================================================
2021-03-12T09:02:40.7279581Z Generating script.
2021-03-12T09:02:40.7467500Z Script contents:
2021-03-12T09:02:40.7486434Z node node_modules/protractor/bin/protractor protractor.conf.js
2021-03-12T09:02:40.7928490Z ========================== Starting Command Output ===========================
2021-03-12T09:02:40.8274945Z ##[command]"C:\windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "D:\a\_temp\91ab13f0-924e-4e63-a124-869764af15df.cmd""
2021-03-12T09:02:42.4610822Z [09:02:42] I/launcher - Running 1 instances of WebDriver
2021-03-12T09:02:42.4614093Z [09:02:42] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
2021-03-12T09:02:43.5634194Z [09:02:43] E/launcher - Error code: 135
2021-03-12T09:02:43.5635264Z [09:02:43] E/launcher - Error message: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:4444
2021-03-12T09:02:43.5636368Z [09:02:43] E/launcher - Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:4444
2021-03-12T09:02:43.5638525Z at ClientRequest.<anonymous> (D:\a\1\s\node_modules\selenium-webdriver\http\index.js:238:15)
2021-03-12T09:02:43.5640056Z at ClientRequest.emit (events.js:315:20)
2021-03-12T09:02:43.5642323Z at Socket.socketErrorListener (_http_client.js:469:9)
2021-03-12T09:02:43.5643094Z at Socket.emit (events.js:315:20)
2021-03-12T09:02:43.5643710Z at emitErrorNT (internal/streams/destroy.js:106:8)
2021-03-12T09:02:43.5644453Z at emitErrorCloseNT (internal/streams/destroy.js:74:3)
2021-03-12T09:02:43.5645162Z at processTicksAndRejections (internal/process/task_queues.js:80:21)
2021-03-12T09:02:43.5645806Z From: Task: WebDriver.createSession()
2021-03-12T09:02:43.5646642Z at Function.createSession (D:\a\1\s\node_modules\selenium-webdriver\lib\webdriver.js:769:24)
2021-03-12T09:02:43.5648679Z at Function.createSession (D:\a\1\s\node_modules\selenium-webdriver\chrome.js:761:15)
2021-03-12T09:02:43.5649636Z at createDriver (D:\a\1\s\node_modules\selenium-webdriver\index.js:170:33)
2021-03-12T09:02:43.5650518Z at Builder.build (D:\a\1\s\node_modules\selenium-webdriver\index.js:626:16)
2021-03-12T09:02:43.5651614Z at Hosted.getNewDriver (D:\a\1\s\node_modules\protractor\built\driverProviders\driverProvider.js:53:33)
2021-03-12T09:02:43.5652586Z at Runner.createBrowser (D:\a\1\s\node_modules\protractor\built\runner.js:195:43)
2021-03-12T09:02:43.5653422Z at D:\a\1\s\node_modules\protractor\built\runner.js:339:29
2021-03-12T09:02:43.5654331Z at _fulfilled (D:\a\1\s\node_modules\protractor\node_modules\q\q.js:834:54)
2021-03-12T09:02:43.5655184Z at D:\a\1\s\node_modules\protractor\node_modules\q\q.js:863:30
2021-03-12T09:02:43.5656122Z at Promise.promise.promiseDispatch (D:\a\1\s\node_modules\protractor\node_modules\q\q.js:796:13)
2021-03-12T09:02:43.5658296Z [09:02:43] E/launcher - Process exited with error code 135
2021-03-12T09:02:43.6876129Z ##[error]Cmd.exe exited with code '135'.
2021-03-12T09:02:43.7575403Z ##[section]Finishing: Run Test Cases
Not coming out of it so that it runs the next command to start test.
The net command is the task Run Test Cases, right? If yes, we could click the task and expand the tab Control Options and ensure the field Run this task is set to Even if a previous task has failed, unless the build was canceled.
Then if the task Webdriver Start fails, the pipeline will continue to run the next task Run Test Cases.
Update1
Not coming out of it so that it runs the next command to start test.
The initial problem has been solved.
Since you have not started or webdriver not get started correctly, we could see the error issue: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:4444. If the previous task successfully runs Webdriver, we will not see the error message.
We need ensure the Webdriver start and then run the Protractor test.
I figured out the problem. We dont need an explict step to start Webdriver and also i had to comment a line in config.js
Related
Windows 10 x64 21H2, running my project in VS Code and get the following error:
Executing task: npm run serve
> weatherApp#0.1.0 serve
> vue-cli-service serve
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist#latest --update-db
Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
INFO Starting development server...
10% building 2/5 modules 3 active ...babel-loader\lib\index.js!C:\tmp\VUE Weather apps\VUE 3 - weather\node_modules\eslint-loader\index.js??ref--13-0!C:\tmp\VUE Weather apps\VUE 3 - weather\src\main.jsError: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:71:19)
at Object.createHash (node:crypto:133:10)
at module.exports (C:\tmp\VUE Weather apps\VUE 3 -
...
{
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
Node.js v18.12.1
* The terminal process "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command npm run serve" terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.
At the same time the command npm run serve runs w/o any issues. What should I do to have the issue fixed?
A few days ago, my protractor was working fine. But yesterday when I tried to run the same tests, I got:
E/launcher - Error: Error: Cannot find module 'jasmine-reporters'
Require stack:
- D:\Repos\POS\config\config_c80_checkScreen.js
- C:\Users\ingridd\AppData\Roaming\npm\node_modules\protractor\built\configParser.js
- C:\Users\ingridd\AppData\Roaming\npm\node_modules\protractor\built\launcher.js
- C:\Users\ingridd\AppData\Roaming\npm\node_modules\protractor\built\cli.js
- C:\Users\ingridd\AppData\Roaming\npm\node_modules\protractor\bin\protractor
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:793:17)
at Function.Module._load (internal/modules/cjs/loader.js:686:27)
at Module.require (internal/modules/cjs/loader.js:848:19)
at require (internal/modules/cjs/helpers.js:74:18)
at onPrepare (D:\Repos\POS\config\config_c80_checkScreen.js:62:28)
at C:\Users\ingridd\AppData\Roaming\npm\node_modules\protractor\built\util.js:46:49
at Function.promise (C:\Users\ingridd\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:682:9)
at Object.runFilenameOrFn_ (C:\Users\ingridd\AppData\Roaming\npm\node_modules\protractor\built\util.js:38:16)
at C:\Users\ingridd\AppData\Roaming\npm\node_modules\protractor\built\runner.js:98:27
at _fulfilled (C:\Users\ingridd\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:834:54)
Closing report
[11:03:30] E/launcher - Process exited with error code 100
On my project folder, I have the protractor-jasmine2-screenshot-reporter folder as you can see on the screenshot
jasmine2 folder
Please see where the ENV var is located
env var
The last thing I tried was to update the web driver and install the latest protractor. But I still get the same error.
Any suggestion is appreciated.
Error 100 is RUNNERS_FAILED_EXIT_CODE which is because there is an unexpected error. The error looks like you are missing the jasmine-reporters. npm install -S jasmine-reporters should fix it.
I am trying to use Snyk Security Scan task in Azure Pipeline (Classic). My Application runtime is .Net and framework is ASP.Net 4.4.1 . There is no issue regarding authentication as i had create valid service connection of Snyk.
When i am running my pipeline it is giving error "Could not detect supported target files in D:\a\1\s".
log of failed Snyk Security Scan task:
##[debug]debug=undefined
##[debug]task result: Failed
** We have a problem! :( **
##[error]There was an error when attempting to execute the process 'C:\Program Files\nodejs\npm.cmd'. This may indicate the process failed to start. Error: spawn C:\windows\system32\cmd.exe ENOENT
##[debug]Processed: ##vso[task.issue type=error;]There was an error when attempting to execute the process 'C:\Program Files\nodejs\npm.cmd'. This may indicate the process failed to start. Error: spawn C:\windows\system32\cmd.exe ENOENT
There was an error when attempting to execute the process 'C:\Program Files\nodejs\npm.cmd'. This may indicate the process failed to start. Error: spawn C:\windows\system32\cmd.exe ENOENT
##[debug]Processed: ##vso[task.complete result=Failed;]There was an error when attempting to execute the process 'C:\Program Files\nodejs\npm.cmd'. This may indicate the process failed to start. Error: spawn C:\windows\system32\cmd.exe ENOENT
I had this same problem and needed to take advantage of the "Custom path to manifest file to test" field with an absolute location of the packages file: C:\agent_work[buildId]\s[solution folder][project folder]\packages.config
This was running on a private build server.
I HAVE THIS ERROR
On build app in ionic
sudo ionic build android
Error: ANDROID_HOME is not set and "android" command not in your PATH.
You must fulfill at least one of these conditions.
at /home/sbh/testt/mobilebra/platforms/android/cordova/lib/check_reqs.js:206:19
at _fulfilled (/home/sbh/testt/mobilebra/platforms/android/cordova/node_modules/q/q.js:798:54)
at self.promiseDispatch.done (/home/sbh/testt/mobilebra/platforms/android/cordova/node_modules/q/q.js:827:30)
at Promise.promise.promiseDispatch (/home/sbh/testt/mobilebra/platforms/android/cordova/node_modules/q/q.js:760:13)
at /home/sbh/testt/mobilebra/platforms/android/cordova/node_modules/q/q.js:821:14
at flush (/home/sbh/testt/mobilebra/platforms/android/cordova/node_modules/q/q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
at Module.runMain (module.js:607:11)
at run (bootstrap_node.js:422:7)
Error: /home/sbh/testt/mobilebra/platforms/android/cordova/build:
Command failed with exit code 2
Do the following:
(nano is my preference, use whatever your heart desires)
sudo nano ~/.bashrc
add the following lines, modifying the paths if your SDKs in a different spot:
export ANDROID_HOME=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
Sorry for unclear subject but i really don't understand where problem.
I use a system for autotests c#+webdriver for chrome + nunit (2.6) + cc.net ( 1.6.7981.1)
And my tests is run on remote machine (Windows XP SP 2 x86)via psexec which start bat file on remote machine
bat file includes 2 commands:
run msbuild
run nunit-console
Well, psexec has next arguments
/accepteula \MachineName -u Login -p Pass -s Path\start.bat
Bat file has next command
nunit-console-x86.exe "%PROJECT_FOLDER%\Path\Tests.dll" "/xml=%TEST_RESULT_PATH%"
When cc.net launch psexec tests is started and the tests work during some time. Unexpected, psexec exit with code 1
message level="Error">Path\start.bat exited on MachineName with error code 1. message
But nunit-console on remote machine is continue working
And after some time console is crashed with error
szAppName : nunit-console-x86.exe szAppVer : 2.6.0.12051
szModName : kernel32.dll szModVer : 5.1.2600.2180 offset :
0001eb33
Message from Event log
Application: nunit-console-x86.exe Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.IOException Stack: at
System.IO._Error.WinIOError(Int32, System.String) at
System.IO._ConsoleStream.Write(Byte[], Int32, Int32) at
System.IO.StreamWriter.Flush(Boolean, Boolean) at
System.IO.StreamWriter.Write(Char[], Int32, Int32) at
System.IO.TextWriter.WriteLine(System.String) at
System.IO.TextWriter.WriteLine(System.String, System.Object) at
System.IO.TextWriter+SyncTextWriter.WriteLine(System.String,
System.Object) at System.Console.WriteLine(System.String,
System.Object) at NUnit.ConsoleRunner.Runner.Main(System.String[])
at NUnit.ConsoleRunner.Class1.Main(System.String[])
If run nunit locally than no problem(nunit-console works fun).
Some time ago system worked, and i don't know what is changed (This is most bad case)
How can i resolve this problem?
Thanks!
This problem is resolved!
Now system is working