Skip to content
This repository was archived by the owner on Mar 23, 2025. It is now read-only.
This repository was archived by the owner on Mar 23, 2025. It is now read-only.

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

Open
@melyux

Description

@melyux

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions