hassio-addons / addon-zerotier

ZeroTier One - Home Assistant Community Add-ons
https://addons.community
MIT License
143 stars 13 forks source link

Example configuration not working #204

Closed timotoots closed 1 year ago

timotoots commented 1 year ago

Problem/Motivation

Trying to set up Zerotier network on a freshly installed add-on and got an error message. Even with the example YAML or adding network by hand.

Expected behavior

Network id should be saved.

Actual behavior

Got error message: Failed to save add-on configuration, does not match regular expression ^!secret [a-zA-Z0-9_\-]+$|[0-9a-z]{16}. Got {'networks': ['wgfyiwe73747457', 'fhu3888892jjfdk'], 'api_auth_token': ''}

Steps to reproduce

Add add-on. Use example configuration.

Proposed changes

Probably needs some fixing.

tjorim commented 1 year ago

Note: This is just an example, don't copy and paste it! Create your own!

tjorim commented 1 year ago

The examples are only 15 characters long, a real network ID would be 16.

timotoots commented 1 year ago

Thank you! It was the incorrect network ID that I tried to use (I did not actually use the example, just for the test and bug report). Maybe adding better error message would make sense. Or validate before saving.

tjorim commented 1 year ago

The Supervisor handles that: "Failed to save add-on configuration" makes it pretty clear it validated the config before saving it.