Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to execute certutil #69

Closed
valentin- opened this issue Jun 6, 2023 · 3 comments
Closed

Failed to execute certutil #69

valentin- opened this issue Jun 6, 2023 · 3 comments

Comments

@valentin-
Copy link

Describe the bug

Hi, running vite throws following error. I'm not sure if this is a local issue or related to the mkcert plugin.

mkcert

As a workaround I renamed /etc/pki/nssdb, run vite and generate the certificates, revert folder renaming.

Did you experience this issue and got a better solution?

Thanks!

Reproduction

System Info

Output of npx envinfo --system --npmPackages vite,vite-plugin-mkcert --binaries --browsers:

System:
    OS: Linux 5.15 Ubuntu 22.04.2 LTS 22.04.2 LTS (Jammy Jellyfish)
    CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz
    Memory: 12.44 GB / 31.08 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 18.16.0 - ~/.nvm/versions/node/v18.16.0/bin/node
    Yarn: 1.22.19 - /usr/bin/yarn
    npm: 9.5.1 - ~/.nvm/versions/node/v18.16.0/bin/npm
  Browsers:
    Chrome: 114.0.5735.90
  npmPackages:
    vite: ^4.3.6 => 4.3.6 
    vite-plugin-mkcert: ^1.15.0 => 1.15.0 

Used package manager:

Logs


@liuweiGL
Copy link
Owner

liuweiGL commented Jun 7, 2023

I have no idea about this,please refer to https://github.com/FiloSottile/mkcert/issues

@janein
Copy link

janein commented Jun 9, 2023

I'm running into the same issue on Ubuntu.

The local CA is already installed in the system trust store! 👍
ERROR: failed to execute "certutil -A -d sql:/etc/pki/nssdb": exit status 255

certutil: function failed: SEC_ERROR_BAD_DATABASE: security library: bad database.


    at ChildProcess.exithandler (node:child_process:419:12)
    at ChildProcess.emit (node:events:513:28)
    at maybeClose (node:internal/child_process:1091:16)
    at ChildProcess._handle.onexit (node:internal/child_process:302:5)

node: 18.16.0
npm: 9.6.7
vite: 4.3.6
vite-plugin-mkcert: 1.15.0

When i try to manually run mkcert -install I get this error:

Created a new local CA 💥
The local CA is now installed in the system trust store! ⚡️
ERROR: failed to execute "certutil -A -d sql:/etc/pki/nssdb": exit status 255

certutil: function failed: SEC_ERROR_BAD_DATABASE: security library: bad database.

So it seems like an issue with mkcert itself.

@janein
Copy link

janein commented Jun 9, 2023

This helped me to get it running: FiloSottile/mkcert#83 (comment)

@liuweiGL liuweiGL closed this as completed Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants