Shopify/lighthouse-ci-action

Password for product page fails

tommypepsi opened this issue ยท 4 comments

I managed to use lighthouse ci for a live store but now I'm having issues with a password protected dev store.

Home page works fine then it times out trying to get the password input for the product page.

here's the logs:

Getting a new page...
Getting password cookie...
Getting preview cookie...
Running Lighthouse 3 time(s) on https://***/?_fd=0&pb=0
Run #1...done.
Run #2...done.
Run #3...done.
Getting a new page...
Getting password cookie...
TimeoutError: waiting for selector `form[action*=password] input[type="password"]` failed: timeout 30000ms exceeded
    at new WaitTask (/.node/lib/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:509:34)
    at DOMWorld.waitForSelectorInPage (/.node/lib/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:420:26)
    at Object.internalHandler.waitFor (/.node/lib/node_modules/puppeteer/lib/cjs/puppeteer/common/QueryHandler.js:31:77)
    at DOMWorld.waitForSelector (/.node/lib/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:313:29)
    at Frame.waitForSelector (/.node/lib/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:841:51)
    at Page.waitForSelector (/.node/lib/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:2238:33)
    at module.exports (/github/workspace/setPreviewCookies.js:9:16)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async PuppeteerManager.invokePuppeteerScriptForUrl (/.node/lib/node_modules/@lhci/cli/src/collect/puppeteer-manager.js:108:5)

    at async Object.runCommand (/.node/lib/node_modules/@lhci/cli/src/collect/collect.js:240:7)

Oh, that's strage. Why would it work for the homepage but not the product page?

Do you have a custom password page? The puppetteer script assumes that there's a <form action="/password"> on the page with a <input type="password"> password field and the error seems to indicate that it's unable to find that.

Can't guess why it would behave differently starting from the product page. Some kind of redirect?

Would you consent to allow me to inspect your store to debug? If yes, please send me the shop URL by at cp.clermont@shopify.com and I'll take a look.

ah I assumed the password was only for the shopify generated password page! My password page was still blank. Since you mentioned a custom password page I added the a simple password form to my password page and it seems good now!

I guess for the home page it got the shopify password page and for the product page the theme password page.

Thanks!

Hi guys,

Apologies to re-open this.

I'm having the same issue as @tommypepsi on a vanilla Dawn 2.0 development theme

We don't have no custom password page (im assuming you're referring to 'https://shop-name.myshopify.com/password')

This is what it's throwing out:

Getting a new page...
Getting password cookie...
TimeoutError: waiting for selector form[action*=password] input[type="password"] failed: timeout 30000ms exceeded
at new WaitTask (/.node/lib/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:509:34)
at DOMWorld.waitForSelectorInPage (/.node/lib/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:420:26)
at Object.internalHandler.waitFor (/.node/lib/node_modules/puppeteer/lib/cjs/puppeteer/common/QueryHandler.js:31:77)
at DOMWorld.waitForSelector (/.node/lib/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:313:29)
at Frame.waitForSelector (/.node/lib/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:841:51)
at Page.waitForSelector (/.node/lib/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:2238:33)
at module.exports (/github/workspace/setPreviewCookies.js:9:16)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async PuppeteerManager.invokePuppeteerScriptForUrl (/.node/lib/node_modules/@lhci/cli/src/collect/puppeteer-manager.js:108:5)

at async Object.runCommand (/.node/lib/node_modules/@lhci/cli/src/collect/collect.js:240:7)

Any help is appreciated.

Thanks.

Having a similar error, I am working right off a download of clean base Dawn theme following https://shopify.dev/themes/getting-started/create which has a password page, however, the password is not active.

Configuring shopify CLI
Will run Lighthouse CI on https://***
==============================
Creating development theme
{"theme":{"id":128112328866,"name":"Development (a77b97-d351661ce68d)","role":"development","shop":"***","editor_url":"https://***/admin/themes/128112328866/editor","preview_url":"https://***/?preview_theme_id=128112328866"}}
==============================
Configuring Lighthouse CI
==============================
Running Lighthouse CI
โœ…  .lighthouseci/ directory writable
โœ…  Configuration file found
โœ…  Chrome installation found
โœ…  GitHub token set
Healthcheck passed!

Getting a new page...
Getting password cookie...
TimeoutError: waiting for selector `form[action*=password] input[type="password"]` failed: timeout 30000ms exceeded
    at new WaitTask (/.node/lib/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:509:34)
    at DOMWorld.waitForSelectorInPage (/.node/lib/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:420:26)
    at Object.internalHandler.waitFor (/.node/lib/node_modules/puppeteer/lib/cjs/puppeteer/common/QueryHandler.js:31:77)
    at DOMWorld.waitForSelector (/.node/lib/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:313:29)
    at Frame.waitForSelector (/.node/lib/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:841:51)
    at Page.waitForSelector (/.node/lib/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:2238:33)
    at module.exports (/github/workspace/setPreviewCookies.js:9:16)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async PuppeteerManager.invokePuppeteerScriptForUrl (/.node/lib/node_modules/@lhci/cli/src/collect/puppeteer-manager.js:108:5)

    at async Object.runCommand (/.node/lib/node_modules/@lhci/cli/src/collect/collect.js:240:7)