liuweiGL / vite-plugin-mkcert

Provide certificates for vite's https dev service.
https://www.npmjs.com/package/vite-plugin-mkcert
MIT License
585 stars 38 forks source link

Certutil command not recognized on macOS monterey #25

Closed yann-combarnous closed 7 months ago

yann-combarnous commented 2 years ago

Describe the bug

Error installing certificates in Firefox on Macos Monterey.

Reproduction

I configured mkcert plugin per your instructions page.

When running Vite, I get the following message:

The local CA is already installed in the system trust store! 👍
ERROR: failed to execute "certutil -A -d sql:/Users/xxx/Library/Application Support/Firefox/Profiles/8a781ibv.default-release": exit status 1

certutil: Command line utility for listing and cleaning certificates from Keychain (Version 4.1)

   Usage:
   certutil -list <name>           List all certificates with <name> in CN
   certutil -list_exp <name>       List all expired certificates with <name> in CN
   certutil -verify <name>         List and verify all certificates with <name> in CN
   certutil -delete <name>         Delete all certificates except the most recent one with <name> in CN
   certutil -delete_exp <name>     Delete all expired certificates with <name> in CN
   certutil -count <name>          Count all certificates with <name> in CN
   certutil -count_exp <name>      Count all expired certificates with <name> in CN

System Info

Output of npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers:

  System:
    OS: macOS 12.1
    CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
    Memory: 235.52 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.13.2 - /usr/local/opt/node@16/bin/node
    Yarn: 3.2.0 - /usr/local/opt/node@16/bin/yarn
    npm: 8.1.2 - /usr/local/opt/node@16/bin/npm
    Watchman: 2022.01.10.00 - /usr/local/bin/watchman
  Browsers:
    Chrome: 98.0.4758.102
    Edge: 99.0.1150.55
    Firefox: 98.0.1
    Safari: 15.2
  npmPackages:
    vite: 2.9.5 => 2.9.5 

Yarn 3.2

liuweiGL commented 2 years ago

May be related to this issue https://github.com/FiloSottile/mkcert/issues/326

Simonl9l commented 1 year ago

@liuweiGL & @yann-combarnous I just ran into this too...with Ventura

I built the mkcert locally brew install --build-from-source mkcert can then did a cp /opt/homebrew/bin/mkcert /Users/{user profile}/.vite-plugin-mkcert/ and all worked from there.

Hint was from here