Closed esetnik closed 1 year ago
Hey @esetnik 👋
I checked the build and could see the style sheets are being discovered as text/html
instead of text/css
causing it to not load it.
you can verify it on your end by checking --verbose
logs of the CLI for asset discovery browser.
@itsjwala but those paths are not the correct paths to the css files in the iframe. It looks like percy is rewriting the paths for iframed content for some reason to use a relative path on the parent page. This is new behavior as of v1.19.2 (the iframed snapshots are working correctly in real tests as well as in percy v1.18.0 and earlier).
@esetnik
yes we override the parent base URL with our own domain, but the iframe URL for the styles seems to be the same for styles.css
It looks like percy is rewriting the paths for iframed content for some reason to use a relative path on the parent page
We've not changed this behaviour - its the same ref.
The point being that those assets are being discovered as text/html
- can you please share verbose logs in this case for us to debug better?
@esetnik
- yes we override the parent base URL with our own domain, but the iframe URL for the styles seems to be the same for
styles.css
I'm not understanding what you mean by this. Percy is using the domain https://frontend.local.prodigyems.com to resolve those assets but they are actually hosted under https://local.prodigyems.com. See my screenshot above. The url is https://local.prodigyems.com/css/line-icons/style.css
not https://frontend.local.prodigyems.com/css/line-icons/style.css
and they do return the correct content-type
header.
Hey @esetnik
proxyme.percy.io
which we use instead of any localhost domain)
We've not changed this behavior - it's the same ref.
The problem
After upgrading to v1.19.2 the snapshots of iframed content does not render any CSS.
See https://percy.io/283b5e1b/ProdigyEMS/builds/25284757/changed/1410160725?browser=chrome&browser_ids=33%2C34&subcategories=unreviewed%2Cchanges_requested&viewLayout=side-by-side&viewMode=new&width=1280&widths=375%2C1280
Environment
@percy/cli
version: v1.19.2Details
I believe it could be related to #1165
Debug logs
If you are reporting a bug, always include logs! Give the "Debugging SDKs" document a quick read for how to gather logs
Please do not trim or edit these logs, often times there are hints in the full logs that help debug what is going on.
Code to reproduce issue
Given the nature of testing/environment bugs, it’s best to try and isolate the issue in a reproducible repo. This will make it much easier for us to diagnose and fix.