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

Can't start server - "Expected majorVersion to be a string or positive number" #5961

Closed
adworacz opened this issue Dec 14, 2019 · 11 comments
Closed

Comments

@adworacz
Copy link

Possibly related to? #5068

Current behavior:

Command: npx cypress open

cypress.json

{
    "baseUrl": "http://localhost:3000"
}

integration/home_page_spec.ts

describe('The Home Page', function() {
  it('successfully loads', function() {
    cy.visit('/')
  })
})

Result:
Screenshot from 2019-12-13 17-00-34

Desired behavior:

For Cypress to open without error, in order to run my tests.

Steps to reproduce: (app code and test code)

  1. Run Linux (Ubuntu 18.04.3 LTS)
  2. npm install -D cypress @bahmutov/add-typescript-to-cypress eslint-plugin-cypress
  3. npx cypress open

Versions

Cypress version: 3.8.0
Ubuntu 18.04.3

apt show chromium-browser

Package: chromium-browser
Version: 78.0.3904.70-0ubuntu0.18.04.2
@bahmutov
Copy link
Contributor

bahmutov commented Dec 14, 2019 via email

@adworacz
Copy link
Author

adworacz commented Dec 14, 2019

chromium-browser --version
Chromium 78.0.3904.70 Built on Ubuntu , running on Ubuntu 18.04

@bahmutov
Copy link
Contributor

bahmutov commented Dec 14, 2019 via email

@adworacz
Copy link
Author

u662b1ab6f1175f % chromium-browser --version
Chromium hook launcher starting up
run-parts: executing /usr/lib/company/chrome-hooks/00company-chrome-certs
Notice: Trust flag u is set automatically if the private key is present.
Notice: Trust flag u is set automatically if the private key is present.
Notice: Trust flag u is set automatically if the private key is present.
Notice: Trust flag u is set automatically if the private key is present.
Notice: Trust flag u is set automatically if the private key is present.
Notice: Trust flag u is set automatically if the private key is present.
Notice: Trust flag u is set automatically if the private key is present.
Notice: Trust flag u is set automatically if the private key is present.
Notice: Trust flag u is set automatically if the private key is present.
Notice: Trust flag u is set automatically if the private key is present.
Notice: Trust flag u is set automatically if the private key is present.
Notice: Trust flag u is set automatically if the private key is present.
Notice: Trust flag u is set automatically if the private key is present.
Notice: Trust flag u is set automatically if the private key is present.
Notice: Trust flag u is set automatically if the private key is present.
Notice: Trust flag u is set automatically if the private key is present.
Chromium hook launcher finished
Using PPAPI flash.
Chromium 78.0.3904.70 Built on Ubuntu , running on Ubuntu 18.04

@bahmutov
Copy link
Contributor

bahmutov commented Dec 14, 2019 via email

@adworacz
Copy link
Author

adworacz commented Dec 14, 2019

Hmmm, I'll give that a shot, presumably following the example here:
https://github.com/cypress-io/cypress-example-electron/blob/master/cypress/plugins/index.js

Will have to be careful about doing this though, since I'm going to be sharing this configuration with my team, which is running a combination of Linux/Windows/Mac laptops, and I can't just blow away "good" configuration.

Update: Ah, this is even better documentation: https://docs.cypress.io/api/plugins/configuration-api.html#Customize-available-browsers

@bahmutov
Copy link
Contributor

bahmutov commented Dec 14, 2019 via email

@adworacz
Copy link
Author

Ok if this is the case just for your setup you can add an alias or shell script with Chrome name that just returns the version string to be parsed.

Sent from my iPhone
On Dec 13, 2019, at 20:40, Austin Dworaczyk Wiltshire @.***> wrote:  Hmmm, I'll give that a shot, presumably following the example here: https://github.com/cypress-io/cypress-example-electron/blob/master/cypress/plugins/index.js Will have to be careful about doing this though, since I'm going to be sharing this configuration with my team, which is running a combination of Linux/Windows/Mac laptops, and I can't just blow away "good" configuration. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

Hmm okay, thank you for the suggestion, I'll give that a shot.

@jennifer-shehane
Copy link
Member

@bahmutov is there any action that should be taken in Cypress code to handle this? Trying to followup on the status of this issue.

@jennifer-shehane jennifer-shehane added stage: needs information Not enough info to reproduce the issue browser: chrome labels Dec 16, 2019
@adworacz
Copy link
Author

Solution:
Since my company appeared to write a wrapper around my chromium-browser binary, I manually edited the wrapper (which was a simple Bash script), and removed the use of the words "Chromium" for their custom status messages.

Example:

echo "Chromium hook blah blah"
...custom logic...
echo "Chromium hook foo foo"
/path/to/real/chromium-browser

Becomes

echo "Company hook blah blah"
...custom logic...
echo "Company hook foo foo"
/path/to/real/chromium-browser

You can consider this resolved from my end. I leave the decision up to the developers to decide if they want to improve the version parsing code to handle this use case better.

@bahmutov
Copy link
Contributor

Nice, thank you @adworacz for fixing this, yeah we really expect the plain browser version - this is how we plan to detect the browser and display it, thus we need the right text. Since this is so rare, I will close this for now. If more people hit this problem, we could revisit it

@jennifer-shehane jennifer-shehane removed the stage: needs information Not enough info to reproduce the issue label Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants