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

RemoteInstance values with single quotes fail to deserialize from v5 onwards #4380

Open
jpalac opened this issue Aug 19, 2024 · 0 comments
Open

Comments

@jpalac
Copy link
Contributor

jpalac commented Aug 19, 2024

Describe the bug

Description

RemoteIntance values are stored in the config file using single quotes:

<configuration>
  <appSettings>
    <add key="ServiceControl/RemoteInstances" value="[{'api_uri':'http://localhost:33334/api'}]"/>
  </appSettings>/
</configuration>

From SC version 5 Newtonsoft.Json has been replaced with System.Text.Json and that does not support single quotes.

When a new SC installer runs, it checks for other instances already installed and tries to read the config file. This fails if the config file has RemoteInstances listed using single quotes.

Expected behavior

New instance is installed successfully, even if other instances exist.

Versions

ServiceControl V5+

Steps to reproduce

  • Install ServiceControl (any version)
  • Update the config file to have single quotes in the RemoteInstance value
  • Install a new instance of ServiceControl v5+
  • The installation will fail

Relevant log output

image

Additional Information

Workarounds

Before installing a new instance, update the config file of any other instances that are using single quotes for RemoteInstance value or setting to use " instead of the single quote

<configuration>
  <appSettings>
    <add key="ServiceControl/RemoteInstances" value="[{&quot;api_uri&quot;:&quot;http://localhost:33334/api&quot;}]"/>
  </appSettings>/
</configuration>
@jpalac jpalac added the Bug label Aug 19, 2024
@jpalac jpalac changed the title RemoteIntstance values with single quotes fail to deserialize from v5 onwards RemoteInstance values with single quotes fail to deserialize from v5 onwards Aug 19, 2024
johnsimons added a commit to Particular/docs.particular.net that referenced this issue Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants