Error When Updating Secret on Mac Client: "Couldn't Parse JSON body: Error("missing field Key", line: 1, column: XXXX)" #3629

Closed
opened 2026-04-06 05:10:21 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @AndrewPaglusch on 12/24/2018

Environment Information

Docker Image: mprasil/bitwarden:latest (Fully up-to-date. Image ID: 68111df54627)
Bitwarden Mac Client: v1.11.2 on macOS High Sierra
Bitwarden Android Client: v1.21.0 on Android 9 (Path Level Dec 5, 2018)

Docker Compose Configuration

version: '2'
services:
    bitwarden:
        image: mprasil/bitwarden:latest
        container_name: bitwarden
        restart: always
        volumes:
            - ./bitwarden/data:/data
        ports:
            - 127.0.0.100:8080:80
            - 127.0.0.100:3012:3012
        environment:
            - WEBSOCKET_ENABLED=true
            - SIGNUPS_ALLOWED=true
            - INVITATIONS_ALLOWED=false
            - SERVER_ADMIN_EMAIL=<REDACTED>
        restart: always

Nginx Configuration

server {
    listen 80;
    server_name <REDACTED>;

    location ~ /.well-known {
        root /var/www/<REDACTED>/htdocs;
        allow all;
    }

    location / {
        rewrite ^ https://$host$request_uri? permanent;
    }
}

server {
   listen 443 ssl;

    server_name <REDACTED>;

    ssl_certificate /etc/letsencrypt/live/<REDACTED>/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/<REDACTED>/privkey.pem;
    ssl_session_timeout 1d;
    ssl_session_cache shared:SSL:50m;
    ssl_session_tickets on;

    ssl_protocols TLSv1.2;
    ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';
    ssl_prefer_server_ciphers on;

    # HSTS (ngx_http_headers_module is required) (15768000 seconds = 6 months)
    add_header Strict-Transport-Security max-age=15768000;

    # OCSP Stapling ---
    # fetch OCSP records from URL in ssl_certificate and cache them
    ssl_stapling on;
    ssl_stapling_verify on;

    #allow large uploads
    client_max_body_size 100m;

    location ~ /.well-known {
        root /var/www/<REDACTED>/htdocs;
        allow all;
    }

    location / {
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_connect_timeout       600;
        proxy_send_timeout          600;
        proxy_read_timeout          600;
        send_timeout                600;
        proxy_pass http://127.0.0.100:8080;
    }

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

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

Problem

When trying to save a specific entry on the Mac client, the following error is logged in the docker container:

bitwarden    | [2018-12-24][15:21:08][rocket::rocket][INFO] PUT /api/ciphers/000bfe5c-b808-4ee8-8abc-1ac733687304 application/json; charset=utf-8:
bitwarden    | [2018-12-24][15:21:08][_][INFO] Matched: PUT /api/ciphers/<uuid> (put_cipher)
bitwarden    | [2018-12-24][15:21:08][_][ERROR] Couldn't parse JSON body: Error("missing field `Key`", line: 1, column: 1869)
bitwarden    | [2018-12-24][15:21:08][_][INFO] Outcome: Failure
bitwarden    | [2018-12-24][15:21:08][_][WARN] Responding with 422 Unprocessable Entity catcher.
bitwarden    | [2018-12-24][15:21:08][_][INFO] Response succeeded.

The following is logged in the Nginx access log:

<REDACTED> - - [24/Dec/2018:15:39:26 +0000] "PUT /api/ciphers/000bfe5c-b808-4ee8-8abc-1ac733687304 HTTP/1.1" 422 573 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Bitwarden/1.11.2 Chrome/61.0.3163.100 Electron/2.0.11 Safari/537.36" "-"

Nothing is logged to the Nginx error log.

The client displays the following message. The entry is never saved.

An error has occurred. An unexpected error has occurred

This seems similar to this issue: #253

What Works

  • Updating entries on the Android client works normally.
  • Creating new entries on the Mac client works normally.
  • Editing other entries works normally.

So far, I have only experienced this issue with this one entry.

What I've Already Tried:

  • Restarting Bitwarden docker container
  • Updating Docker image (was fully up-to-date)
  • Checking for updates on Mac client (was fully up-to-date)
  • Logging out/in on Mac client
  • Re-syncing vault on Mac client
*Originally created by @AndrewPaglusch on 12/24/2018* ### Environment Information **Docker Image:** mprasil/bitwarden:latest (Fully up-to-date. Image ID: 68111df54627) **Bitwarden Mac Client:** v1.11.2 on macOS High Sierra **Bitwarden Android Client:** v1.21.0 on Android 9 (Path Level Dec 5, 2018) #### Docker Compose Configuration ``` version: '2' services: bitwarden: image: mprasil/bitwarden:latest container_name: bitwarden restart: always volumes: - ./bitwarden/data:/data ports: - 127.0.0.100:8080:80 - 127.0.0.100:3012:3012 environment: - WEBSOCKET_ENABLED=true - SIGNUPS_ALLOWED=true - INVITATIONS_ALLOWED=false - SERVER_ADMIN_EMAIL=<REDACTED> restart: always ``` #### Nginx Configuration ``` server { listen 80; server_name <REDACTED>; location ~ /.well-known { root /var/www/<REDACTED>/htdocs; allow all; } location / { rewrite ^ https://$host$request_uri? permanent; } } server { listen 443 ssl; server_name <REDACTED>; ssl_certificate /etc/letsencrypt/live/<REDACTED>/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/<REDACTED>/privkey.pem; ssl_session_timeout 1d; ssl_session_cache shared:SSL:50m; ssl_session_tickets on; ssl_protocols TLSv1.2; ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256'; ssl_prefer_server_ciphers on; # HSTS (ngx_http_headers_module is required) (15768000 seconds = 6 months) add_header Strict-Transport-Security max-age=15768000; # OCSP Stapling --- # fetch OCSP records from URL in ssl_certificate and cache them ssl_stapling on; ssl_stapling_verify on; #allow large uploads client_max_body_size 100m; location ~ /.well-known { root /var/www/<REDACTED>/htdocs; allow all; } location / { proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Server $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_connect_timeout 600; proxy_send_timeout 600; proxy_read_timeout 600; send_timeout 600; proxy_pass http://127.0.0.100:8080; } location /notifications/hub { proxy_pass http://127.0.0.100:3012; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } location /notifications/hub/negotiate { proxy_pass http://127.0.0.100:8080; } } ``` ### Problem When trying to save a specific entry on the Mac client, the following error is logged in the docker container: ``` bitwarden | [2018-12-24][15:21:08][rocket::rocket][INFO] PUT /api/ciphers/000bfe5c-b808-4ee8-8abc-1ac733687304 application/json; charset=utf-8: bitwarden | [2018-12-24][15:21:08][_][INFO] Matched: PUT /api/ciphers/<uuid> (put_cipher) bitwarden | [2018-12-24][15:21:08][_][ERROR] Couldn't parse JSON body: Error("missing field `Key`", line: 1, column: 1869) bitwarden | [2018-12-24][15:21:08][_][INFO] Outcome: Failure bitwarden | [2018-12-24][15:21:08][_][WARN] Responding with 422 Unprocessable Entity catcher. bitwarden | [2018-12-24][15:21:08][_][INFO] Response succeeded. ``` The following is logged in the Nginx access log: ``` <REDACTED> - - [24/Dec/2018:15:39:26 +0000] "PUT /api/ciphers/000bfe5c-b808-4ee8-8abc-1ac733687304 HTTP/1.1" 422 573 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Bitwarden/1.11.2 Chrome/61.0.3163.100 Electron/2.0.11 Safari/537.36" "-" ``` Nothing is logged to the Nginx error log. The client displays the following message. The entry is never saved. > An error has occurred. An unexpected error has occurred This seems similar to this issue: #253 ### What Works - Updating entries on the Android client works normally. - Creating new entries on the Mac client works normally. - Editing other entries works normally. So far, I have only experienced this issue with this one entry. ### What I've Already Tried: - Restarting Bitwarden docker container - Updating Docker image (was fully up-to-date) - Checking for updates on Mac client (was fully up-to-date) - Logging out/in on Mac client - Re-syncing vault on Mac client
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/vaultwarden#3629