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

Can't upload new license : error 500 in Billing > Subscription #3929

Closed
1 task
BeWog opened this issue Mar 27, 2024 · 2 comments
Closed
1 task

Can't upload new license : error 500 in Billing > Subscription #3929

BeWog opened this issue Mar 27, 2024 · 2 comments
Labels

Comments

@BeWog
Copy link

BeWog commented Mar 27, 2024

Steps To Reproduce

  1. Go to self-hosted instance
  2. Click on 'Admin Console'
  3. Then, go to 'Billing' > 'Subscription'

Expected Result

Webpage.

Actual Result

Loading spinner, nothing more.
500 error page.

Screenshots or Videos

bitwarden

Additional Context

From log : bwdata/logs/api/Api/20240327.txt

System.Text.Json.JsonException: 'K' is invalid after a single JSON value. Expected end of data. Path: $ | LineNumber: 33 | BytePositionInLine: 1.
 ---> System.Text.Json.JsonReaderException: 'K' is invalid after a single JSON value. Expected end of data. LineNumber: 33 | BytePositionInLine: 1.
   at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
   at System.Text.Json.Utf8JsonReader.ConsumeNextToken(Byte marker)
   at System.Text.Json.Utf8JsonReader.ReadSingleSegment()
   at System.Text.Json.Utf8JsonReader.Read()
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   --- End of inner exception stack trace ---
   at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.ContinueDeserialize(ReadBufferState& bufferState, JsonReaderState& jsonReaderState, ReadStack& readStack)
   at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.DeserializeAsync(Stream utf8Json, CancellationToken cancellationToken)
   at Bit.Core.Services.LicensingService.ReadOrganizationLicenseAsync(Guid organizationId) in /home/runner/work/server/server/src/Core/Services/Implementations/LicensingService.cs:line 273
   at Bit.Api.AdminConsole.Controllers.OrganizationsController.GetSubscription(String id) in /home/runner/work/server/server/src/Api/AdminConsole/Controllers/OrganizationsController.cs:line 195
   at lambda_method103(Closure, Object)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

Build Version

bitwarden.sh version 2024.3.0
Docker version 26.0.0, build 2ae903e
Docker Compose version v2.25.0

Environment

Self-Hosted

Environment Details

No response

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.
@BeWog BeWog added the bug label Mar 27, 2024
@NovaSilentium
Copy link

Hi there!

We've seen error messages similar to this in the past, and the issue was caused by the way the license was ingested into the database. In order to reset this, we need to move/rename the license file out of its current location on the self-hosted server, and then upload the license file again via the Web Vault:

SSH into the machine(s) and navigate to ./bwdata/core/licenses/organization

You should see at least one *.json file containing the license information; move this file to a temporary location

Log in through the Web Vault as an Owner, navigate to the Organization's page and then Billing → Subscription

Upload your license file again

Further to that, We use GitHub issues as a place to track bugs and other development related issues. If your issue persists, please write us back using our “Contact support” form located on our Help Center (https://bitwarden.com/help/).

You can include a link to this issue in the message content.

Alternatively, you can also search for an answer in our help documentation or get help from other Bitwarden users on our community forums (https://community.bitwarden.com/c/support/).

The issue here will be closed.

Thanks!

@NovaSilentium NovaSilentium closed this as not planned Won't fix, can't repro, duplicate, stale Mar 28, 2024
@BeWog
Copy link
Author

BeWog commented Mar 28, 2024

It works. 👍

Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants