Troubleshooting

This page lists solutions for common issues reported by community members for the PWA Buildpack project. If you run into any other problems please create an issue or let us know in our Slack channel.

To provide more details for your issue, enable verbose console logging. Instead of yarn start run the following command to set a debugging environment variable:

DEBUG=pwa-buildpack:* yarn start

Paste the result console output into the issue. Thank you!

Common issues

  • Validation errors when running developer mode
  • Venia queries to GraphQL produce validation errors
  • Browser displays “Cannot proxy to “ error and the console displays ENOTFOUND
  • Webpack hangs for a long time before beginning compilation
  • Browser cannot resolve the .local.pwadev site
  • Browser does not trust the generated SSL certificate

Resolutions

Validation errors when running developer mode

Make sure you ran npx @magento/pwa-buildpack create-env-file packages/venia-concept in the root directory. The file that command generates will hold variables for your local development environment.

Venia queries to GraphQL produce validation errors

Venia and its GraphQL queries are out of sync with the schema of the connected Magento instance. Make sure your Magento instance is up to date with the latest from Magento 2.3 development branch.

To test whether your queries are up to date, run the following command in the project root:

yarn run validate-queries

Browser displays “Cannot proxy to “ error and the console displays ENOTFOUND

Make sure your Magento store loads in more than one browser.

If you are running a local DNS server or VPN, add an entry to your hostfile and manually map this domain so NodeJS can resolve it.

Webpack hangs for a long time before beginning compilation

You may have an old version of the pwa-buildpack project. Update your project using the following command:

yarn upgrade

Make sure you have a current version of openssl on your system using the following command:

openssl version

The version should be 1.0 or above (or LibreSSL 2, in the case of OSX High Sierra.)

You can install higher versions of OpenSSL with Homebrew on OSX, Chocolatey on Windows, or your Linux distribution’s package manager.

Browser cannot resolve the .local.pwadev site

Another program or process has edited your host file and removed the entry for your project domain. You can manually edit your hostfile to add the entry back, but you should examine your other installed software to see what has overwritten the previous change.

Browser does not trust the generated SSL certificate

Generating certificates is handled by devcert. It depends on OpenSSL, so make sure you have a current version of openssl on your system using the following command:

openssl version

The version should be 1.0 or above (or LibreSSL 2, in the case of OSX High Sierra.)

You can install higher versions of OpenSSL with Homebrew on OSX, Chocolatey on Windows, or your Linux distribution’s package manager.

If you’re running Linux, make sure that libnss3-tools (or whatever the equivalent is) is installed on your system. Further information provided in this section of the devcert readme.

Some users have suggested deleting the devcert folder to trigger certificate regeneration.

  • For MacOS users, this folder is usually found at:

    ~/Library/Application Support/devcert

  • For Windows users, this folder is usually found at:

    ${User}\AppData\Local\devcert