multilanguages icon indicating copy to clipboard operation
multilanguages copied to clipboard

Fails when using in connection with Okta authorization

Open lovror opened this issue 5 years ago • 1 comments

When using this library and Okta SDK library in same project Okta client fails to load. Both libraries use the same YamlDotNet 9.1.0 library. When including multilanguages library I get MissingMethodException: Method not found: 'System.Collections.Generic.IDictionary`2<YamlDotNet.RepresentationModel.YamlNode,YamlDotNet.RepresentationModel.YamlNode> YamlDotNet.RepresentationModel.YamlMappingNode.get_Children()'.

Links to similar issues: https://devforum.okta.com/t/okta-dotnet-sdk-innitialize/12482/4 https://github.com/okta/okta-sdk-dotnet/issues/467

I anticipate this is something connected to YamlDotNet library so upgrading library could help fixing the problem.

lovror avatar Jan 22 '21 11:01 lovror

Actually it is not correct that both packages use the latest version of YamlDotNet. I have now run into the same problem (with a different package, but the same applies here).

  • Okta.Sdk is now at version 4.0.0 Okta.Sdk 4.0.0 uses FlexibleConfiguration version 1.2.2 FlexibleConfiguration 1.2.2 uses YamlDotNet version 8.1.0

  • AKSoftware.Localization.MultiLanguages now uses YamlDotNet version 9.1.0 We use internally in our project also YamlDotNet 9.1.0

Somehow between YamlDotNet 8.1.0 and 9.1.0 it looks like a method was removed. The fix for my problem was now to revert to YamlDotNet 8.1.0 in our project. The actual fix would be that FlexibleConfiguration should be upgraded to 9.1.0 and Okta.Sdk should be subsequently upgrade to that version of FlexibleConfiguration.

Debbus72 avatar Mar 08 '21 12:03 Debbus72