dev-proxy
dev-proxy copied to clipboard
[BUG]: Unable to execute devproxy root command with options
Description
Unable to execute devproxy root command with options
Expected behaviour
Command should run
Actual behaviour
Error thrown... see additional info
Steps to reproduce
- Install Dev Proxy 1.2.1
- Execute
devproxy --discover
Dev Proxy Version
1.2.1
Operating system (environment)
Windows
Shell
PowerShell
Configuration file
N/A
Additional Info
Unhandled exception. System.IO.InvalidDataException: Failed to load configuration from file '<redacted>\devproxyrc.json'.
---> System.FormatException: Could not parse the JSON file.
---> System.Text.Json.JsonReaderException: The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. LineNumber: 0 | BytePositionInLine: 0.
at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
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, JsonReaderOptions readerOptions, Byte[] extraRentedArrayPoolBytes, PooledByteBufferWriter extraPooledByteBufferWriter)
at System.Text.Json.JsonDocument.Parse(ReadOnlyMemory`1 json, JsonDocumentOptions options)
at System.Text.Json.JsonDocument.Parse(String json, JsonDocumentOptions options)
at Microsoft.Extensions.Configuration.Json.JsonConfigurationFileParser.ParseStream(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.Configuration.FileConfigurationProvider.Load(Boolean reload)
--- End of inner exception stack trace ---
at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load(Boolean reload)
at Microsoft.Extensions.Configuration.ConfigurationManager.AddSource(IConfigurationSource source)
at Microsoft.Extensions.Configuration.ConfigurationManager.Microsoft.Extensions.Configuration.IConfigurationBuilder.Add(IConfigurationSource source)
at Microsoft.Extensions.Configuration.JsonConfigurationExtensions.AddJsonFile(IConfigurationBuilder builder, String path, Boolean optional, Boolean reloadOnChange)
at Microsoft.Extensions.Configuration.ConfigurationManagerExtensions.ConfigureDevProxyConfig(ConfigurationManager configuration, DevProxyConfigOptions options)
at Program.<<Main>$>g__BuildApplication|0_0(String[] args, DevProxyConfigOptions options)
at Program.<Main>$(String[] args)
at Program.<Main>(String[] args)
@garrytrinder, for the clean installation it works, I could not reproduce it.
Is C:\Users\< USER >\AppData\Local\Programs\Dev Proxy\devproxyrc.json file undamaged? Maybe it helps if you share that devproxyrc.json configuration.
Like @bartizan, I can't repro it with 1.3.0. Since that's our latest release, would you mind checking if the error is still there?
Closing since the issue seems to be absent.