[GH-ISSUE #557] Can't add new entry on Android - API Guid error #13426

Closed
opened 2026-04-14 23:02:57 -05:00 by GiteaMirror · 10 comments
Owner

Originally created by @nsymms on GitHub (Jul 13, 2019).
Original GitHub issue: https://github.com/bitwarden/android/issues/557

When trying to add a new entry using the Android app, I get a "unhandled server error has occurred" popup. I tried several times, different info, etc. All fail.

This was working fine with the previous Android App version AFAIK. I'm not sure when it updated, but seems like it was in the past couple of weeks.

Checking the API log on my self-hosted server has

fail: Bit.Api.Utilities.ExceptionHandlerFilterAttribute[0]
      Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
   at System.Guid.GuidResult.SetFailure(ParseFailureKind failure, String failureMessageID, Object failureMessa
geFormatArgument, String failureArgumentName, Exception innerException)
   at System.Guid.TryParseGuidWithNoStyle(ReadOnlySpan`1 guidString, GuidResult& result)
   at System.Guid.TryParseGuid(ReadOnlySpan`1 guidString, GuidStyles flags, GuidResult& result)
   at System.Guid..ctor(String g)
...

Self-Hosted back-end v1.30.4 (version of docker images)
Android v9 on Samsung S9+
Android app v2.0.6

Adding entries via the web page seems to work without problems.

Any ideas?

Originally created by @nsymms on GitHub (Jul 13, 2019). Original GitHub issue: https://github.com/bitwarden/android/issues/557 When trying to add a new entry using the Android app, I get a "unhandled server error has occurred" popup. I tried several times, different info, etc. All fail. This was working fine with the previous Android App version AFAIK. I'm not sure when it updated, but seems like it was in the past couple of weeks. Checking the API log on my self-hosted server has ``` fail: Bit.Api.Utilities.ExceptionHandlerFilterAttribute[0] Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). at System.Guid.GuidResult.SetFailure(ParseFailureKind failure, String failureMessageID, Object failureMessa geFormatArgument, String failureArgumentName, Exception innerException) at System.Guid.TryParseGuidWithNoStyle(ReadOnlySpan`1 guidString, GuidResult& result) at System.Guid.TryParseGuid(ReadOnlySpan`1 guidString, GuidStyles flags, GuidResult& result) at System.Guid..ctor(String g) ... ``` Self-Hosted back-end v1.30.4 (version of docker images) Android v9 on Samsung S9+ Android app v2.0.6 Adding entries via the web page seems to work without problems. Any ideas?
Author
Owner

@kspearrin commented on GitHub (Jul 13, 2019):

I am not sure why the app would be sending invalid IDs. When adding an item, there shouldn't be an ID to begin with since the server should generate that. Can you provide more context around the error log?

<!-- gh-comment-id:511161560 --> @kspearrin commented on GitHub (Jul 13, 2019): I am not sure why the app would be sending invalid IDs. When adding an item, there shouldn't be an ID to begin with since the server should generate that. Can you provide more context around the error log?
Author
Owner

@nsymms commented on GitHub (Jul 14, 2019):

Here's the log of a typical failed request. Is there a debug flag I can set somewhere to log more detail?

info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
      Request starting HTTP/1.0 POST http://my-domain.com/ciphers application/json; charset=utf-8 496
info: Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler[2]
      Successfully validated the token.
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1]
      Route matched with {action = "Post", controller = "Ciphers"}. Executing action Bit.Api.Controllers.CiphersController.Post (Api)
info: Microsoft.AspNetCore.Authorization.DefaultAuthorizationService[1]
      Authorization was successful.
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1]
      Executing action method Bit.Api.Controllers.CiphersController.Post (Api) with arguments (Bit.Core.Models.Api.CipherRequestModel) - Validation state: Valid
fail: Bit.Api.Utilities.ExceptionHandlerFilterAttribute[0]
      Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
   at System.Guid.GuidResult.SetFailure(ParseFailureKind failure, String failureMessageID, Object failureMessageFormatArgument, String failureArgumentName, Exception innerException)
   at System.Guid.TryParseGuidWithNoStyle(ReadOnlySpan`1 guidString, GuidResult& result)
   at System.Guid.TryParseGuid(ReadOnlySpan`1 guidString, GuidStyles flags, GuidResult& result)
   at System.Guid..ctor(String g)
   at Bit.Core.Models.Api.CipherRequestModel.ToCipherDetails(CipherDetails existingCipher) in /home/appveyor/projects/server/src/Core/Models/Api/Request/CipherRequestModel.cs:line 58
   at Bit.Core.Models.Api.CipherRequestModel.ToCipherDetails(Guid userId, Boolean allowOrgIdSet) in /home/appveyor/projects/server/src/Core/Models/Api/Request/CipherRequestModel.cs:line 53
   at Bit.Api.Controllers.CiphersController.Post(CipherRequestModel model) in /home/appveyor/projects/server/src/Api/Controllers/CiphersController.cs:line 110
   at lambda_method(Closure , Object )
   at Microsoft.Extensions.Internal.ObjectMethodExecutorAwaitable.Awaiter.GetResult()
   at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeActionMethodAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextExceptionFilterAsync()
info: Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor[1]
      Executing ObjectResult, writing value of type 'Bit.Core.Models.Api.ErrorResponseModel'.
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2]
      Executed action Bit.Api.Controllers.CiphersController.Post (Api) in 1.5092ms
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
      Request finished in 2.2422ms 500 application/json; charset=utf-8
<!-- gh-comment-id:511225816 --> @nsymms commented on GitHub (Jul 14, 2019): Here's the log of a typical failed request. Is there a debug flag I can set somewhere to log more detail? ``` info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] Request starting HTTP/1.0 POST http://my-domain.com/ciphers application/json; charset=utf-8 496 info: Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler[2] Successfully validated the token. info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] Route matched with {action = "Post", controller = "Ciphers"}. Executing action Bit.Api.Controllers.CiphersController.Post (Api) info: Microsoft.AspNetCore.Authorization.DefaultAuthorizationService[1] Authorization was successful. info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] Executing action method Bit.Api.Controllers.CiphersController.Post (Api) with arguments (Bit.Core.Models.Api.CipherRequestModel) - Validation state: Valid fail: Bit.Api.Utilities.ExceptionHandlerFilterAttribute[0] Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). at System.Guid.GuidResult.SetFailure(ParseFailureKind failure, String failureMessageID, Object failureMessageFormatArgument, String failureArgumentName, Exception innerException) at System.Guid.TryParseGuidWithNoStyle(ReadOnlySpan`1 guidString, GuidResult& result) at System.Guid.TryParseGuid(ReadOnlySpan`1 guidString, GuidStyles flags, GuidResult& result) at System.Guid..ctor(String g) at Bit.Core.Models.Api.CipherRequestModel.ToCipherDetails(CipherDetails existingCipher) in /home/appveyor/projects/server/src/Core/Models/Api/Request/CipherRequestModel.cs:line 58 at Bit.Core.Models.Api.CipherRequestModel.ToCipherDetails(Guid userId, Boolean allowOrgIdSet) in /home/appveyor/projects/server/src/Core/Models/Api/Request/CipherRequestModel.cs:line 53 at Bit.Api.Controllers.CiphersController.Post(CipherRequestModel model) in /home/appveyor/projects/server/src/Api/Controllers/CiphersController.cs:line 110 at lambda_method(Closure , Object ) at Microsoft.Extensions.Internal.ObjectMethodExecutorAwaitable.Awaiter.GetResult() at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at System.Threading.Tasks.ValueTask`1.get_Result() at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeActionMethodAsync() at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync() at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync() at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextExceptionFilterAsync() info: Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor[1] Executing ObjectResult, writing value of type 'Bit.Core.Models.Api.ErrorResponseModel'. info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] Executed action Bit.Api.Controllers.CiphersController.Post (Api) in 1.5092ms info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] Request finished in 2.2422ms 500 application/json; charset=utf-8 ```
Author
Owner

@kspearrin commented on GitHub (Jul 15, 2019):

Does this happen every time when adding an item? What are the parameters of the item you are trying to create? Just you just create a new login with nothing but a name, does that also fail?

<!-- gh-comment-id:511249726 --> @kspearrin commented on GitHub (Jul 15, 2019): Does this happen every time when adding an item? What are the parameters of the item you are trying to create? Just you just create a new login with nothing but a name, does that also fail?
Author
Owner

@nsymms commented on GitHub (Jul 15, 2019):

All I have to do is hit the + button at the bottom of the app, type in something for the Name, and tap SAVE. That gives me the error. It fails on two Android devices that I have. Every time. I can, however, make updates to entries without issue. So maybe it's restricted to the POST request?

Since nobody else has reported anything, I'm thinking it's related to my server, but the web UI on the server, the Chrome plugin on Windows 7, and the app on Windows 7 can add items without any problems.

<!-- gh-comment-id:511250960 --> @nsymms commented on GitHub (Jul 15, 2019): All I have to do is hit the + button at the bottom of the app, type in something for the Name, and tap SAVE. That gives me the error. It fails on two Android devices that I have. Every time. I can, however, make updates to entries without issue. So maybe it's restricted to the POST request? Since nobody else has reported anything, I'm thinking it's related to my server, but the web UI on the server, the Chrome plugin on Windows 7, and the app on Windows 7 can add items without any problems.
Author
Owner

@nsymms commented on GitHub (Jul 15, 2019):

BTW, the Android app updated (today or yesterday) to v2.1.0.

<!-- gh-comment-id:511251227 --> @nsymms commented on GitHub (Jul 15, 2019): BTW, the Android app updated (today or yesterday) to v2.1.0.
Author
Owner

@Eevoo commented on GitHub (Jul 15, 2019):

FWIW I encountered this issue as a hosted Bitwarden user as well. Updating the android client to the latest version as of 2019-07-12 on Google Play did not correct the problem.

Repro steps

  1. Open Bitwarden app
  2. Sign in
  3. Click plus sign
  4. Enter details (name/username/password/uri)
  5. Click save
  6. App closes, your changes are lost

I can confirm that on a Win7 x64 system running the Firefox bitwarden addon, I am able to create records but manually syncing them does not cause the records to appear at least as of yet.

<!-- gh-comment-id:511567009 --> @Eevoo commented on GitHub (Jul 15, 2019): FWIW I encountered this issue as a hosted Bitwarden user as well. Updating the android client to the latest version as of 2019-07-12 on Google Play did _not_ correct the problem. Repro steps 1. Open Bitwarden app 1. Sign in 1. Click plus sign 1. Enter details (name/username/password/uri) 1. Click save 1. App closes, your changes are lost I can confirm that on a Win7 x64 system running the Firefox bitwarden addon, I am able to create records but manually syncing them does not cause the records to appear at least as of yet.
Author
Owner

@kspearrin commented on GitHub (Jul 16, 2019):

Are you using the official server implementation or some community-developed version?

<!-- gh-comment-id:511639242 --> @kspearrin commented on GitHub (Jul 16, 2019): Are you using the official server implementation or some community-developed version?
Author
Owner

@nsymms commented on GitHub (Jul 16, 2019):

I'm using the official docker setup. Managed via bitwarden.sh.

<!-- gh-comment-id:511647434 --> @nsymms commented on GitHub (Jul 16, 2019): I'm using the official docker setup. Managed via bitwarden.sh.
Author
Owner

@danielbrunt57 commented on GitHub (Mar 21, 2023):

I am having the same issue since changing to bitwarden from lastpass. Android app cannot update or create new entries.

<!-- gh-comment-id:1477171568 --> @danielbrunt57 commented on GitHub (Mar 21, 2023): I am having the same issue since changing to bitwarden from lastpass. Android app cannot update or create new entries.
Author
Owner

@vvolkgang commented on GitHub (Jun 20, 2024):

Issue migrated to https://github.com/bitwarden/mobile/issues/557

<!-- gh-comment-id:2181552167 --> @vvolkgang commented on GitHub (Jun 20, 2024): Issue migrated to https://github.com/bitwarden/mobile/issues/557
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#13426