Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoke binary directly warning showing always from `cypress verify` (debug mode) #6101

Open
tohjustin opened this issue Jan 6, 2020 · 2 comments

Comments

@tohjustin
Copy link

@tohjustin tohjustin commented Jan 6, 2020

While trying to debug an issue w/ cypress verify getting stuck occasionally (related #6082), I'm getting the following stdout message from running cypress verify in debug mode (via DEBUG=cypress:* yarn cypress verify)

"It looks like you are running the Cypress binary directly. This is not the recommended approach, and Cypress may not work correctly."

Is this is an expected output from the smoke-test?

Current behavior:

❯ DEBUG=cypress:* npx cypress@latest verify
  cypress:cli installing Cypress from NPM +0ms
  cypress:cli installing with options {} +0ms
  cypress:cli version in package.json is 3.8.1 +1ms
  cypress:cli Reading binary package.json from: /Users/*********/Library/Caches/Cypress/3.8.1/Cypress.app/Contents/Resources/app/package.json +0ms
  cypress:cli no binary installed under cli version +4ms
  cypress:cli checking local file /Users/*********/.npm/_npx/47203/lib/3.8.1 cwd /Users/*********/.npm/_npx/47203/lib/node_modules/cypress +0ms
  cypress:cli preparing to download and unzip version  3.8.1 to path /Users/*********/Library/Caches/Cypress/3.8.1 +0ms
  cypress:cli needed Cypress version: 3.8.1 +0ms
  cypress:cli source url https://download.cypress.io/desktop/3.8.1?platform=darwin&arch=x64 +0ms
  cypress:cli downloading cypress.zip to "/var/folders/ds/cwtxfpmd76z4r_g__8r94tbc0000gn/T/cypress.zip" +0ms
  cypress:cli Downloading package { url:
   'https://download.cypress.io/desktop/3.8.1?platform=darwin&arch=x64',
  proxy: null,
  downloadDestination:
   '/var/folders/ds/cwtxfpmd76z4r_g__8r94tbc0000gn/T/cypress.zip' } +1ms
  cypress:cli redirect version: 3.8.1 +341ms
  cypress:cli expected checksum 64ba19b0fe70e5b4eda6dad53c16a8de0234a09871462c510f8e44e5226e5bf17bcbbb87051117aba114bca0f1e875be3ebe1331d4376e8c9f30dac9e11c3c5e +136ms
  cypress:cli expected file size 167102535 +0ms
  cypress:cli downloading finished +6s
  cypress:cli verifying checksum and file size +1ms
  cypress:cli downloaded file has the expected checksum and size ✅ +505ms
  cypress:cli finished downloading file: /var/folders/ds/cwtxfpmd76z4r_g__8r94tbc0000gn/T/cypress.zip +7s
  cypress:cli:unzip unzipping from /var/folders/ds/cwtxfpmd76z4r_g__8r94tbc0000gn/T/cypress.zip +0ms
  cypress:cli:unzip into /Users/*********/Library/Caches/Cypress/3.8.1 +0ms
  cypress:cli:unzip zipFile entries count 40147 +7ms
  cypress:cli:unzip unzipping via `ditto` +0ms
  cypress:cli:unzip unzip completed { yauzlMs: 7, unzipMs: 26116 } +26s
  cypress:cli removing zip file /var/folders/ds/cwtxfpmd76z4r_g__8r94tbc0000gn/T/cypress.zip +26s
  cypress:cli finished installation in /Users/*********/Library/Caches/Cypress/3.8.1 +17ms
  cypress:cli:cli cli starts with arguments ["/usr/local/bin/node","/Users/*********/.npm/_npx/47203/bin/cypress","verify"] +0ms
  cypress:cli NODE_OPTIONS is not set +0ms
  cypress:cli:cli program parsing arguments +3ms
  cypress:cli parsed cli options {} +3ms
  cypress:cli verifying Cypress app +0ms
  cypress:cli checking environment variables +1ms
  cypress:cli checking if executable exists /Users/*********/Library/Caches/Cypress/3.8.1/Cypress.app/Contents/MacOS/Cypress +2ms
  cypress:cli Binary is executable? : true +1ms
  cypress:cli binaryDir is  /Users/*********/Library/Caches/Cypress/3.8.1/Cypress.app +0ms
  cypress:cli Reading binary package.json from: /Users/*********/Library/Caches/Cypress/3.8.1/Cypress.app/Contents/Resources/app/package.json +0ms
  cypress:cli Found binary version 3.8.1 installed in: /Users/*********/Library/Caches/Cypress/3.8.1/Cypress.app +3ms
  cypress:cli could not read binary_state.json file +3ms
  cypress:cli {} +0ms
  cypress:cli is Verified ? undefined +1ms
  cypress:cli force verify +0ms
  cypress:cli running binary verification check 3.8.1 +0ms
It looks like this is your first time using Cypress: 3.8.1
  cypress:cli clearing out the verified version +3ms
  cypress:cli needs Xvfb? false +0ms
  cypress:cli spawning, should retry on display problem? false +1ms
  cypress:cli disabling Electron sandbox +0ms
  cypress:cli running smoke test +0ms
  cypress:cli using Cypress executable /Users/*********/Library/Caches/Cypress/3.8.1/Cypress.app/Contents/MacOS/Cypress +0ms
  cypress:cli smoke test command: /Users/*********/Library/Caches/Cypress/3.8.1/Cypress.app/Contents/MacOS/Cypress --no-sandbox --smoke-test --ping=965 +0ms
  cypress:cli smoke test timeout 30000 ms +0ms
 ⠴  Verifying Cypress can run /Users/*********/Library/Caches/Cypress/3.8.1/Cypress.app
  cypress:cli smoke test stdout "It looks like you are running the Cypress binary directly.

This is not the recommended approach, and Cypress may not work correctly.

Please install the 'cypress' NPM package and follow the instructions here:

https://on.cypress.io/installing-cypress
965" +2s
  cypress:cli write verified: true +1ms
 ✔  Verified Cypress! /Users/*********/Library/Caches/Cypress/3.8.1/Cypress.app

Desired behavior:

I did a little digging myself & here what I've found:

Based on the findings above, I "believe" this is what's happening under the hood:

(From what I've seen so far, seems like this is the intended behaviour & it's harmless since the verify task succeeded.)

Steps to reproduce:

  1. Open a terminal
  2. Run DEBUG=cypress:* npx cypress@latest verify (getting the same output if one were to run DEBUG=cypress:* yarn cypress verify in their project directory)

Versions

Node@LTS (v12.14.0)
Cypress@latest (v3.8.1)
macOS High Sierra (v10.13.6)

@tohjustin tohjustin changed the title Weird output in cypress verify in debug mode Weird output from `cypress verify` (debug mode) Jan 6, 2020
@jennifer-shehane

This comment has been minimized.

Copy link
Member

@jennifer-shehane jennifer-shehane commented Jan 7, 2020

Yeah, this message is harmless, but nonetheless confusing in this context. We shouldn't show this message when we know we are running our own smoke test.

@jennifer-shehane jennifer-shehane changed the title Weird output from `cypress verify` (debug mode) Invoke binary directly warning showing always from `cypress verify` (debug mode) Jan 7, 2020
@tohjustin

This comment has been minimized.

Copy link
Author

@tohjustin tohjustin commented Jan 7, 2020

Okay, thanks for clarifying this! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.