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

CircleCI Route Stub Unknown Failure #3013

Closed
joshmedeski opened this issue Dec 27, 2018 · 6 comments
Closed

CircleCI Route Stub Unknown Failure #3013

joshmedeski opened this issue Dec 27, 2018 · 6 comments
Labels
CI General issues involving running in a CI provider

Comments

@joshmedeski
Copy link

Current behavior:

A very specific stubbed route is erroring out ONLY in the CircleCI environment.

Desired behavior:

Stubbed routes should work as expected.

Steps to reproduce: (app code and test code)

  it('should show an error message if the email is invalid', () => {
    cy.route({
      method: 'POST',
      url: '/users/password/email',
      response: 'fixture:users-password-email-post-422-email-invalid.json',
      status: 422
    }).as('usersPasswordEmailPostEmailInvalid');
    cy.get('input[name=email]').type('nobody');
    cy.get('button[type=submit]').click();
    cy.wait('@usersPasswordEmailPostEmailInvalid');
    cy.contains('Invalid email format').should('be.visible');
  });

Running the test in CircleCI gives the following error:
screen shot 2018-12-27 at 2 50 34 pm
screen shot 2018-12-27 at 2 50 44 pm

I can confirm that this test works exactly as expected in the develompent environment, it is consistently failing in the CircleCI environment.

I'm unable to view the whole error log in the video and it's not stored in the NPM logs or Cypress run CLI output, please help!

Versions

  • Cypress 3.1.4
  • CircleCI using the cypress/base:10 docker image
@jennifer-shehane
Copy link
Member

jennifer-shehane commented Dec 28, 2018

What does the CLI output print for this test when it fails? Can you copy/paste?

Also, can you try to run the test locally with cypress open and select Electron from the dropdown of browsers and run it in there. Make sure to have your console open in DevTools to catch any errors. When run in CI, cypress runs from the Electron browser, so this may help you replicate the issue locally.

screen shot 2018-12-28 at 2 08 02 pm

@jennifer-shehane jennifer-shehane added the stage: needs information Not enough info to reproduce the issue label Dec 28, 2018
@joshmedeski
Copy link
Author

joshmedeski commented Dec 28, 2018

I tried running the test with Electron and it passed on my machine locally 🙁

Here is the output of the failre in the CircleCI's CLI output at the bottom of the Cypress run command:

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! app-raven-com@0.0.0 cy:run: `cypress run --reporter junit --reporter-options "mochaFile=test-results/cypress/results.xml,toConsole=false"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the app-raven-com@0.0.0 cy:run script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-12-27T20_55_03_425Z-debug.log
{ Error: Command failed: npm run cy:run
    at makeError (/tmp/app.raven.com/node_modules/start-server-and-test/node_modules/execa/index.js:174:9)
    at Promise.all.then.arr (/tmp/app.raven.com/node_modules/start-server-and-test/node_modules/execa/index.js:278:16)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  code: 1,
  stdout: null,
  stderr: null,
  failed: true,
  signal: null,
  cmd: 'npm run cy:run',
  timedOut: false,
  killed: false }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! app-raven-com@0.0.0 cy:ci: `start-server-and-test ci:serve http-get://localhost:4200 cy:run`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the app-raven-com@0.0.0 cy:ci script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-12-27T20_55_03_445Z-debug.log
Exited with code 1

I already investigated the npm logs generated and there is nothing useful there, just more vague error messages like the one shown.

@jennifer-shehane
Copy link
Member

I see you are using the start-server-and-test module. Could you provide what you are running in the CircleCI job concerning this? Or print your CircleCI config file (excluding any sensitive data).

@jennifer-shehane
Copy link
Member

Hey @joshmedeski, any update on this?

@joshmedeski
Copy link
Author

My team moved away from using fixtures and we now use a local version of our API with seeded data. So we don't have to deal with this specific issue anymore.

@jennifer-shehane
Copy link
Member

Unfortunately we have to close this issue as there is not enough information to reproduce the problem.

Please comment in this issue with a reproducible example and we will reopen the issue. 🙏

@jennifer-shehane jennifer-shehane removed the stage: needs information Not enough info to reproduce the issue label Apr 24, 2019
@jennifer-shehane jennifer-shehane added CI General issues involving running in a CI provider and removed CI: circle labels Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI General issues involving running in a CI provider
Projects
None yet
Development

No branches or pull requests

2 participants