Skip to content

Renewals created with --host-regex don't load after v2.2.x upgrade #2361

@FootStark

Description

@FootStark

Describe the bug
Upgraded from v2.1.19 to v2.2.3. Renewal of IIS certificate silently stopped working.
Log showed: The JSON value could not be converted to System.String. Path: $.IncludeRegex

To Reproduce

  1. Use v2.1.19 to create IIS-Certificate with option --host-regex (translates to IncludeRegex in .renewal.json)
  2. Update to v2.2.3 and try to renew

Expected behavior
Update to 2.2.x is marked as

Version 2.2.0 is an xcopy update for users of any 2.x.x version.

Expected would be a working renewal.

Log
The JSON value could not be converted to System.String. Path: $.IncludeRegex

Cause
Serialization changed with commit 35f00b9, changing IncludeRegex in json from Type RegEx to Type string.

Workaround
Manually change IncludeRegex serialization in .renewal.json as follows:
FROM: "IncludeRegex": { "Pattern": "(.*)\\.externaldomain\\.(net|com)", "Options": 0 }

TO: "IncludeRegex": "(.*)\\.externaldomain\\.(net|com)"

Suggested solution

  • Mark version update to 2.2.x as breaking change and include info in realese notes.
  • Enable error mails (taken from settings.json) for deserialization errors to inform users (currently error is silent).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions