inovector / mixpost

Mixpost - Self-hosted social media management software (Buffer alternative)
https://mixpost.app
MIT License
905 stars 145 forks source link

Docker Desktop, Secure Connection Failed, can't login. #56

Closed benninkcorien closed 11 months ago

benninkcorien commented 11 months ago

Steps to reproduce the problem

  1. Create docker-compose.yml

    APP_NAME: 'Mixpost'
    APP_KEY: base64:YpTeTwYqv11B4aXRjkMYC3rW5Nz+SXa2PmWygeRsXTQ=
    APP_URL: localhost/mixpost
    ports:
        - 9432:80 
    mysql:
        image: 'mysql/mysql-server:8.0'
        ports:
            - '3307:3306' #3306 already taken by ..something.
  2. docker-compose up -d

  3. go to https://localhost:9432/mixpost/

I see the login screen, and enter the default Email: admin@example.com Password: changeme

And then firefox/chrome throws an error that I can't ignore:

Secure Connection Failed An error occurred during a connection to localhost:9432. SSL received a record that exceeded the maximum permissible length. Error code: SSL_ERROR_RX_RECORD_TOO_LONG The page you are trying to view cannot be shown because the authenticity of the received data could not be verified. Please contact the website owners to inform them of this problem.

If I try to add localhost:9432 to the Server/certificate exceptions in firefox, it looks like no certificate is being sent at all?

image

There are no errors in the Docker Desktop console, only some messages that everything in RUNNING, and some occasional messages that Redis is running in the background.

Expected behaviour

Login with default credentials

Actual behaviour

SSL error

Detailed description

Secure Connection Failed An error occurred during a connection to localhost:9432. SSL received a record that exceeded the maximum permissible length. Error code: SSL_ERROR_RX_RECORD_TOO_LONG The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.

Can't get past the login screen.

Specifications

Mixpost 1.3.1 Firefox 116.0b8 (64-bit) Docker Desktop 4.21.1 Windows 11

lao9s commented 11 months ago

@benninkcorien

Don't open your ip with HTTPS, open it with HTTP.

http://localhost:9432/mixpost

benninkcorien commented 11 months ago

Thanks! But that's the problem, it's forcing HTTPS and then failing to get a cert (I think?). I can get to the login screen over HTTP, but when I click the login button it switches to HTTPS

lao9s commented 11 months ago

@benninkcorien maybe it's your browser cache/history?

Have you tried another browser? or try http://127.0.0.1:9432

lao9s commented 11 months ago

And check your APP_URL, you must have the same URL that you access in the browser. You should have this: APP_URL=http://127.0.0.1:9432

benninkcorien commented 11 months ago

I've tried Chrome and Firefox.

Also tried all options for

APP_URL: localhost/mixpost

with http/https and nothing in front of it.

I'll reinstall composer/laravel/ dependencies, see if that fixes things.

benninkcorien commented 11 months ago

Upgraded composer. Ditched Docker.

php artisan serve

Everything's running nicely now, thanks!

venkateshreddy5353 commented 9 months ago

@lao9s it doesn't mean, we should ignore the main error of docker image being redirected to HTTPS although APP_URL has been given as http://some_ip, I am facing this issue too.

I am able to access the application using http://some_ip but when I hit login(post entering credentials), it's redirecting to https://some_ip and fails there.

lao9s commented 9 months ago

@venkateshreddy5353 in the docker image, when you put HTTP in your APP_URL, will not redirect to HTTPS.