Closed Jniklas2 closed 3 years ago
I fixed it by removing the short conversion on line 407 of Program.cs. Not too sure why it's failing because of that but removing it, rebuilding, and rerunning generates the license like it should and it works.
I fixed it by removing the short conversion on line 407 of Program.cs. Not too sure why it's failing because of that but removing it, rebuilding, and rerunning generates the license like it should and it works.
Thanks for the tip. Now it works again
I'm trying to generate a license for an organization, but it fails with this error:
Oops: System.ArgumentException: Object of type 'System.Int16' cannot be converted to type 'System.Nullable`1[System.Int32]'. at System.RuntimeType.TryChangeType(Object value, Binder binder, CultureInfo culture, Boolean needsSpecialCast) at System.RuntimeType.CheckValue(Object value, Binder binder, CultureInfo culture, BindingFlags invokeAttr) at System.Reflection.MethodBase.CheckArguments(Object[] parameters, Binder binder, BindingFlags invokeAttr, CultureInfo culture, Signature sig) at System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture) at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, Object[] index) at System.Reflection.PropertyInfo.SetValue(Object obj, Object value) at bitwardenSelfLicensor.Program.<GenerateOrgLicense>g__set|8_0(String name, Object value, <>c__DisplayClass8_0& ) in /licenseGen/Program.cs:line 395 at bitwardenSelfLicensor.Program.GenerateOrgLicense(X509Certificate2 cert, String corePath, String userName, String email, Int16 storage, Guid instalId, String businessName, String key) in /licenseGen/Program.cs:line 407 at bitwardenSelfLicensor.Program.<>c__DisplayClass0_1.<Main>b__7() in /licenseGen/Program.cs:line 152 at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args) at bitwardenSelfLicensor.Program.Main(String[] args) in /licenseGen/Program.cs:line 286
But creating a user license works fine. I've tested it on 2 different servers (1 with an already working installation and one completely new). Both are running Debian 10.