PWA Studio: browser not trust generated SSL certificate

This article provides a solution to an untrusted, generated SSL certificate warning in your browser when you navigate to a local instance of your PWA Studio storefront during development.

Affected products and versions

PWA Studio for Adobe Commerce

Issue

The browser does not trust the generated SSL certificate of your local PWA Studio storefront.

Cause

Browsing to the dev/staging site.

Solution

In your storefront project, run the command for adding a custom hostname and SSL certificate to your local development instance:

yarn buildpack create-custom-origin ./

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 the equivalent) 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
recommendation-more-help
8bd06ef0-b3d5-4137-b74e-d7b00485808a