Cypress / Visual Studio Code / Cypress failed to start - visual-studio-code

I am junior QA Tester, started working with Cypress and IDE Visual Studio, after updating Cypress 5.2.0, I got a strange error like the following:
It looks like this is your first time using Cypress: 5.2.0
✖ Verifying Cypress can run /Users/viktoriiahanke/Library/Caches/Cypress/5.2.0/Cypress.app
→ Cypress Version: 5.2.0
Cypress failed to start.
This is usually caused by a missing library or dependency.
The error below should indicate which dependency is missing.
https://on.cypress.io/required-dependencies
If you are using Docker, we provide containers with all required dependencies installed.
----------
Command was killed with SIGKILL (Forced termination): /Users/viktoriiahanke/Library/Caches/Cypress/5.2.0/Cypress.app/Contents/MacOS/Cypress --no-sandbox --smoke-test --ping=563
----------
Platform: darwin (19.6.0)
Cypress Version: 5.2.0
I have already tried to delete Cypress and install it with npm from the beginning, but Cypress itself is working, when I download it manually , but when I try to start it in console or in Visual Studio Console it is not opening, writing me that I miss dependencies like above.
Did anyone have such problem before?

Run this command in the terminal export NODE_TLS_REJECT_UNAUTHORIZED=0
and then try installing again.

I think it had been updated from a previous version, 3.1.3. Go into cache and delete all versions of cypress then re-install.

Maybe that there are missing some vital folders/files like integration, cypress.json... Try to run the 'npm install' command in the terminal for installing the dependencies.
Also, maybe if you start from an existing project, it will be fine (run npm install command also).

Related

Flutter on a MacBook M1: Unable to get flutterfire_cli to work while setting up a Web App

I'm VERY new to the Mac OS (I'm running macOS Monterey v12.4) on an M1 Macbook Pro.
I have Flutter installed and have built a few sandbox apps with this framework.
I'm trying to build a web application with Flutter and Cloud Firestore and thought it best to use the flutterfire_cli to do some of the configurations but I'm stuck trying to run a specific setup command.
The command that I'm trying to run is "dart pub global activate flutterfire_cli" from a terminal. The output that I get is the following when I run this (the error is at the bottom):
ansi_styles 0.3.2+1s...
args 2.3.1
async 2.9.0
ci 0.1.0
cli_util 0.3.5
collection 1.16.0
dart_console 1.0.0
deep_pick 0.10.0
ffi 1.2.1 (2.0.0 available)
file 6.1.2
flutterfire_cli 0.2.2+2
http 0.13.4
http_parser 4.0.1
interact 2.1.1
json_annotation 4.5.0
matcher 0.12.11
meta 1.8.0
path 1.8.2
petitparser 5.0.0
platform 3.1.0
process 4.2.4
pub_semver 2.1.1
pub_updater 0.2.2
pubspec 2.2.0
quiver 3.1.0
source_span 1.9.0
stack_trace 1.10.0
string_scanner 1.1.1
term_glyph 1.2.0
tint 2.0.0
typed_data 1.3.1
uri 1.0.0
win32 2.6.1 (2.7.0 available)
xml 5.4.1 (6.1.0 available)
yaml 3.1.1
Could not find a file named "pubspec.yaml" in "/Users/myusername/.pub-cache/hosted/pub.dartlang.org/flutterfire_cli-0.2.2+2".
When I try to run the next command according to the documentation here: https://firebase.google.com/docs/flutter/setup?platform=web
That command is "flutterfire configure" from within Android studio
I get the following error: "zsh: command not found: flutterfire"
I'm running node version "v16.15.1" and nvm version "0.39.1" with npm version "8.12.1"
Has anyone run into this?
Thanks!
In your termianl run:
export PATH="$PATH":"$HOME/.pub-cache/bin"
Then try to use flutterfire command in your project directory.
Thanks for that response shuster.
I'm afraid that my environment needed abit more help as there were errors when running several commands. I'll outline the steps I used below to finally get this working.
Steps to resolve the issue
Delete Node and NPM (aka - fresh start)
This post here outlined a straightforward way to do this: https://www.positronx.io/how-to-uninstall-node-js-and-npm-from-macos/
Reinstall node WITHOUT using the 'sudo' command using NVM
Verify that all versions are in place and working for NVM, NODE and NPM - all good
Was still getting issues with the command from Dart to activate the flutterfire_cli "dart pub global activate flutterfire_cli"
I didn't capture the exact error, but there was a complaint about a PUBSPEC.YAML missing
I suspected that something was wrong with my Dart installation or cache, so I decided to try clearing the cache
Repairing the cache using this command "dart pub cache repair" produced a "permissions denied" error on the .pub-cache folder
Cleaning the DART cache using this command "dart pub cache clean" produced the same "permissions denied" error on the same folder
So, I went in and deleted everything in that .pub-cache folder manually
I then went back to the terminal and ran the command "dart pub global activate flutterfire_cli" to try and get Dart into a better place
This worked but I got an error message (basically) stating that the path was wrong for a global command and I needed to run "export PATH="$PATH":"$HOME/.pub-cache/bin"
If I ran that PATH command from the terminal, then the Flutterfire CLI would work for that session only but not work in my IDE (Android Studio) unless I ran that same command again inside the IDE
At this point I knew I was very close and needed to figure out how to get this Mac to keep that setting all the time
After some digging into what this "zsh" thing was, I found a post that explained it very well and was able to make the change permanent https://wpbeaches.com/how-to-add-to-the-shell-path-in-macos-using-terminal/
 
Hope this helps someone - happy coding!

I get this error running PMD from salesforce CLI, "ERROR running scanner:run: Attempted to resolve unregistered dependency token: "RuleManager""

Can anyone help me with this. Im using Mac. I cant find the location of the rulemanager. Please see error below
Lxxxxxxx:pmd-bin-6.34.0 xxxxxx$ sfdx scanner:run pmd --target /usr/src --category rulesets/java/quickstart.xml -f sarif
(node:17810) [editions-autoloader-none-broadened] Error Plugin: sfdx-cli: editions-autoloader-none-broadened: Unable to determine a suitable edition, even after broadening.
module: #oclif/config#1.17.0
task: runHook init
plugin: sfdx-cli
root: /Users/xxxxxxx/.local/share/sfdx/client/7.100.0-9d243d8
See more details with DEBUG=*
(Use node --trace-warnings ... to show where the warning was created)
ERROR running scanner:run: Attempted to resolve unregistered dependency token: "RuleManager"
Kieran, this is an issue that we just discovered. It is related to an incompatibility with the version of Node.js that is bundled with the Salesforce CLI and a library that is used by sfdx-scanner.
A temporary workaround can be found at https://github.com/forcedotcom/sfdx-scanner/issues/412
You will need to use the npm installation instead of the pkg installer since you are interested in the Sarif output. Sarif output was added in version 2.6.0. The issue affects versions 2.6.0-2.8.0 when using the pkg installer on a Mac.
We hope to have a fix rolled out in the next couple of days. I will post here when version 2.9 has been released. Sorry for any inconvenience.
Kieran, this issue has been fixed in version 2.9.1. You can upgrade by executing the following commands in your shell.
sfdx plugins:uninstall #salesforce/sfdx-scanner
sfdx plugins:install #salesforce/sfdx-scanner

Not able to launch chrome in protractor

While launching conf.js file in protractor its giving below error :
ERROR [OsProcess.checkForError] - org.apache.commons.exec.ExecuteException: Execution failed (Exit value: -559038737. Caused by java.io.IOException: Cannot run program "/usr/local/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_87.0.4280.88" (in directory "."): error=86, Bad CPU type in executable)
https://github.com/angular/webdriver-manager/issues/476
Fix will be available soon this weekend. but you will get a workaround by doing this.
As I badly needed to get unblocked - here is a hacky workaround for anyone in similar situation (only for x86_64 macOS). In node_modules/webdriver-manager/built/lib/files/file_manager.js update fileUrl.url around 166:
add below line
fileUrl.url = fileUrl.url.replace(/_m1/, '')
Was facing the similar issue in MacOs Catalina.
This is how it got resolved for me with below versions :
Option 1 :
Download these :
https://chromedriver.storage.googleapis.com/71.0.3578.33/chromedriver_mac64.zip
https://selenium-release.storage.googleapis.com/3.14/selenium-server-standalone-3.14.0.jar
And made the Selenium server UP with this :
java -Dwebdriver.chrome.driver=./chromedriver_71.0.3578.33 -jar ./selenium-server-standalone-3.141.59.jar -port 4444
Option 2 :
Protractor :
Use the below versions :
webdriver-manager update --versions.chrome=71.0.3578.33
webdriver-manager --versions.chrome=71.0.3578.33 start
Got an Error
"Timed out waiting for driver server to start." After running
webdriver-manager update
Resolved it by downgrading to the previous version of webdriver that was working for you.
Steps:
navigate to node_modules/protractor/node_modules/webdriver-manager/selenium/
check if you can see the last chromedriver that you were using before the update
for my case this is chromedriver_86.0.4240.22
since I still have my previous chromedriver, I just Deleted
chromedriver_87.0.4280.88
chromedriver_87.0.4280.88.zip
in node_modules/protractor/node_modules/webdriver-manager/selenium/update-config.json
I changed all instances of chromedriver_87.0.4280.88 and replaced with chromedriver_86.0.4240.22
Run your tests.
Incase you dont know what was the last version that worked for you, you can try
webdriver-manager update --versions.chrome=86.0.4240.22
or look for a version here
This is what worked for me:
Update the protractor version to current stable version: "protractor": "^7.0.0", npm install was the way to go for me, yours will be similar
Update the webdriver: webdriver-manager update with or without sudo is the right command as stated in other answers
Run the webdriver manager with the current chrome version, this is the command that I use for application: webdriver-manager start --versions.chrome=88.0.4324.96 as my chrome is currently at that version, replace it with your chrome's version (87.0.4280.88 as per the question)

Building package glib:x64-osx failed with: BUILD_FAILED

I am trying to install GTK on my Mac (running Catalina) using vcpkg.
I get the following error message on running ./vcpkg install gtk
How can I fix this?
Error: Building package glib:x64-osx failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with .\vcpkg update, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: glib:x64-osx
Vcpkg version: 2019.09.12-unknownhash
Additionally, attach any relevant sections from the log files above.
EDIT
I used --keep-going while running the install command, and it installed all the packages that do not require glib to build.
I've added the log file outputs:
config-x64-osx-dbg-out.log
config-x64-osx-dbg-err.log
CMakeOutput.log

Failed to apply plugin in android studio

I am working on an app its work good. after i apply external plugin that return error Failed to apply plugin .
my build tool version 2.2.3
and compile version 24
Unfortunately, the suggestion of G.K. did not work!
Please run the following command in your terminal:
.gradlew clean --refresh-dependencies
This will grap the newest version of the Calldorado plugin that is causing this error. The newest version has a fix in it.