Alternately the programmatically starting the Appium server fails when it is scheduled with Jenkins job - appium-android

Following error observed when Jenkins job triggers automatically the selenium Appium scripts
Periodically in the mac machine and these were observed every alternate run. i.e. sometimes it runs fine & sometimes it fails with the following error.
Looking for how do I resolve this issue.
io.appium.java_client.service.local.InvalidNodeJSInstance: Can't get a path to the default Node.js instance
adb kill-server
kill the running appium process & restart
Verified the Path variables on my mac machine.

Related

How can I debug a launch configuration?

We have a new team member trying to get started with our Godot project. VSCode is our standard editor. Everyone is using Fedora Linux. You can find the relevant files here:
https://github.com/redhat-gamedev/srt-godot-server/tree/main/.vscode
On my machine, when trying to run the launch configuration, the build task succeeds, and then the program is launched. Everything works fine.
On the new team member's machine, when trying to run the launch configuration, the build task succeeds, and then nothing happens. There are no errors. There is no output.
We tried running VSCode with an increased log level (debug), but the VScode log files don't show anything meaningful or related. We tried executing the equivalent launch command from the terminal/shell and it works fine. There are no errors, but the resulting built program executes successfully. Interestingly, running code --verbose does produce a ton of output but nothing super specific to the execution of the steps in the launch configuration. Also, code --verbose --log debug does not cause messages spit out of VSCode to be at the DEBUG log level. Everything is still INFO:
[4183395:0112/092541.932947:INFO:CONSOLE(616)] "%cTRACE color: #888 [File Watcher (parcel)] [CHANGED] ...
How can I debug a launch configuration in VSCode to see what's going on? Is there a way to make the launch configuration system of VSCode be more verbose?

No windows console found. Are you running cmd.exe? What is exact reason for this error?

I created a classic CI pipeline in azure devops to run aws commands using "AWS CLI template". I used "aws configure sso" command in AWS CLI but when I run the pipeline, I'm getting this error- No windows console found. Are you running cmd.exe? And the process failed with exit code 255" what is this error exactly and please anyone tell me, how can I remove it?
What is the OS of the agent you used to run the CI pipeline? Windows, Linux or macOS?
According to the introduction about the extension "AWS Toolkit for Azure DevOps", the AWS CLI task is only available on Windows agent.
Looks like this task can only call the cmd.exe to execute the command. And the cmd.exe is only available on Windows.
[UPDATE]
What agent did you use? Microsoft-hosted Windows agent, or self-hosted Windows agent?
Please make sure the cmd.exe has been installed on the Windows machine, and has been added to the system environment variable.
You can run the bash command printenv to list all the system environment variables, then check if this COMSPEC=C:\Windows\system32\cmd.exe is listed.
If the cmd.exe also has been installed correctly on your local Windows machine, you can try directly executing the related AWS CLI command on you local Windows machine to see if the same issue occurs. If the same issue occurs, the problem should occur on the AWSCLI itself.
If the issue only occurs when using the AWS CLI task, the issue should occur on the task itself, you can report this issue on the Q & A tab of the extension on Marketplace.

Running PHPUnit in debug mode gives 'Unable to open 'BaseTestRunner.php': File not found' error

I am running Homestead on Windows 10 machine with Virtual Box. I have VSCode running on the Windows machine and I want to be able to debug code in the VM.
I have followed this setup:
https://tighten.co/blog/debugging-configure-xdebug-and-laravel-homestead-and-vs-code-and-phpunit
Once I am listening for Xdebug I run my code in the VM using phpunit test/Feature/AdminTest.php and this fails with
Unable to open 'BaseTestRunner.php': File not found
(file:///c:/g/Sites/Laravel/everyone-in-mind/vendor/phpunit/phpunit/src/Runner/BaseTestRunner.php).
Which is obviously showing me the Windows path.
If I stop the debugger and run again the test runs fine.
Do I need to install something extra to get BaseTestRunner?
When you are debuging a PHPUnittest with xDebug in VSCode with the PHPUnit plugin from Elon Mallin, check that you have disable the option Breakpoints/Everything.
It seems as if PHPUnittest, running from the PHPUnit-plugin, could not find the BaseTestRunner.php file and raised an exection. When you ignore this exception, you can run and debug your test.
see the same question PHpUnit with xdebug Breaks at BaseTestRunner instead of the actual test
It works for me and can now debug the Unittest.

Unable to instantiate Chrome browser using Protractor

Protractor execution if failed due to an exception leaving behind orphan chrome browsers.
To handle this issue, I have create a batch file to kill chrome.exe using taskkill # batch file. Once I triggered this batch file, protractor test cases which used to work stopped working with below stack trace. Restarted the machine but in vain.

"Terminate" in eclipse's console view leaves node.exe running

I recently started developing for Node.js/Express with Nodeclipse. I added a run configuration for package.json with goal start. This works as expected, the start command from package.json is executed (node ./bin/www). I can see this command in Eclipse's console view and I can see two node.exe processes appear in Windows Task-Manager. HTTP requests to http://localhost:3000/ are logged in the console.
However, klicking the red "Terminate"-Button in Eclipse's console view leaves the node.exe processes running. Subsequent attempts to start the app fail because the port is already in use.
I do not have this problem when I start the app with npm start in Windows cmd. Stopping the execution with Ctrl+C will also exit the node.exe processes.
This is my IDE-Setup:
Eclipse Luna SR2 (4.4.2) under Windows 7 x64 with jre1.8.0_45
Eclipse was setup this way: extracted eclipse-platform-4.4.2-win32-x86_64.zip (from here), installed Eclipse Marketplace Client, then installed Nodeclipse via Drag&Drop from nodeclipse.org
Node.js version v0.12.2 (for Windows x64)
express-generator (version 4.12.1) is installed globally
How can I make the Terminate button in the console view actually terminating the node.exe processes?
It seems that Eclipse only kills the npm script that is used to start up node. The thing is that Eclipse forcibly kills that script, giving it no chance to send any signals to the node.exe process.
This bug explains why this works this way.
Step 1:
Run command-line as an Administrator. Then run the below mention command. type your port number in yourPortNumber
netstat -ano | findstr :yourPortNumber
Red coloured circled area shows the PID (process identifier)
Step 2 :
Then you execute this command after identify the PID.
taskkill /PID typeyourPIDhere /F
P.S. Run the first command again to check if process is still available or not. You'll get empty line if process is successfully ended.