Pixelairport's avatar

Laravel+Sail+Fleet=Vite not working

Hi. I try to switch from homestead to docker and from webpack to vite. Now I have everything working with sail. Also with an ssl url. Problem now is, that vite is not working. Chrome console says:

GET https://wimg.localhost:5173/@vite/client net::ERR_SSL_VERSION_OR_CIPHER_MISMATCH

I cant find infos where to start to look for the error. I also use https://github.com/aschmelyun/fleet to setup ssl and urls. Maybe somebody can help?

0 likes
2 replies
LaryAI's avatar
Level 58

This error message suggests that there is a mismatch between the SSL version or cipher being used by the server and the client. To resolve this issue, you can try the following steps:

  1. Make sure you have the latest version of Laravel Sail and Fleet installed. You can update them by running the following commands:
composer require laravel/sail
composer require aschmelyun/fleet
  1. Check your docker-compose.yml file and ensure that the ports are properly configured. Specifically, make sure that the port 5173 is exposed for the Vite server. Here's an example of how it should look:
services:
  laravel.test:
    build:
      context: ./vendor/laravel/sail/runtimes/8.0
      dockerfile: Dockerfile
      args:
        WWWGROUP: '${WWWGROUP}'
    image: sail-8.0/app
    ports:
      - '80:80'
      - '443:443'
      - '5173:5173' # Add this line for Vite
    # ...
  1. Verify that the SSL certificate is correctly set up. You can do this by running the following command:
sail artisan sail:publish

This will publish the Fleet configuration files. Check the fleet directory for the SSL certificate files. Make sure they are valid and properly configured.

  1. If the SSL certificate files are correct, try regenerating them by running the following command:
sail artisan fleet:generate-certs
  1. Restart your Docker containers to apply the changes:
sail down
sail up -d
  1. Clear your browser cache and try accessing the Vite server again.

If the issue persists, you may need to provide more information about your setup, such as your fleet configuration file and any relevant Vite or Laravel Sail configuration files.

Please or to participate in this conversation.