Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a group to a collection returns 500 error - but works #4865

Open
1 task done
KramNamez opened this issue Oct 8, 2024 · 2 comments
Open
1 task done

Adding a group to a collection returns 500 error - but works #4865

KramNamez opened this issue Oct 8, 2024 · 2 comments
Labels
bug bw-unified-deploy An Issue related to Bitwarden unified deployment

Comments

@KramNamez
Copy link

Steps To Reproduce

  1. Create a group.
  2. Create a collection.
  3. Use the API or the Web Vault to add the group to the collection with "manage" permission.

Expected Result

Response status 200, collection is updated.

Actual Result

Response status 500, unhandled server exception - collection is still updated!

fail: Bit.Api.Utilities.ExceptionHandlerFilterAttribute[0]
=> SpanId:e3e6d7d32b55e7a0, TraceId:79d323659e2c99718ec674f139e9891d, ParentId:0000000000000000 => ConnectionId:0HN76SIKD24L3 => RequestPath:/public/collections/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx RequestId:0HN76SIKD24L3:00000001 => Bit.Api.Public.Controllers.CollectionsController.Put (Api)

An exception was thrown while attempting to evaluate a LINQ query parameter expression. See the inner exception for more information. To show additional information call 'DbContextOptionsBuilder.EnableSensitiveDataLogging'.

System.InvalidOperationException: An exception was thrown while attempting to evaluate a LINQ query parameter expression. See the inner exception for more information. To show additional information call 'DbContextOptionsBuilder.EnableSensitiveDataLogging'.

---> System.ArgumentNullException: Value cannot be null. (Parameter 'source')

Screenshots or Videos

No response

Additional Context

I'm working on importing content from our previous PW management solution to Bitwarden. As part of that, I'm creating groups and collections via the API. I can fire all my requests and just ignore that I'm getting 500 errors, since it actually does the thing I need it to do.

It's still clearly incorrect behaviour.

This is basically the payload I send:

"externalId": "my-reference",
"groups": [
    {
        "id": xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx,
        "readOnly": false,
        "hidePasswords": false,
        "manage": true
    }
]

Githash Version

8a02b49-dirty

Environment Details

Unified deployment on an OpenShift cluster.

Database Image

No response

Issue-Link

#2480

Issue Tracking Info

  • I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.
@KramNamez KramNamez added bug bw-unified-deploy An Issue related to Bitwarden unified deployment labels Oct 8, 2024
@jtodddd
Copy link

jtodddd commented Oct 9, 2024

Hi there,

I am unable to reproduce this issue, it has been escalated for further investigation. If you have more information that can help us, please add it below.

Thanks!

@KramNamez
Copy link
Author

Thanks for looking into it!

We use Postgres as the DB, but otherwise... I don't know what would help you. I have that stacktrace and the knowledge that this happened every time I tried to add a group. I wasn't doing anything terribly weird, I think :)

Both group and collection have externalId set, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bw-unified-deploy An Issue related to Bitwarden unified deployment
Projects
None yet
Development

No branches or pull requests

3 participants
@KramNamez @jtodddd and others