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

Error when setting up local env #5097

Closed
1 task
Wengiel31 opened this issue Nov 30, 2024 · 0 comments
Closed
1 task

Error when setting up local env #5097

Wengiel31 opened this issue Nov 30, 2024 · 0 comments
Labels

Comments

@Wengiel31
Copy link

Steps To Reproduce

When setting up a local env according to Setup Guide I get the following error when running setup_secrets.ps1

dotnet.exe : Command failed : Could not parse the JSON file.
At C:\Users\User\Desktop\server\dev\setup_secrets.ps1:36 char:42
+ ... t-Content secrets.json | & dotnet user-secrets set -p $projects[$key]
+                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Command failed ... the JSON file.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
System.FormatException: Could not parse the JSON file.  ---> System.Text.Json.JsonReaderException: '0xC2' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.    at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json,
 ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)    at System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker)    at System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte first)    at System.Text.Json.Utf8JsonReader.ReadSingleSegment()    at
 System.Text.Json.Utf8JsonReader.Read()    at System.Text.Json.JsonDocument.Parse(ReadOnlySpan`1 utf8JsonSpan, JsonReaderOptions readerOptions, MetadataDb& database, StackRowStack& stack)    at System.Text.Json.JsonDocument.Parse(ReadOnlyMemory`1 utf8Json, J
sonReaderOptions readerOptions, Byte[] extraRentedArrayPoolBytes, PooledByteBufferWriter extraPooledByteBufferWriter)    at System.Text.Json.JsonDocument.Parse(ReadOnlyMemory`1 json, JsonDocumentOptions options)    at System.Text.Json.JsonDocument.Parse(Stri
ng json, JsonDocumentOptions options)    at Microsoft.Extensions.Configuration.Json.JsonConfigurationFileParser.ParseStream(Stream input)    at Microsoft.Extensions.Configuration.Json.JsonConfigurationFileParser.Parse(Stream input)    at Microsoft.Extensions
.Configuration.Json.JsonConfigurationProvider.Load(Stream stream)    --- End of inner exception stack trace ---    at Microsoft.Extensions.Configuration.Json.JsonConfigurationProvider.Load(Stream stream)    at Microsoft.Extensions.SecretManager.Tools.Interna
l.SetCommand.FromStdInStrategy.Execute(CommandContext context)    at Microsoft.Extensions.SecretManager.Tools.Program.RunInternal(String[] args)    at Microsoft.Extensions.SecretManager.Tools.Program.TryRun(String[] args, Int32& returnCode) - IntegrationTests

Yes, the json file is formatted correctly.
pls fix

Expected Result

a

Actual Result

a

Screenshots or Videos

No response

Additional Context

No response

Build Version

newest

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.
@Wengiel31 Wengiel31 added the bug label Nov 30, 2024
@Wengiel31 Wengiel31 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 30, 2024
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

1 participant