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

[Bug Report] Download Manager gives "Socket connection failed" on Safari using reverse proxy and live queue updates don't work #344

Open
melyux opened this issue Jan 23, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@melyux
Copy link

melyux commented Jan 23, 2023

Describe the bug
Using the example nginx reverse proxy settings in the Wiki, the Download Manager page gives the red error "Socket connection failed" at the top. Because of this, live queue updates don't work.

image

The console gives the following error when this happens:

[Error] WebSocket connection to 'wss://***.com/api/admin/mangadex/queue' failed: There was a bad response from the server.
[Warning] [blocked] The page at https://***.com/admin/downloads was not allowed to run insecure content from ws://***.com/api/admin/mangadex/queue. (download-manager.js, line 1)

When using without reverse proxy, no error shows up and live queue updates work, but the console gives a different error:

[Error] WebSocket connection to 'wss://xxx.local:9000/api/admin/mangadex/queue' failed: An SSL error has occurred and a secure connection to the server cannot be made.

Using Chromium, no error shows up with the reverse proxy, but live queue updates don't work and the console gives these messages:

download-manager.js:1 WebSocket connection to 'wss://xxx.com/api/admin/mangadex/queue' failed: 
wsConnect @ download-manager.js:1
download-manager.js:1 Mixed Content: The page at 'https://xxx.com/admin/downloads' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://xxx.com/api/admin/mangadex/queue'. This request has been blocked; this endpoint must be available over WSS.
wsConnect @ download-manager.js:1
download-manager.js:1 Uncaught DOMException: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.
    at Proxy.wsConnect (https://xxx.com/js/download-manager.js:1:307)
    at ws.onclose (https://xxx.com/js/download-manager.js:1:460)

To Reproduce
Steps to reproduce the behavior:

  1. Set up nginx reverse proxy with the settings in the wiki
  2. Use Safari to go to the Download Manager through the reverse proxy
  3. See error

Expected behavior
No error, but not sure about what's supposed to be on the console normally

Environment (please complete the following information):

  • OS: Docker
  • Browser: Safari
  • Mango Version: v.0.27.0

Docker (if you are running Mango in a Docker container)

  mango:
    image: hkalexling/mango
    container_name: mango
    restart: unless-stopped
    volumes:                                                                                        
      - ./mango/data:/root/mango
      - ./mango/config:/root/.config/mango
    ports:
      - 9000:9000

Additional context
Add any other context about the problem here. Add screenshots if applicable.

@melyux melyux added the bug Something isn't working label Jan 23, 2023
@melyux melyux changed the title [Bug Report] Download Manager gives "Socket connection failed" on Safari using reverse proxy [Bug Report] Download Manager gives "Socket connection failed" on Safari using reverse proxy and live queue updates don't work Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant