-
Notifications
You must be signed in to change notification settings - Fork 45
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
Intermittent ENOENT
#345
Comments
hey @Maxim-Mazurok! thanks for the reporting! This usually happens for reasons not related to lost-pixel execution, when our runner could not open a page, for example, or the page errored by itself. My usual recommendation is to first make sure that the implementation is ok and that nothing breaks when you run your app on CI, and then, by exclusion method, try to figure out what is wrong. If it gets reproducible though - would be super happy to look into that with you and help with the fix! |
Got the same when running locally:
|
Just to clarify on the above message - if you can repro this locally - awesome, please verify that |
Hmm, interesting, but I don't see errors regarding screenshot taking... And on local I do see the screenshot in |
that is interesting indeed! is it always this |
On local it is the same On GHA it was another page - Nothing special about the pages I think... They all are here: https://maxim.mazurok.com/ I might try remove |
Looks like it's related to I did this and it works fine now: import { CustomProjectConfig } from 'lost-pixel';
import { getUrlsFromSitemap } from './src/helpers';
import { readFileSync } from 'fs';
export const config: CustomProjectConfig = {
pageShots: {
pages: getUrlsFromSitemap(readFileSync('./sitemap.xml', 'utf-8')).map(
x => ({
path: x.pathname,
name: (x.pathname.endsWith('/') ? `${x.pathname}index` : x.pathname)
.replace(/\//g, '_')
.replace(/^_/g, ''),
})
),
baseUrl: 'http://172.17.0.1:8080', // this has to be internal IP of the docker container inside of Github Actions
},
generateOnly: true,
failOnDifference: true,
};
|
hmm, great catch! wanna give a proper fix a spin? :D I think you are already pretty much caught the exact problem so fix might not be that complicated 🤔 |
Well, the exact problem is that lost-pixel doesn't work great with folders... So we could either a - replace all I think option b is the best, but I don't have bandwidth for now. I am just annoyed that percy is giving me 1px diff every day, so trying out lost-pixel, if it works well for me I might consider adding folders support, but tbh probably not anytime soon as I don't have many pages for now. Anyway, hope this helps, cheers! |
yup, some legit good thoughts, thanks Maxim! we are happy to help you with your migration from Percy anytime both for personal & work projects 😉 we have bunch of people migrating & the fact that you could choose individual thresholds on per page level is usually helping a ton already with those 1-2px flakiness |
Bug description
During GHA run it couldn't find diff for one of the pages for some reason
How to reproduce
Intermittent, saw it once so far
Expected behavior
No response
Lost Pixel information
lost-pixel logs from CI
The text was updated successfully, but these errors were encountered: