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
gatsby/devcert https fails: Error: "localhost" is not a valid domain name #25064
Comments
Also for now the solution to use latest gatsby and avoid the issue is to provide the cert and key files using flags this skips devcert. Atleast for me it works and doesn't halt my work. |
Closing as this seems to be a devcert issue that should hopefuly be fixed soon |
For anyone coming to this later, you can also pin |
@ascorbic please reopen, @Js-Brecht pinning devcert to 1.1.0 helped to fix running while running clean install (with removing yarn.lock, .cache and node_modules I see warning from devcert:
rverting gatsby back to 2.23.2 does not help too. |
That still sounds like a devcert error, rather than a problem with Gatsby |
@JustFly1984 that is a
However, all that aside, I still don’t think I’d recommend running You will see the warning about the security vulnerability; no way around that. It’s a feature of the package manager. Version 1.1.1 fixed a potential remote execution exploit, so a warning was placed on 1.1.0... but that’s not really something you would need to worry about when running |
@Js-Brecht we are running gatsby develop -S, cos it is faster than running gatsby build and run webserver to run it with cypress. Currently cypress silently running with dev server with gatsby@2.23.4. devcert rolled back to 1.1.0, and we are installing libnss into github actions ubuntu docker |
I also faced the same issue the steps I did to rectify this are 1 - Created a certificate and key using OpenSSL (For windows machine - https://helpcenter.gsx.com/hc/en-us/articles/115015960428-How-to-Generate-a-Self-Signed-Certificate-and-Private-Key-using-OpenSSL) - The steps will be different for Mac and Linux but the Idea might be same 2 - Copy the Certificate and Key file to the project folder 3 - Then run the command |
Same here on mac 😢 workaround ? |
Have you tried creating pivatekey and certificate then running |
For anybody that wants to use their own self-signed certificate to workaround this issue, there’s been several methods described in #14490. For example, see my comment here. Shouldn’t need the Another way was using An easier workaround is to add a resolution in your {
"resolutions": {
"devcert": "1.1.0"
}
} Only works with Yarn. For PNPM, you’d need to use hooks.readPackage. There’s not really an easy way with npm to add a resolution like that |
awesome @Js-Brecht the resolutions works as expected with yarn 👍 |
|
I am still running into this problem with Gatsby 2.32 and devcert 1.1.3 running ubuntu-latest. Did anyone confirm it's working? |
Getting this issue with Gatsby 4.13.1 |
@NoahDavidATL a new version of devcert was released a couple of days ago, which introduced this issue. You may want to open a new ticket. This could be fixed by pinning the devcert version to |
Hey. As @Js-Brecht said, the error was re-introduced on version 1.21. I was able to fix this issue by pinning devcert to
|
Description
Running
gatsby develop -S
throws the below error.Also found that
devcert
might be the reason why it fails. davewasmer/devcert#56Steps to reproduce
Any version of gatsby >= 2.19.0 fails when the cmd
gatsby develop --https
is run.Expected result
Run
gatsby develop --https
without any error and the https endpoint should be accessible.Actual result
Fails with the above error.
Environment
The text was updated successfully, but these errors were encountered: