Playwright VSCode gives `No tests found` message - visual-studio-code

I've installed the Playwright vscode extension but when I go to the testing area I get a "No tests have been found in this workspace" message. But when I run $> playwright test on the CLI it works like a charm. The weird thing is, that some time ago it was perfectly working in VSCode.
When I click the reload icon I get
But then after a couple of seconds I get back where I started.
When I click the blue button I go to the list of extension
I'm not very sure what I am suppose to install here. Also, it did work in the past already.
This is the extension I installed for Playwright:
Any suggestion what is going on here in my VSCode?

I had the same issue, the only thing that helps me is VS code update, this extension works only on the latest version on VS code.
tests section

I had the Microsoft extension installed and latest VSCode and got the same message in the Testing panel after using the "Install Playwright" command.
For me it was restarting VSCode completely that made the extension work. Note this was a full app restart and not just the "Developer: Reload Window" command.

Update Node on your system to the latest and it will resolve it. I had the same issue and by updating node, Vs Code immidiately detected all the test files and it works like a charm.

Check that you're using a supported version of playwright.
In the "details" section, the extention I have installed says
This extension works with Playwright Test version v1.19+ or newer.
I was using Playwright version 1.17, and faced this same issue. Updating to use version 1.19 fixed it.

I had the same issue with Playwright version 1.26.0
I actually had a github issue open
https://github.com/microsoft/playwright/issues/17687
Updating to Playwright version 1.26.1 solved the problem and tests were found once again.

I've had the same issue with a vs code which has been installed on a ubuntu box using the "ubuntu software" installer. This only installs snaps, which probably caused the issue. First I uninstalled the snap and deleted the .vscode folder in the users home directory.
After using apt for installation ( as explained here https://linuxize.com/post/how-to-install-visual-studio-code-on-ubuntu-20-04/ ), the playwright plugin worked without any issues.

Please update your Playwright version (Version 1.28.1 at the time of this post) to the latest, (Steps below),
First Check your current version
npx #playwright/test --version
Update to the latest version
npm install #playwright/test#latest
Install Browsers
npx playwright install
Check the updated version
npx #playwright/test --version
And also install/update the latest version of the Playwright Test for VSCode (v1.0.1 at the time of this post) and reload the IDE.
This can be done by simply as follows,
Go to Extensions
Search for "Playwright Test for VSCode"
Update or install the given latest version
It Worked for me.

I had the same issue when trying to use existing tests and the latest available version of VSCode and NodeJS just installed on my PC. It that the issue is in the lock files (yarn.lock and parameters-lock.json) contained conflicting requirements, I left only those files that already were with the tests and everything immediately worked after clicking the "update tests" button.

Related

Please upgrade your Copilot extension to continue using this service

Today I tried to use the copilot, but suddenly this error start appearing:
[INFO] [fetch] [2022-05-19T21:00:55.452Z] Please upgrade your Copilot extension to continue using this service.
I tried to uninstall and install again and reload, but nothing happens, anyone have any idea how to solve this problem?
There's an error description in the image below:
This can be resolved by upgrading VSCode itself: Help → Check for Updates / Install Available Updates.
You may or may not need to re-install the extension and re-authenticate with git.
Reference: https://github.com/github/feedback/discussions/15684
In my case (on a mac) I had to do the following:
Move Visual Studio Code from Downloads to Applications
Restart
Update Visual Studio Code
Sign into Github
Open extensions and locate Github CoPilot
Click "Reload Required"
As #emragins suggested, go to Help and check for updates/restart to update
Once you are back on VS Code check if the Co-pilot is activated.
If it is not activated/still gives the same error.
Search for co-pilot in VS Code extensions search
Click on co-pilot extension in the search results, you should see restart/reload required.
Reload and it should be working now. If not try closing VS Code and opening it now.
You should uninstall the extension and download the latest version from this page in the form of VSIX file. After that you can install the extension from that VSIX file.
I think it is because there is some API changes and the latest version of the extension. However, it is still marked as preview. When we click on install from the built-in extension browser, it just install the latest stable version.
https://marketplace.visualstudio.com/items?itemName=GitHub.copilot
if you are on a linux device, update your vscode first then update your co pilot extension it will work.

VS Code - pylint is not running

I have a workspace setup in VS Code where I do python development. I have linting enabled, pylint enabled as the provider, and lint on save enabled, but I continue to see no errors in the Problems panel. When I run pylint via the command line in the virtual environment i see a bunch of issues - so I know pylint works. I am also using black formatting(on save) which works without issue. I have tried using both the default pylint path as well as updating it manually to the exact location and still no results. When I look at the Output panel for python it looks like pylint is never even running (i.e. I see the commands for black running there but nothing for pylint).
My pylint version is 2.4.4 and VS Code version 1.46
Any idea how to get this working?
This is due to a bug in the newer version of python extension see here.
For now you can either wait for the fix to arrive, use jedi language server or install previous version of the extension
Add
"python.linting.enabled" : true
"python.linting.lintOnSave" : true
to your settings.json
Uninstall Python Extension
Reinstall Python Extension
And with that there will will be one more extension of "Python Extension" named - "PYLANCE" don't forget to install that too.
Reload VS Code
DONE !!

Vs code blank terminal problem, can't enter anything

I'm user using Visual Studio code.
A few days ago, I've gone through some problems.
It's about "blank terminal". I'm not sure what trigger this problem.
I guess it's related with vs code updated 1.39 version. I attached the picture below.
enter image description here
I've tried searching solution in order to solve this problem. but I failed.
1. remove the 1.39 version. and re install vscode. (remove vscode file)
- sudo apt remove vscode, sudo apt autoremove
- I searched .vscode and then remove all( some setting file left.)
2. I tried to install vscode by snap, but result was same.
3. I started with root
- sudo code --user-data-dir => teminal is possible to see but environments not working => fail
4. I tried down grade.
- version 38,37 => failed (it's same result)
- version 32 => success (but it's old version, limited several utilities)
**Ubuntu 18.04.3 LTS , 64 bit
Anyone having same problems and working out, Please tell some methods.
I look forward to getting reply. Thanks.
Setting "terminal.integrated.inheritEnv" to true in settings.json solved this problem for me.
I think it is related to this bug
You need to select a default shell. Where it says 1:, click the down arrow and select your shell.
I was running into this issue with vscode that was installed through the ubuntu software center
I uninstalled it and deleted any settings using this https://superuser.com/questions/1113022/how-do-i-remove-vs-code-settings-from-ubuntu
I then installed through anaconda since I was already using it. This install worked fine.

VSCode with Python Extension April 2019 - "Python Extension Loading..."

I am unable to get Python extension working with fresh install of VS Code / Python 3.7.3 on Windows 10.
VS Code status bar shows a message 'Python extension loading...' continuously.
Python is installed in a non-standard path at c:\Programs\Python\Python37-32\python
Have uninstalled both VSCode and python several times and had installed afresh.
C:\WINDOWS\system32>which python
/c/Programs/Python/Python37-32/python
When developer tools is opened, the following error shows up in console.
property 'length' of undefined
at g.update (c:\Users\APCIT\.vscode\extensions\ms-python.python-2019.4.11987\out\client\extension.js:83:373818)
at g.initialize (c:\Users\APCIT\.vscode\extensions\ms-python.python-2019.4.11987\out\client\extension.js:83:381134)
at new g (c:\Users\APCIT\.vscode\extensions\ms-python.python-2019.4.11987\out\client\extension.js:83:372522)
at Function.getInstance (c:\Users\APCIT\.vscode\extensions\ms-python.python-2019.4.11987\out\client\extension.js:83:372729)
at h.getSettings (c:\Users\APCIT\.vscode\extensions\ms-python.python-2019.4.11987\out\client\extension.js:83:370264)
at b.initialize (c:\Users\APCIT\.vscode\extensions\ms-python.python-2019.4.11987\out\client\extension.js:83:624877)
at c:\Users\APCIT\.vscode\extensions\ms-python.python-2019.4.11987\out\client\extension.js:9:93210
at c:\Users\APCIT\.vscode\extensions\ms-python.python-2019.4.11987\out\client\extension.js:9:93877
at module.exports.t.activate (c:\Users\APCIT\.vscode\extensions\ms-python.python-2019.4.11987\out\client\extension.js:9:96601)
at Function._callActivateOptional (c:\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:719:166)
at Function._callActivate (c:\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:718:872)
at define._doActivateExtension.Promise.all.then.e (c:\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:718:79)
(Posted solution on behalf of the question author).
OK - I deleted the VS Code profile folder
'%APPDATA%\Roaming\Code
and installed fresh extension along with miniconda, and it is working fine.
This seems to be an annoying problem that is caused by other extensions. Best way I fixed mine was:
To disable all the extensions
Enable ms-python extension
Reload vs-code and voila, it's all fixed
I also had this problem. But I fixed it by changing the location of the python file.

VSCode - TypeScript language service died unexpectedly 5 times in the last 5 minutes

This error message keeps sliding down from the top every few seconds. I click on the close button and it comes back again. I am not and don't plan on using TypeScript in any of my projects.
Is there a way to "silent" this warning message?
Is there a way to change the frequency that the warnings slide down on the screen?
This is happening in VSCode 1.8.1 and 1.9 on Windows 10 and Windows 8.
I work on TypeScript for VSCode.
The TypeScript language service powers language features for both TypeScript and JavaScript code. Without it, you do not get any suggestions or intellisense or any other nice language support.
Please open an issue against VSCode if you are seeing this error. You can also try upgrading the version of TypeScript that VS Code uses to pick up the latest fixes and features: https://code.visualstudio.com/Docs/languages/typescript#_using-newer-typescript-versions
(I'm also looking into a better way to handle this message since it can be very spammy when the TypeScript service crashes continually)
I resolve my problem by use this way:
first, open your typescript.tsserver.log to "verbose"
restart vscode, and open ts log
and you will find when make your tsserver so slow, as for me, jest_cache is the problem. so I add a exclude in my tsconfig.json
restart, and the problem solve.
I the same problem with VSCode using a workspace Yarn and Typescript. After a couple months without a solution, I tried updating the Yarn VSCode SDK using yarn dlx #yarnpkg/sdks vscode as part of these instructions and that fixed my problem.
you can try to install this vscode extension to make vscode use latest typescript version
To people getting here using WSL2 & Ubuntu(?)
rm -rf ./vscode-server worked for me
Disabling the "JavaScript and TypeScript Nightly" extension worked for me.
The error always said that the workspace was using an old verison of typescript and that I should upgrade although I was up to date. It looks the workspace was using the latest dev build of typescript because of the extension or something like that maybe caused the error.
For a temprary solution you need to rollback to an older version. In my case it worked with: https://code.visualstudio.com/updates/v1_39.
upgrading to TypeScript v3.7.3 and using VSCode Insider's Edition seems to fix the issue for me.
There are multiple ways to upgrade. One way is:
yarn add -D typescript#3.7.3
https://github.com/microsoft/vscode/issues/84618#issuecomment-562290275
Here is my solution which I spent 1 week.
Fallback version to Version: 1.61.2 (Universal)
Rmove your local VsCode totaly.
quit it
remove it from your Application folder
remove the file ~/.vscode
rm -rf ~/.vscode
Install the vsCode v1.61.2 and open it;
Close the aoto update. it's important
find the menu Code > preferences > settings
search keyword of update
set Application/Update/update > mode > none
Open your ts project
Hope help you
took me a few confusing days, as it kept trying to default to 16.8 which I had not installed via nvm
I installed and un-installed 16.8, set the default and system aliases (always alias to a version number without any letters ['v']
Finally I found a posting that said, no matter what you have installed for nvm MacOS will always use the system Node if there is one.
So: brew uninstall node got rid of a version that I didn't was on my mac... I've been using nvm for many years, so I don't know how it got there. Perhaps it came in as a dependency...
Since I use nvm, and always want the typescript support I pinned it to a particular version of node that I know has typescript installed globally
tsdk: /Users/ajoslin/.nvm/versions/node/v16.14.0/lib/node_modules/typescript/lib/
In my case, I didn't have the typescript compiler (tsc) installed on my system. So npm install -g typescript resolve my problem.