VSCode integrated terminal failed to launch - linux

VSCode integrated terminal failed to launch and the error showed up:
The terminal process failed to launch: Path to shell executable "bash" is not a file of a symlink.
Tried to look for solution in official troubleshoot page but can't really figured the cause of the problem.
Starting an external terminal (gnome-terminal) using CtrlAltT is fine.
Also tried to re-install VSCode, removing cache etc. still the same issues. Happens to almost all my Ubuntu computer.
There is a similar fix in Windows https://stackoverflow.com/a/64020049/16346600, but how to do it in Linux? More particularly I can't find this terminal.integrated.shell.linux.
OS: Ubuntu18.04 LTS
VSCode: Version 1.57.1

It seems like VSCode somehow cannot find the path to executable for default profile "bash".
I fix by providing the exact binary path to bash.
Inside settings.json:
"terminal.integrated.profiles.linux": {
"bash": {
"path": "/bin/bash"
},
...
}

Related

selenium-webdriver: The geckodriver executable could not be found on the current PATH

I installed the selenium webdriver using the following command:
$ npm i selenium-webdriver
Then, I created the directory D:\WebDriver\bin (and added the files geckodriver.exe and operadriver.exe to that directory) and added it to the system's PATH variables.
The PATH to the directory that contains both drivers was successfully added, as can be seen below:
$ printenv PATH
/mnt/d/WebDriver/bin/
$ ls "/mnt/d/WebDriver/bin/"
geckodriver.exe operadriver.exe
I am also able to run the geckodriver via cmd.exe (Same applies to operadriver):
C:\Users\user>geckodriver
1621873805268 geckodriver INFO Listening on 127.0.0.1:4444
When I try to run one example file (google_search) via:
/mnt/d/proj/node_modules/selenium-webdriver/example $ node google_search.js
I receive the following stacktrace:
Error: The geckodriver executable could not be found on the current PATH. Please download the latest version from https://github.com/mozilla/geckodriver/releases/ and ensure it can be found on your PATH.
The operadriver also cannot be found when setting up an example that uses the opera driver.
Worth mentioning is that I use a Windows Subsystem for Linux (WSL) and ran the commands (node, printenv and npm) in the terminal of that subsystem. The path variable was set on the Windows system and the required drivers were only installed on the Windows system. I can access the installed files on my windows system via the WSL terminal, but selenium still cannot find the specific driver(s).
When I run the above mentioned test file (google_search.js) from selenium-webdriver on the Windows system, it does find the web driver and works as expected. I still cannot figure out the reason why the driver is not being found in the WSL.
I was able to resolve the problem using the following well written article: https://qxf2.com/blog/setup-linux-testing-environment-on-windows-using-wsl/. By creating symlinks that point to the driver and the web driver executable, the driver and the web browser was found. For now, I do think it's easier to run the tests in cmd.exe, though, as it does not require these additional steps.

electron-updater auto update on linux

i am desperately in need for help. I have been trying this for so long and i got no results at all.
So, my problem is. I am using the electron-updater package to auto update my electron app. It's working on windows but on linux is another story. I have been looking everywhere and i can't find anything about it.
I am using electron-builder integrated with quasar to package my application, and, i did read about it in the documentations, it's only supported by AppImage formats. Okay that's fair, but what should i even do with that? I am using a custom url-schema and it just doesnt work, it doesn't install it anywhere. It just opens my electron app and that's not the behavior i am expecting.
I have tried using AppImage Launcher but i am getting this silly error (which i dont know why it happens), doesn't provide any description about it and i think i will just give up the project for linux (already did for MacOS) too. I have setup the desktop file, set the executable name, indeed it compiles and it installs perfectly on a .deb package, but i just don't know what to do with this .appimage extension.
My linux configuration on electron-builder looks like this (it will be interpreted by quasar)
linux: {
target: "AppImage",
executableName: "portscanner",
desktop: {
Name: "Port Scanner",
"Generic Name": "Port Scanner",
StartupWMClass: "portscanner",
Terminal: false,
Type: "Application",
MimeType: "application/portscanner;x-scheme-handler/portscanner;",
Categories: "Networking"
},
category: "Networking"
}
I will gladly take any help on this. Thank you guys in advance.
Edit:
I took note of the error i got on AppImageLauncher and it's the following:
Error registering AppImage in the system via libappimage
And in the terminal i have this error:
ERROR: appimage_register_in_system : Malformed desktop entry: Unexpected token ENTRY_KEY at line 8
But i have no ENTRY_KEY in my desktop config :/
Edit2:
I fixed it by removing most of the things of the linux desktop file (except for mimetype) but now i am facing this issue in electron-builder which is the following: "APPIMAGE env is not defined, current application is not an AppImage"
I know i have to put the path to the appimage application but which path? The one generated in the dist folder? A path pointing to $HOME? (tried that and didn't work). None of them work btw. I dont know what to do anymore.

PyInstaller on Linux (Ubuntu) -- open executable in console

Running PyInstaller v3.2 on Ubuntu 16.04, is it possible to get my bundled application to open a console for stdout? On Mac and Windows I can get this to work, as outlined in the options documentation. But nothing is mentioned for Linux. I've tried playing around with the -c flag, but that does not seem to have any effect. I also tried bundling it as a single file (-F) versus a directory, but neither seems to open a console for stdout...
Just for future reference, in Linux if you run a bundled app from the command line like a script, it will automatically use that same terminal as stdout ...

ERROR: executing command 'ant' - After installation and setting ANT_HOME

After wrestling with my environment variables to get the proper directory set, I can now get the version with:
C:\Projects\TestProj>ant -version
Apache Ant(TM) version 1.8.4 compiled on May 22 2012
Ant appears to be working:
C:\Projects\TestProj>ant
Buildfile: build.xml does not exist!
Build failed
I still get the error when I try:
C:\Projects\TestProj>cordova -d platform add android
cordova library for "android" already exists. No need to download. Continuing.
Checking if platform "android" passes minimum requirements...
Creating android project...
Running command: C:\Users\Administrator\.cordova\lib\android\cordova\3.4.0\bin\c
reate.bat --cli C:\Projects\TestProj\platforms\android com.company.testproj
TestProj
C:\Users\Administrator\.cordova\lib\android\cordova\3.4.0\bin\node_modules\q\q.j
s:126
throw e;
^
Error: ERROR : executing command 'ant', make sure you have ant installed and add
ed to your path.
From all of the posts that I have read, this is an issue with ANT_HOME, but it appears I have that part of it tackled. Edit I've installed ant 1.9.3 to program files, and bin resides in:
EDIT Changed to just ant, instead of apache-ant-1.9.3-bin\apache-ant-1.9.3
C:\Program Files\ant
Echo home:
C:\Projects\TestProj>echo %ANT_HOME%
C:\Program Files\ant
And of course I have %ANT_HOME%\bin in my path. Any help identifying the issue would be appreciated.
I think the path you use for ANT_HOME is wrong. C:\Users\Administrator\AppData\Roaming\npm\node_modules\ant\ant seems to be the path to the ant npm module but not the ant command.
Ant command more probably is somewhere in program files. In a cmd, run where ant to know where in your path ant is found and use this path for ANT_HOME. (in the folder you should see ant, ant.cmd and ant.bat)
After further investigation, I think your problem is caused half by cordova not correctly checking node errors and half because of registry setting in your computer (a cmd autorun parameter).
You can check answers in those posts for more info:
nodejs child_process exec 'java -version'
Windows CMD.exe "The system cannot find the path specified."
Check if you have a registry key HKCU\Software\Microsoft\Command Processor\AutoRun
after setting the variables, restart your machine. Closing command prompt etc will not help.
Even I was stuck for quite a long time and next day when I started my system, it was working fine :P

unable to connect to chromedriver http://127.0.0.1:46050 (Selenium::WebDriver::Error::WebDriverError)

I get this error when I run my cucumber tests:
"*Unable to either launch or connect to Chrome. Please check that ChromeDriver is up-to-date. Using Chrome binary at: /opt/google/chrome/google-chrome (Selenium::WebDriver::Error::UnknownError)
*"
I downloaded the chromdriver, unzip it, copy it to the path (/opt/google/chrome/google-chrome ) and sudo chmod +x /opt/google/chrome/google-chrome.
which google-chrome : /usr/bin/google-chrome
which chromedriver : /usr/share/ruby-rvm/gems/ruby-1.9.2-p318/bin/chromedriver
capybara (1.1.2)
cucumber (0.9.4)
cucumber-rails (0.3.2)
selenium-webdriver (2.20.0)
I searched my error but none of the answers worked for me!
When I run my test I do not see chrome starts!
I really dont know what is wrong! I tried two different versions of chromedriver!
Jenkins should run/executes my tests in CI.The tests work when you run them but not when Jenkins runs them? I could run them by another user and then I installed jenkins and I get this error. I get the same error when I run my tests in terminal at terminal as well.Did you read https://wiki.jenkins-ci.org/display/JENKINS/My+software+builds+on+my+computer+but+not+on+Jenkins ? I couldnt find much about my problem here. xvfb: I installed the plugin in the jenkins but in the build environment if I click "run xvfb before the build and shut it down after", I get this error: "FATAL: null java.lang.NullPointerException"
Please provide more details. How does this question relate to Jenkins? Is Jenkins executing the tests? The tests work when you run them but not when Jenkins runs them? You do not go so far as to say that out loud, but I will assume it because it is what people usually need help with.
Did you read https://wiki.jenkins-ci.org/display/JENKINS/My+software+builds+on+my+computer+but+not+on+Jenkins ?
If you are executing Chrome inside a Jenkins job, do you have something like https://wiki.jenkins-ci.org/display/JENKINS/Xvfb+Plugin or https://wiki.jenkins-ci.org/display/JENKINS/Xvnc+Plugin installed?
chromedriver can be installed in two ways: downloading, decompressing the zip and putting the file in "/usr/bin" or adding the "chromedriver-helper" gem in your Gemfile.
Choose one or another way because doing both many time it causes problems. If you are installing chromedriver from google, be sure to uninstall the gem:
gem uninstall chromedriver-helper
and be sure chromedriver is in your path:
which chromedriver
Give this a try instead => https://github.com/flavorjones/chromedriver-helper
Finally I found the answer:
if you want to run GUI tests on Jenkins CI running on Windows do not
configure it as a windows service instead run it from the command
prompt or set it up as a scheduled task to run on windows logon using
the command “java -jar jenkins.war”
taken from this article

Resources