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

SSL error when using WSL prevents browsing the site #57

Closed
Gorthog opened this issue Jan 4, 2023 · 2 comments
Closed

SSL error when using WSL prevents browsing the site #57

Gorthog opened this issue Jan 4, 2023 · 2 comments

Comments

@Gorthog
Copy link

Gorthog commented Jan 4, 2023

Describe the bug

When using WSL, the browser in windows side does not accept the SSL as valid. There is no way to bypass it. The browser refuses to proceed.

Maybe it lacks the CA certificate. If you can explain how I can transfer the CA certificates created by mkcert to windows I believe it would solve the problem. Also, any workaround how to convince the browser to let me continue even if it thinks the site is unsafe could also be acceptable.

Reproduction

in WSL clone
https://github.com/Gorthog/vite-plugin-mkcrt-wsl

start the project with pnpm dev
in windows side browse to the domain dev.cynet.com (you will need to add it to hosts file, pointing to 127.0.0.1). you will see an SSL error

image

System Info

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

  System:
    OS: Linux 5.15 Ubuntu 20.04.3 LTS (Focal Fossa)
    CPU: (24) x64 12th Gen Intel(R) Core(TM) i9-12900K
    Memory: 28.57 GB / 31.23 GB
    Container: Yes
    Shell: 3.5.1 - /usr/bin/fish
  Binaries:
    Node: 16.19.0 - /usr/local/bin/node
    Yarn: 1.22.19 - ~/.yarn/bin/yarn
    npm: 8.19.3 - /usr/local/bin/npm
  npmPackages:
    vite: ^4.0.0 => 4.0.4

Used package manager:
pnpm

Logs

VITE v4.0.4  ready in 222 msLocal:   https://localhost:5174/
    Network: https://172.21.44.205:5174/
    Network: https://172.18.0.1:5174/
    press h to show help
  vite:deps scanning for dependencies... +0ms
  vite:deps Crawling dependencies using entries:
  vite:deps   /home/amir/projects/vite-plugin-mkcrt-wsl/index.html +0ms
  vite:resolve 0.15ms /src/main.tsx -> /home/amir/projects/vite-plugin-mkcrt-wsl/src/main.tsx +0ms
  vite:resolve 1.35ms react -> /home/amir/projects/vite-plugin-mkcrt-wsl/node_modules/.pnpm/react@18.2.0/node_modules/react/index.js +2ms
  vite:resolve 0.50ms react-dom/client -> /home/amir/projects/vite-plugin-mkcrt-wsl/node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/client.js +1ms
  vite:resolve 0.35ms ./App -> /home/amir/projects/vite-plugin-mkcrt-wsl/src/App.tsx +1ms
  vite:deps Scan completed in 18.68ms: {
  react: '/home/amir/projects/vite-plugin-mkcrt-wsl/node_modules/.pnpm/react@18.2.0/node_modules/react/index.js',
  'react-dom/client': '/home/amir/projects/vite-plugin-mkcrt-wsl/node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/client.js'
} +10ms
  vite:deps dependencies found by scanner: react, react-dom/client +23ms
  vite:resolve 0.36ms react-dom -> /home/amir/projects/vite-plugin-mkcrt-wsl/node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/index.js +0ms
  vite:resolve 0.59ms react -> /home/amir/projects/vite-plugin-mkcrt-wsl/node_modules/.pnpm/react@18.2.0/node_modules/react/index.js +3ms
  vite:resolve 0.35ms scheduler -> /home/amir/projects/vite-plugin-mkcrt-wsl/node_modules/.pnpm/scheduler@0.23.0/node_modules/scheduler/index.js +19ms
  vite:deps deps bundled in 47.62ms +50ms

@liuweiGL
Copy link
Owner

liuweiGL commented Jan 6, 2023

This might help you FiloSottile/mkcert#357

@liuweiGL
Copy link
Owner

liuweiGL commented Jan 6, 2023

Or you can manually install the CA in windows side https://github.com/FiloSottile/mkcert#installing-the-ca-on-other-systems

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

2 participants