Closed jfuston closed 4 years ago
Hey @jfuston! I haven't seen that error before -- which version of node are you using?
Hey @Robdel12, this project is running on v10.17.0
Gotcha, that should work. I just realized there was an error above it too:
[percy] TypeError Cannot read property 'body' of undefined | Fri Mar 13 2020 16:10:37 GMT-0500 (Central Daylight Time)
Is there any network mocking going on? That error suggests that the DOM snapshot we send from Cypress to our process is empty: https://github.com/percy/percy-cypress/blob/master/lib/index.ts#L17-L39 (body
)
Definitely, we're changing a route or two per test. Mostly small things so we don't have to keep a couple dozen accounts in various configurations laying around in pristine condition. Nothing I'd expect to cause the DOM to be empty though. Are there particular routes Percy uses that you think we may be stepping on with Cypress?
I should add that we're using Cypress' baseUrl to confine it to our app and we're not doing anything crazy with glob matches on routes. We've had success doing similar stubbing in other projects
This might not be within the Cypress SDK. Could you paste the full logs? Does a Percy build ever get created?
Looks like its failing to create a build:
at PercyClient.createBuild (/Users/jfuston/dev/response/node_modules/percy-client/dist/main.js:198:19)
I may have cut you an example after I archived the project in Percy just to make sure I didn't do something wrong there. Let me run another one real quick. What's the location of the full log you're looking for?
Hmm. I'm still seeing that PercyClient.createBuild
line which is curious because the web UI does show a corresponding entry and that it's "Receiving Build"
Yeah, it looks like it's failing here: https://github.com/percy/percy-agent/blob/f58202767e000170e0af9391cc51fd422607d826/src/services/build-service.ts#L15
It might be failing to provide a response because of retry on a first failed request (not 100% sure on the why). But that's the line that's throwing the error π€
Can you tell me which versions of bluebird-retry
& bluebird
your project is resolving to? (yarn why
or npm ls
)
here's the output for those two:
jfuston-MacBook-Pro:response jfuston$ npm ls bluebird-retry
response@0.3.0 /Users/jfuston/dev/response
βββ¬ @percy/cypress@2.3.1
βββ¬ @percy/agent@0.24.3
βββ¬ percy-client@3.6.1
βββ bluebird-retry@0.11.0
jfuston-MacBook-Pro:response jfuston$ npm ls bluebird
response@0.3.0 /Users/jfuston/dev/response
βββ¬ @percy/cypress@2.3.1
β βββ¬ @percy/agent@0.24.3
β βββ¬ percy-client@3.6.1
β βββ UNMET PEER DEPENDENCY bluebird@3.7.2
βββ¬ babel-eslint@4.1.8
β βββ¬ babel-core@5.8.38
β βββ bluebird@2.11.0
βββ bluebird@0.8.1-0
βββ¬ UNMET PEER DEPENDENCY cypress@4.1.0
β βββ bluebird@3.7.2
βββ¬ grunt-emma@2.2.1 (github:emmadev/grunt-emma#d923ea54e5ed5bbeb86bc7440a4d76884d3ca58f)
βββ¬ request-promise@4.2.5
βββ bluebird@3.7.2
Updating that devDependency to bluebird@3.7.2
fixed it. I must've overlooked the output complaining about that when initially installing @percy/cypress
. Thank you for digging through that so quickly!
No problem! The hero here is behind the scenes, @wwilsman. He spotted that and realized the error message here was different from their wiki: https://github.com/petkaantonov/bluebird/wiki/Error:-Catch-filter-must-inherit-from-Error-or-be-a-simple-predicate-function
Whoop! That's good that it's working now π
FWIW, we're going to be getting rid of bluebird in the near future & use native node promises. Hopefully this is no ever a possible issue soon π€
Glad to hear it, I'll keep an eye out for that change! Thanks again for the insane responsiveness.
No problem, glad we could get it sorted π
Hey all, seeing a couple errors upon initial runs that I've not seen in our other projects, wanted to check and see if you could point me in the right direction.
I'm running
percy exec -- cypress run --env configFile=${env} --browser chrome --spec 'cypress/tests/visual/*'
and in the console I get the following but only when the PERCY_TOKEN is present.The tests will run as expected if I don't interrupt the process but it still collects 0 snapshots at the end.
I'm on
"@percy/cypress": "2.3.1",
and"cypress": "4.1.0",
but have tried down to"@percy/cypress": "2.0.0"
and"cypress": "4.0.0"
and still see the same issue.Any ideas?