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

How to refresh the localhost https certificate? #15947

Closed
DevinKott opened this issue Jul 21, 2019 · 7 comments
Closed

How to refresh the localhost https certificate? #15947

DevinKott opened this issue Jul 21, 2019 · 7 comments
Labels
stale? Issue that may be closed soon due to the original author not responding any more. type: question or discussion Issue discussing or asking a question about Gatsby

Comments

@DevinKott
Copy link

Summary

I tried following the gatsbyjs local https guide here, but I got an error while setting it up. Now, when I try running npm run develop -- --https, it does not start because of the error
UNHANDLED REJECTION request to https://localhost:8000/___graphql failed, reason: unable to verify the first certificate

Relevant information

When trying to set up local https, I put in the wrong sudo password a couple of times, and exited the process. Now it's automatically trying to generate certificates on the fly that are wrong and the building/running fails every time.

Environment (if relevant)

File contents (if changed)

package.json: N/A
"start": "npm run develop -- --https",

The solution here worked, but firefox/chrome said it was a security risk to visit the localhost website. How can i reset it and try setting up https again?

@gatsbot gatsbot bot added the type: question or discussion Issue discussing or asking a question about Gatsby label Jul 21, 2019
@karolis-sh
Copy link

karolis-sh commented Aug 2, 2019

I'm using the --https development option and the same issue occurs.

After upgrading from "gatsby": "^2.8.2", to "gatsby": "^2.13.50", the develop command fails:

UNHANDLED REJECTION request to https://localhost:8000/___graphql failed, reason: unable to verify the first certificate



  FetchError: request to https://localhost:8000/___graphql failed, reason: unable to verify the first certificate

  - index.js:1455 ClientRequest.<anonymous>
    [locker-web]/[node-fetch]/lib/index.js:1455:11

  - destroy.js:82 emitErrorNT
    internal/streams/destroy.js:82:8

  - destroy.js:50 emitErrorAndCloseNT
    internal/streams/destroy.js:50:3

  - next_tick.js:63 process._tickCallback
    internal/process/next_tick.js:63:19

@karolis-sh
Copy link

For now my workaround is NODE_TLS_REJECT_UNAUTHORIZED=0 gatsby develop --https

@geoffdavis92
Copy link

Would also like to see this looked at. Ran the --https command without sudo, now unable to setup a (truly secure) HTTPS connection through Gatsby.

One thing that would be helpful– and I may be able to help with this– is to present a warning on the local-https docs page to indicate users should maybe first try this using sudo before they run it? At least until this bug is resolved.

@Bulletninja
Copy link

Bulletninja commented Aug 31, 2019

I simply ran gatsby develop --https for the first time in a new project and got a similar error.

TypeError: Cannot read property 'replace' of undefined
  
  - develop.js:367 module.exports
    [suscribela]/[gatsby]/dist/commands/develop.js:367:42
  
  
  - next_tick.js:189 process._tickCallback
    internal/process/next_tick.js:189:7

@gatsbot
Copy link

gatsbot bot commented Sep 21, 2019

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.

If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@gatsbot gatsbot bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Sep 21, 2019
@calsal8
Copy link

calsal8 commented Sep 23, 2019

Do not stale, please.

@gatsbot
Copy link

gatsbot bot commented Oct 4, 2019

Hey again!

It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it.

Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to reopen this issue or create a new one if you need anything else.

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks again for being part of the Gatsby community!

@gatsbot gatsbot bot closed this as completed Oct 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale? Issue that may be closed soon due to the original author not responding any more. type: question or discussion Issue discussing or asking a question about Gatsby
Projects
None yet
Development

No branches or pull requests

5 participants