Your callback function returned a promise that never resolved.
See original GitHub issueHello there 👋
I’m running Percy orb alongside Cypress orb in CircleCI. However, about 20% of my tests are failing with the following error. It can be resolved simply by removing any reference to cy.percySnapshot.
CypressError:
cy.then()timed out after waiting
4000ms`.
Your callback function returned a promise that never resolved.
The callback function was:
dom => { let domSnapshot = window.PercyDOM.serialize({ …options, dom });
// Post the DOM snapshot to Percy
return utils.postSnapshot({
...options,
environmentInfo: ENV_INFO,
clientInfo: CLIENT_INFO,
domSnapshot,
url: dom.URL,
name
}).then(() => {
// Log the snapshot name on success
cylog(name, { name });
}).catch(error => {
// Handle errors
log.error(`Could not take DOM snapshot "${name}"`);
log.error(error);
});
}`
My CircleCI config file looks like: ` version: 2.1 orbs: node: circleci/node@4.5.1 cypress: cypress-io/cypress@1.28.0 slack: circleci/slack@4.4.2 percy: percy/agent@0.1.3
workflows:
version: 2
commit-workflow:
jobs:
- cypress/run:
name: Smoke Tests
record: true
store_artifacts: true
spec: cypress/integration/E2E/*
command-prefix: npx percy exec –
post-steps:
- store_test_results:
path: test-results
- slack/notify:
channel: general
event: fail
template: basic_fail_1
mentions: ‘@Jac’
- slack/notify:
channel: general
event: pass
template: basic_success_1
mentions: ‘@Jac’
- percy/finalize_all:
requires:
- Smoke Tests
`
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:7 (3 by maintainers)
Top GitHub Comments
Hey @Robdel12 - I see the change was merged to master yesterday, but I’m still getting the same error above. In fact I seem to be getting it every time now?
Hey @JackMunn! This is the same issue as #371 (which will be fixed by https://github.com/percy/cli/pull/400 today). I’ll close this up since it’s a duplicate – we should be shipping that PR pretty soon