dani-garcia / vaultwarden

Unofficial Bitwarden compatible server written in Rust, formerly known as bitwarden_rs
GNU Affero General Public License v3.0
36.78k stars 1.79k forks source link

WebSocket notifications problems #934

Closed Panja0 closed 4 years ago

Panja0 commented 4 years ago

I have Bitwarden_RS running on my Synology - Docker. Creating users, webpage etc is working great. Except (auto) syncing the desktop app and browser extension through webSocket notifications. WEBSOCKET_ENABLED=true has been set.

Auto syncing is not working and I'm seeing the following error in the logs: [ws::handler][ERROR] WS Error <Io(Kind(InvalidData))>: Missing id or access token

Any one have a clue what's going on?

I have created a bitwarden.conf file in /etc/nginx/sites-enabled with the following config:


    listen 443 ssl http2;
    listen [::]:443 ssl http2;

    server_name bitwarden.mydomain.com;

    ssl_certificate /usr/syno/etc/certificate/ReverseProxy/fghrthtrh/fullchain.pem;

    ssl_certificate_key /usr/syno/etc/certificate/ReverseProxy/fghrthtrh/privkey.pem;

    location / {

        proxy_connect_timeout 60;

        proxy_read_timeout 60;

        proxy_send_timeout 60;

        proxy_intercept_errors off;

        proxy_http_version 1.1;

        proxy_set_header        Host            $http_host;

        proxy_set_header        X-Real-IP            $remote_addr;

        proxy_set_header        X-Forwarded-For            $proxy_add_x_forwarded_for;

        proxy_set_header        X-Forwarded-Proto            $scheme;

        proxy_pass http://localhost:8080;

    }

    location /notifications/hub {
        proxy_pass http://localhost:3012;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }

    location /notifications/hub/negotiate {
        proxy_pass http://localhost:8080;
    }

    error_page 403 404 500 502 503 504 @error_page;

    location @error_page {
        root /usr/syno/share/nginx;
        rewrite (.*) /error.html break;
        allow all;
    }

}
sentriz commented 4 years ago

may be fixed now: https://github.com/dani-garcia/bitwarden_rs/pull/932

Panja0 commented 4 years ago

Sounds good! Will have a look later on this weekend and report back. Thx!

Panja0 commented 4 years ago

It's indeed fixed with the latest version. Many thanks!