Closed przemuh closed 4 years ago
Hey @przemuh! Seems like that asset sometimes isn't discovered when we're running asset discovery on the DOM snapshot we capture.
After capturing the DOM (when cy.percySnapshot
is called) we put that DOM into a Puppeteer browser to listen to each network request the page makes. We stop asset discovery after the page has made a zero network requests after 50ms (by default).
It looks like these assets aren't requested before asset discovery is closed. You can increase that window by changing the network-idle-timeout:
# example .percy.yml
version: 1
agent:
asset-discovery:
network-idle-timeout: 250 # ms
Here's our config docs: https://docs.percy.io/docs/sdk-configuration#section-agent
Hi,
Recently I observed that from time to time (random percy builds) there is a problem with missing image assets.
This is a fragment of screenshot taken in percy-build-dashboard:
I use cypress.io as my test-runner. In the test, I'm waiting for resources to be loaded accordingly to this example: (https://github.com/cypress-io/cypress-example-recipes/blob/master/examples/testing-dom__wait-for-resource/cypress/support/index.js).
I serve static files (js, css, images etc.) via simple express server:
How can I fix it? Or how can I debug it deeper?