[GH-ISSUE #129] mkcert ruined my localhost:8080 #73

Closed
opened 2026-02-25 22:32:32 +03:00 by kerem · 18 comments
Owner

Originally created by @tr1s on GitHub (Feb 5, 2019).
Original GitHub issue: https://github.com/FiloSottile/mkcert/issues/129

I had to run these commands in order to get slate to work, it never worked... Then I found some hacks in the github issues of slate, it finally worked by creating some keys in my project.

Now when I run webpack-dev-server on my own personal projects using my boilerplate, localhost:8080 doesn't work anymore, none of them do. I tried doing mkcert install and mkcert localhost and it created my keys, but still nothing.. I get this below.

cleanshot 2019-02-05 at 11 51 43 2x

How do I get things back to normal? I don't want all these extra steps just to run my personal projects. All I had to do before was type "npm start" and everything was ready to go. Ever since me setting up one slate project everything else is ruined so far.

Any ideas? How can I fix this?

Originally created by @tr1s on GitHub (Feb 5, 2019). Original GitHub issue: https://github.com/FiloSottile/mkcert/issues/129 I had to run [these commands](https://shopify.github.io/slate/docs/create-a-self-signed-ssl-certificate) in order to get [slate](https://shopify.github.io/slate/docs/create-a-self-signed-ssl-certificate) to work, it never worked... Then I found some hacks in the github issues of slate, it finally worked by creating some keys in my project. Now when I run webpack-dev-server on my own personal projects using my [boilerplate](https://github.com/tr1s/tris-webpack-boilerplate), localhost:8080 doesn't work anymore, none of them do. I tried doing mkcert install and mkcert localhost and it created my keys, but still nothing.. I get this below. <img width="1680" alt="cleanshot 2019-02-05 at 11 51 43 2x" src="https://user-images.githubusercontent.com/19172250/52289637-6cb3a580-293c-11e9-8048-a67e24b68d49.png"> How do I get things back to normal? I don't want all these extra steps just to run my personal projects. All I had to do before was type "npm start" and everything was ready to go. Ever since me setting up _one_ slate project everything else is ruined so far. Any ideas? How can I fix this?
kerem 2026-02-25 22:32:32 +03:00
Author
Owner

@FiloSottile commented on GitHub (Feb 5, 2019):

ERR_SSL_PROTOCOL_ERROR suggests that the issue has nothing to do with the certificate and key that mkcert generates, but is a problem with whatever HTTPS/TLS implementation you are using.

<!-- gh-comment-id:460742553 --> @FiloSottile commented on GitHub (Feb 5, 2019): ERR_SSL_PROTOCOL_ERROR suggests that the issue has nothing to do with the certificate and key that mkcert generates, but is a problem with whatever HTTPS/TLS implementation you are using.
Author
Owner

@tr1s commented on GitHub (Feb 5, 2019):

@FiloSottile so what do I do about this?

I know for a fact that everything was fine before I brew installed mkcert and set up this slate project. I can't even get my static freelance projects running right now. I didn't change any code whatsoever in my other projects. How do I revert back from all this?

<!-- gh-comment-id:460752228 --> @tr1s commented on GitHub (Feb 5, 2019): @FiloSottile so what do I do about this? I know for a fact that everything was fine before I brew installed mkcert and set up this slate project. I can't even get my static freelance projects running right now. I didn't change any code whatsoever in my other projects. How do I revert back from all this?
Author
Owner

@FiloSottile commented on GitHub (Feb 5, 2019):

I'm sorry to hear this, but it sounds like it worked before you started using HTTPS and TLS, so you have to find out what software you are using for HTTPS and TLS and what the issue with it is. mkcert does not run any code after generating the certificate and key files.

<!-- gh-comment-id:460759415 --> @FiloSottile commented on GitHub (Feb 5, 2019): I'm sorry to hear this, but it sounds like it worked before you started using HTTPS and TLS, so you have to find out what software you are using for HTTPS and TLS and what the issue with it is. mkcert does not run any code after generating the certificate and key files.
Author
Owner

@tr1s commented on GitHub (Feb 5, 2019):

@FiloSottile Can you give me some sort of direction?

I created a webpack boilerplate, I used webpack cli/webpack-dev-server, I run npm start and everything works as it should. I have no extra software that's making me use HTTPS/TLS. I just made a config and everything worked.

Now that I have mkcert nothing works. I don't really know what you're telling me here about extra software. There is no extra software. Nothing I'm trying is fixing this so far

<!-- gh-comment-id:460787698 --> @tr1s commented on GitHub (Feb 5, 2019): @FiloSottile Can you give me some sort of direction? I created a webpack boilerplate, I used webpack cli/webpack-dev-server, I run npm start and everything works as it should. I have no extra software that's making me use HTTPS/TLS. I just made a config and everything worked. Now that I have mkcert nothing works. I don't really know what you're telling me here about extra software. There is no extra software. Nothing I'm trying is fixing this so far
Author
Owner

@FiloSottile commented on GitHub (Feb 5, 2019):

I know next to nothing about the Node.js ecosystem, but I assume you did not just run mkcert, you probably also changed some options to tell your server to load the certificate mkcert created. That's the HTTPS code that would be having issues.

(If not, have you tried loading http://localhost:8080 instead of https://?)

<!-- gh-comment-id:460796051 --> @FiloSottile commented on GitHub (Feb 5, 2019): I know next to nothing about the Node.js ecosystem, but I assume you did not just run mkcert, you probably also changed some options to tell your server to load the certificate mkcert created. That's the HTTPS code that would be having issues. (If not, have you tried loading http://localhost:8080 instead of https://?)
Author
Owner

@tr1s commented on GitHub (Feb 5, 2019):

I went through my command history and I think these two got the slate project to work. Does that mean anything to you?

I went through the install process from the mkcert docs recently to try and override it but nothing happens. Http just get's forced to https to answer your question.

cleanshot 2019-02-05 at 16 08 03 2x cleanshot 2019-02-05 at 16 08 16 2x cleanshot 2019-02-05 at 16 10 15 2x
<!-- gh-comment-id:460804908 --> @tr1s commented on GitHub (Feb 5, 2019): I went through my command history and I think these two got the slate project to work. Does that mean anything to you? I went through the install process from the mkcert docs recently to try and override it but nothing happens. Http just get's forced to https to answer your question. <img width="654" alt="cleanshot 2019-02-05 at 16 08 03 2x" src="https://user-images.githubusercontent.com/19172250/52304265-56b7dc00-2960-11e9-9337-8ef0c30873e5.png"> <img width="726" alt="cleanshot 2019-02-05 at 16 08 16 2x" src="https://user-images.githubusercontent.com/19172250/52304268-57e90900-2960-11e9-854c-608a6e67fefe.png"> <img width="428" alt="cleanshot 2019-02-05 at 16 10 15 2x" src="https://user-images.githubusercontent.com/19172250/52304353-91ba0f80-2960-11e9-9cea-acfc06c5fa09.png">
Author
Owner

@tr1s commented on GitHub (Feb 5, 2019):

cleanshot 2019-02-05 at 16 12 25 2x
<!-- gh-comment-id:460805621 --> @tr1s commented on GitHub (Feb 5, 2019): <img width="1197" alt="cleanshot 2019-02-05 at 16 12 25 2x" src="https://user-images.githubusercontent.com/19172250/52304491-de054f80-2960-11e9-99ae-39d93b5c483d.png">
Author
Owner

@tr1s commented on GitHub (Feb 5, 2019):

@FiloSottile is there a way I can fully revert this and delete anything and everything mkcert created? I need to abandon this slate project so I can fix everything else asap.

<!-- gh-comment-id:460808767 --> @tr1s commented on GitHub (Feb 5, 2019): @FiloSottile is there a way I can fully revert this and delete anything and everything mkcert created? I need to abandon this slate project so I can fix everything else asap.
Author
Owner

@tr1s commented on GitHub (Feb 6, 2019):

Feel free to close this. I had to recover my mac from the day before this happened.

<!-- gh-comment-id:460902462 --> @tr1s commented on GitHub (Feb 6, 2019): Feel free to close this. I had to recover my mac from the day before this happened.
Author
Owner

@FiloSottile commented on GitHub (Feb 8, 2019):

I'm sorry to hear that. If you have further problems with HTTPS aside from the certificate itself, it looks like the name of the project you need to open an issue in is "Slate".

<!-- gh-comment-id:461673727 --> @FiloSottile commented on GitHub (Feb 8, 2019): I'm sorry to hear that. If you have further problems with HTTPS aside from the certificate itself, it looks like the name of the project you need to open an issue in is "Slate".
Author
Owner

@skywinston commented on GitHub (Apr 10, 2019):

The solution to this problem can be found here:
https://github.com/Shopify/slate/issues/726#issuecomment-431372434

<!-- gh-comment-id:481784147 --> @skywinston commented on GitHub (Apr 10, 2019): The solution to this problem can be found here: https://github.com/Shopify/slate/issues/726#issuecomment-431372434
Author
Owner

@saurabhsethi1102 commented on GitHub (Nov 26, 2020):

You can always use a private window to route to http://localhost

<!-- gh-comment-id:734372014 --> @saurabhsethi1102 commented on GitHub (Nov 26, 2020): You can always use a private window to route to http://localhost
Author
Owner

@iulianalbu commented on GitHub (Jul 22, 2021):

@saurabhsethi1102 Yea, your idea it's working, but for Postman not.

@tr1s I manage to fixed this issue

  • I removed all related stuff to mkcert using https://github.com/FiloSottile/mkcert/issues/208
  • I searched for mkcert inside my Keychain Access and delete all the things related to mkcert
  • I sync all my Chrome data with my account and after that I reset Chrome to the default values and after I connected with my account and all things were working
<!-- gh-comment-id:884879882 --> @iulianalbu commented on GitHub (Jul 22, 2021): @saurabhsethi1102 Yea, your idea it's working, but for Postman not. @tr1s I manage to fixed this issue - I removed all related stuff to mkcert using https://github.com/FiloSottile/mkcert/issues/208 - I searched for _mkcert_ inside my **Keychain Access** and delete all the things related to _mkcert_ - I **sync all my Chrome data with my account** and after that **I reset Chrome to the default values** and after I connected with my account and all things were working
Author
Owner

@Drjacky commented on GitHub (Feb 18, 2024):

Same here! Working with Ktor, and after this, it fixed my issue; I could see the Welcome page. Then I installed mkcert and it ruined my setup! Uninstalling all the certs it created and itself didn't help either

Unfortunately this is no an option for me:

I had to recover my mac from the day before this happened.

<!-- gh-comment-id:1951372735 --> @Drjacky commented on GitHub (Feb 18, 2024): Same here! Working with Ktor, and after [this](https://youtrack.jetbrains.com/issue/KTOR-2858/Getting-error-ktor.application-Failed-to-decode-request-on-newly-created-ktor-project-with-the-latest-idea-eap2.1.2.4416.7#focus=Comments-27-9170877.0-0), it fixed my issue; I could see the Welcome page. Then I installed mkcert and it ruined my setup! [Uninstalling all the certs it created and itself](https://github.com/FiloSottile/mkcert/issues/208#issuecomment-541457624) didn't help either Unfortunately this is no an option for me: > I had to recover my mac from the day before this happened.
Author
Owner

@Drjacky commented on GitHub (Feb 18, 2024):

Same here! Working with Ktor, and after this, it fixed my issue; I could see the Welcome page. Then I installed mkcert and it ruined my setup! Uninstalling all the certs it created and itself didn't help either

Unfortunately this is no an option for me:

I had to recover my mac from the day before this happened.

In this case, you need to define a new port; not sure where and how, but the ruined address(locahost) and port is cached!

<!-- gh-comment-id:1951373875 --> @Drjacky commented on GitHub (Feb 18, 2024): > Same here! Working with Ktor, and after [this](https://youtrack.jetbrains.com/issue/KTOR-2858/Getting-error-ktor.application-Failed-to-decode-request-on-newly-created-ktor-project-with-the-latest-idea-eap2.1.2.4416.7#focus=Comments-27-9170877.0-0), it fixed my issue; I could see the Welcome page. Then I installed mkcert and it ruined my setup! [Uninstalling all the certs it created and itself](https://github.com/FiloSottile/mkcert/issues/208#issuecomment-541457624) didn't help either > > Unfortunately this is no an option for me: > > > I had to recover my mac from the day before this happened. In this case, you need to define a new port; not sure where and how, but the ruined address(locahost) and port is cached!
Author
Owner

@raul-rtl commented on GitHub (Feb 28, 2024):

same here, after installing mkcert it ruined my setup, I tried iulianalbu solution but not success

<!-- gh-comment-id:1968862168 --> @raul-rtl commented on GitHub (Feb 28, 2024): same here, after installing mkcert it ruined my setup, I tried [iulianalbu](https://github.com/iulianalbu) solution but not success
Author
Owner

@Jeffxz commented on GitHub (Apr 11, 2024):

This helped me on chrome https://stackoverflow.com/questions/25277457/google-chrome-redirecting-localhost-to-https
What I did was enter chrome://net-internals/#hsts, query for "localhost", if there is any hit then delete "localhost" and it worked for me.

<!-- gh-comment-id:2050028302 --> @Jeffxz commented on GitHub (Apr 11, 2024): This helped me on chrome https://stackoverflow.com/questions/25277457/google-chrome-redirecting-localhost-to-https What I did was enter `chrome://net-internals/#hsts`, query for "localhost", if there is any hit then delete "localhost" and it worked for me.
Author
Owner

@MisterDr commented on GitHub (Aug 16, 2024):

In my case solution was rather simple. Since I am using VSCode and it has ugly habit to forward the ports on whatever it sees at the console, I simply removed forwarded ports. Double check to see if anything else is listening on your development port.

<!-- gh-comment-id:2293141771 --> @MisterDr commented on GitHub (Aug 16, 2024): In my case solution was rather simple. Since I am using VSCode and it has ugly habit to forward the ports on whatever it sees at the console, I simply removed forwarded ports. Double check to see if anything else is listening on your development port.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/mkcert#73
No description provided.