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
sanitizeHtml
in src/sanitizer.js is causing visual diff JS errors (started with prod push)
#13351
Comments
/cc @choumx |
The root cause of this bug isn't clear, so let's disable the test for now. |
Thanks for finding this. |
Ah shoot, this is caused by a new user error introduced in #13176. |
Timing most likely related to the 1% to prod promotion today: https://github.com/ampproject/amphtml/releases/tag/1517876307637 Remind me if our visual diffing is supposed to use prod binaries? |
@choumx It's supposed to use local binaries with the I'm making some wholesale changes to the visual diff infra as we speak and will investigate, but meanwhile, let's disable the failing test while we investigate. SG? |
@choumx I just ran See https://gist.github.com/rsimha-amp/04cbc1581e3c593d29f5538422afbed8 I'm puzzled about why a prod push would cause this local test to start failing. Could it be just because we apply the /cc @erwinmombay (Edited for correctness) |
From your link it appears that the served JS is also local.
|
Yeah, I'm puzzled. Could one or more of the components be internally relying on prod URLs? |
Here's a theory: src/sanitizer.js uses |
sanitizeHtml
in src/sanitizer.js is causing visual diff JS errors (started with prod push)
To help you debug, here are the |
/cc @dvoytenko who wrote this visual test |
I don't think that's it. That The error complains that the following is invalid:
This is technically true. These classes are added during an AMP custom element's lifecycle (before buildCallback, obviously). However this shouldn't happen since elements that live in a What browser do we run again? Some WebKit derivative right? |
Yeah, we use PhantomJS. See the link under https://github.com/ampproject/amphtml/blob/master/contributing/DEVELOPING.md#visual-diff-tests. I guess there are two questions to answer:
|
@choumx I've just switched the visual tests from phantomJS to headless chrome. |
@choumx With #13404, question 1 in #13351 (comment) is moot. I'll leave it to you to decide if question 2 is worth investigating. |
This issue hasn't been updated in awhile. @choumx Do you have any updates? |
(2) was solved by fixing a bug in our tooling. |
See discussion at #13333 (comment)
This started failing on master with this error:
The text was updated successfully, but these errors were encountered: