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

fix: Workaround for domTransformation error caused by empty document #234

Merged
merged 1 commit into from
Sep 21, 2020

Conversation

krasnoukhov
Copy link
Contributor

I'm not exactly sure why but domTransformation function is called 2 times for a single percySnapshot call. First time it's called with an empty <html><body> document so hoistAppDom fails with message like:

ERROR: Could not transform the dom: TypeError: Cannot read property 'innerHTML' of null

This is actually visible in the test log of this very project, for example this build (expand "Percy Test"): https://github.com/percy/ember-percy/runs/1055338113

Maybe there's a better fix for this but I'd really like to get rid of those annoying error logs 😅

@krasnoukhov
Copy link
Contributor Author

Whoops, looks like GH actions does not allow me to run a build with a real PERCY_TOKEN, but I just tried this in our app and the log message is gone, and percy build looks fine as well.

@Robdel12
Copy link
Contributor

Ah, right, thanks for this PR! 🎉 😀

@Robdel12 Robdel12 merged commit c1dc06b into percy:master Sep 21, 2020
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

Successfully merging this pull request may close these issues.

None yet

2 participants