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

"Percy agent is not running" in Cypress, 0 snapshots taken #102

Closed
callumacrae opened this issue May 14, 2019 · 2 comments
Closed

"Percy agent is not running" in Cypress, 0 snapshots taken #102

callumacrae opened this issue May 14, 2019 · 2 comments

Comments

@callumacrae
Copy link

callumacrae commented May 14, 2019

Potentially related to #61, but I think it is a different issue.

I'm running my tests inside the percy agent:

[percy] created build #5: https://percy.io/SamKnows/client-dashboard/builds/1872425
[percy] percy has started.

In my tests, I have a cy.percySnapshot(), but it leads to the following output:

image

Then when the agent quits:

[percy] stopping percy...
[percy] waiting for 0 snapshots to complete...
[percy] done.

What's this about? node is definitely installed!

Disabling Cypress web security didn't help.

@Robdel12
Copy link
Contributor

Hey Callum! This looks to be an issue I've been seeing with cy.exec. They use execa under the hood and it doesn't respect your systems $PATH. That error is basically saying it couldn't find node on your system because it's looking in one specific place. Related issue: sindresorhus/execa#153

We use cy.exec to run the health check so we can ensure our node server is open and ready to accept the snapshot POSTs: https://github.com/percy/percy-cypress/blob/master/lib/index.ts#L12-L17

So, the fix here would be to symlink your systems node to where execa is expecting to find it:

$  sudo ln -s $(which node) /usr/bin/node

@callumacrae
Copy link
Author

Ended up using /usr/local/bin/node instead because El Capitan doesn't let you modify /usr/bin, but that worked!

Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants