Open Dmitry9 opened 4 years ago
Hm, my first question here is why is the domSnapshot empty? That's a much larger issue 🤔
happens when request.body.domSnapshot is not a typeof Array.
FWIW, we're expecting it to be a string here.
A result of this issue could be to add an error when domSnapshot
is falsey so it's a bit more clear that it's a required property. I could see the possibility that domSnapshot
might be empty or misspelled when starting to create a custom SDK.
Hm, my first question here is why is the domSnapshot empty? That's a much larger issue
happens when request.body.domSnapshot is not a typeof Array.
FWIW, we're expecting it to be a string here.
@Robdel12 Sorry for not verified info is not a typeof Array
. It happens inside CircleCi container so debugging is a bit harder. I updated issue description.
No worries! If domSnapshot
is not present, nothing with Percy will work. I'm curious if you could explain a little more about what's going on/what you're doing?
@Robdel12 I am starting percy with nightwatch:
"test:e2e": "percy exec -- nightwatch -c .circleci/nightwatch.js -e chrome,firefox;",
it connects to selenium/hub -> chrome and firefox processes
it does everything as expected if I manually (with nodejs script replace those two lines in respective to https://github.com/percy/percy-agent/blob/master/src/services/agent-service.ts
js file).
So to avoid this dirty hack with nodejs script I ask to resolve this issue.
Thank you.
@Robdel12 @wwilsman hey guys, I also see this issue while running Percy with nightwatch for firefox. Fix that @Dmitry9 proposed prevents percy to fail and stop executing tests. What are your thoughts on it? Do you still need more info?
If you're getting this error, I'm very curious to know why or what is causing the domSnapshot
string to be null. If that's null, exiting out of that statement will only result in issues later in the process.
@Robdel12 Ok, I will try to collect more informative log of what's happening and will share it with you. By now it only happened while running tests in firefox.
Are there any errors in the Firefox browser console? Seems like there might be a bug in that version of Firefox + the DOM cloning we're doing. That could possibly return null 🤔
@Robdel12 After some additional testing I figured out that this error is introduced not only in firefox, but in chrome as well. I turned on nightwatch logging so here you can check what's going on:
In @percy/nightwatch
:
@Robdel12 I see that @percy/nightwatch@1.1.0
has chromedriver@79.0.0
, not chromedriver@84.0.1
as a dependency as it is in your master
branch on github. Do you plan to release it soon? Probably I'm getting some of these errors because of old chromedriver API.
Unfortunately chromedriver doesn't yet fully support execute
command: https://chromium.googlesource.com/chromium/src/+/master/docs/chromedriver_status.md
There is a javascript error during execution of the
services/agent-service.js
.It happens when
request.body.domSnapshot
is not a typeof Array or String.Please can this line: https://github.com/percy/percy-agent/blob/master/src/services/agent-service.ts#L82
be changed to something like:
Same goes for: https://github.com/percy/percy-agent/blob/master/src/services/agent-service.ts#L120
to
@djones djones FYI