error on create new entries with Android app #10

Closed
opened 2026-02-04 16:14:32 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @TMHBOFH on GitHub (May 31, 2018).

Hi,

i get an error if i want to create an new entry.
I use the later docker image from mprasil and the newest Android app.

following error are shown by server

POST /api/ciphers application/json; charset=utf-8:
=> Matched: POST /api/ciphers
=> Error: Couldn't parse JSON body: Error("missing field type", line: 1, column: 498)
=> Outcome: Failure
=> Warning: Responding with 400 Bad Request catcher.
=> Response succeeded.

How i can help to debug the problem?

Thanks a lot for your help and great job on this project.
@mprasil thanks for your nice docker images

best regards

Originally created by @TMHBOFH on GitHub (May 31, 2018). Hi, i get an error if i want to create an new entry. I use the later docker image from mprasil and the newest Android app. following error are shown by server POST /api/ciphers application/json; charset=utf-8: => Matched: POST /api/ciphers => Error: Couldn't parse JSON body: Error("missing field `type`", line: 1, column: 498) => Outcome: Failure => Warning: Responding with 400 Bad Request catcher. => Response succeeded. How i can help to debug the problem? Thanks a lot for your help and great job on this project. @mprasil thanks for your nice docker images best regards
Author
Owner

@mprasil commented on GitHub (May 31, 2018):

Hi, I've tested it on my side with Android and can confirm the issue.

@mprasil commented on GitHub (May 31, 2018): Hi, I've tested it on my side with Android and can confirm the issue.
Author
Owner

@dani-garcia commented on GitHub (May 31, 2018):

Yeah, I just checked right now, the android client sends the json keys with the first letter in uppercase (Type while we expect type, for example), I'll see what I can do

@dani-garcia commented on GitHub (May 31, 2018): Yeah, I just checked right now, the android client sends the json keys with the first letter in uppercase (`Type` while we expect `type`, for example), I'll see what I can do
Author
Owner

@mprasil commented on GitHub (May 31, 2018):

This would be great use case for case insensitive attribute. Sadly not an option for now, but there are some workarounds.

@mprasil commented on GitHub (May 31, 2018): This would be great use case for [case insensitive attribute](https://github.com/serde-rs/serde/issues/586). Sadly not an option for now, but there are some workarounds.
Author
Owner

@dani-garcia commented on GitHub (Jun 1, 2018):

I've modified the inputs to make sure we always receive the same format. I've decided using PascalCase as it seems to be the most commonly used upstream.
This allows adding and modifying ciphers in Android, but for whatever reason the ciphers created on the web don't sync with the phone. I'll investigate more later.

Edit: It seems to be related with organizations, if the user isn't part of any organizations, the sync works fine. I'll try fixing it tomorrow.

Edit 2: Welp, apparently the MaxStorageGb value was too big for android, I was expecting a more complicated fix. It should be fixed now, so I'm closing this.

@dani-garcia commented on GitHub (Jun 1, 2018): I've modified the inputs to make sure we always receive the same format. I've decided using PascalCase as it seems to be the most commonly used upstream. This allows adding and modifying ciphers in Android, but for whatever reason the ciphers created on the web don't sync with the phone. I'll investigate more later. Edit: It seems to be related with organizations, if the user isn't part of any organizations, the sync works fine. I'll try fixing it tomorrow. Edit 2: Welp, apparently the `MaxStorageGb` value was too big for android, I was expecting a more complicated fix. It should be fixed now, so I'm closing this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#10