Shopify / lighthouse-ci-action

MIT License
101 stars 50 forks source link

Can't get URL to work #24

Closed brightonmike closed 3 years ago

brightonmike commented 3 years ago

Hello.

Puppeteer keeps throwing an error:

Error: net::ERR_NAME_NOT_RESOLVED at https://***/password

We just have a standard setup with Dawn theme so I can't figure out what's wrong. The Shop secret is entered as a full URL. Any ideas?

charlespwd commented 3 years ago

If you want to debug, this doesn't really need to be a secret. It's more so that you can change it without requiring code changes. You could inline the URL in the GitHub action and see what's wrong.

This error means that the DNS request didn't succeed. So it can't find an IP address for the domain in your secret. Special characters maybe? Leading space or trailing space?

brightonmike commented 3 years ago

So I've given that a try, but now I get a different error. URL obfuscated.

Configuring shopify CLI
Will run Lighthouse CI on https://***.myshopify.com
==============================
Creating development theme
✗ Please login again with shopify login
==============================
Configuring Lighthouse CI
==============================
Running Lighthouse CI
✅  .lighthouseci/ directory writable
✅  Configuration file found
✅  Chrome installation found
⚠️   GitHub token not set
Healthcheck passed!

Getting a new page...
Getting password cookie...
Getting preview cookie...
Error: Protocol error (Page.navigate): Cannot navigate to invalid URL

It's an odd one as the https is clearly in place.

brightonmike commented 3 years ago

This part of the docs is confusing and might be the source of the issue: https://github.com/Shopify/lighthouse-ci-action#authentication

The variable called App ID, it's very unclear where this is sourced from. I've tried using various numbers within URLs such as when you edit the theme but with no success.

It's odd to me to see the login error. This suggests something isn't configured right but I can't see what's wrong.

brightonmike commented 3 years ago

Eventually figured it out - needed to create a private app and then use HTTP auth. Followed this guide: https://shopify.dev/apps/auth/basic-http