When using auto-discovery for material type, when the material type is not dns-1123 compliant, so contains characters others than lowercase letters, numbers, and hyphens and error is thrown hiding the real issue. The error that is reported:
ERR adding material: failed to auto-discover material kind: %!w(<nil>)