We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I first run a desktop test, wich works fine, but when I want to start a second test for mobile I get this error:
file:///C:/Users/benny/work/lighthouse/node_modules/unctx/dist/index.mjs:6 throw new Error("Context conflict"); ^ Error: Context conflict
Any way to prevent this error or is it a bug?
export async function performTest(site, urls, device = 'desktop') { return new Promise(async (resolve, reject) => { const unlighthouse = await createUnlighthouse({ site, urls, lighthouseOptions: { onlyCategories: ['performance', 'best-practices', 'accessibility', 'seo', 'pwa'], }, puppeteerOptions: { args: ["--no-sandbox"], headless: true // headless works best, }, server: { open: false }, /* puppeteerCluster: { concurrency: 'CONCURRENCY_BROWSER', // which mode to use maxConcurrency: 1, },*/ output: { json: true, // output json html: global.isDev // output html }, debug: global.isDev, // output debug info cache: false, // disable caching of results scanner: { dynamicSampling: false, // no dynamic sampling maxRoutes: 100000, // max number of routes to scan samples: 1, // number of samples to take, higher does not work correctly currently crawler: false, // enable the crawler robotsTxt: false, // don't respect robots.txt sitemap: false, // don't respect sitemap.xml, skipJavascript: false, // don't skip javascript // exclude all pdfs and amp pages /* exclude: [ '/.*?pdf', '.*!/amp', /!* 'en-*',*!/ ],*/ // use desktop to scan device: device, // enable the throttling mode, good for getting more consistent results throttle: !global.isDev, }, chrome: { useSystem: false // use the bundled chrome, } }, { name: 'unlighthouse-provider-' + device, }); const two_min = 2000 * 60; const timeOut = two_min + (urls.length * two_min); const timeout = setTimeout(() => { console.error('Maximum Timeout reached!'); reject('Maximum Timeout reached!'); }, timeOut); const {hooks} = unlighthouse; // listen to the worker-finished event hooks.hook('worker-finished', () => { console.log('All sites for ' + device + ' tested!'); clearTimeout(timeout); resolve(); }); console.log('starting unlighthouse for', device); await unlighthouse.start(); // start the unlighthouse process, will not wait for it to finish, use hooks instead }); }
No response
The text was updated successfully, but these errors were encountered:
@harlan-zw
Sorry, something went wrong.
No branches or pull requests
Describe the bug
I first run a desktop test, wich works fine, but when I want to start a second test for mobile I get this error:
Any way to prevent this error or is it a bug?
Reproduction
System / Nuxt Info
No response
The text was updated successfully, but these errors were encountered: