Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unleash.Client throws DllNotFoundException on creating client #274

Open
pandrija opened this issue Feb 5, 2025 · 2 comments
Open

Unleash.Client throws DllNotFoundException on creating client #274

pandrija opened this issue Feb 5, 2025 · 2 comments
Assignees

Comments

@pandrija
Copy link

pandrija commented Feb 5, 2025

Describe the bug
Unleash.Client throws DllNotFoundException on creating client

To Reproduce
Steps to reproduce the behavior:

  1. Create a minimal NET Framework 4.81 Web API project from VS template
  2. Create new singleton instance of IUnleash in Global.asax.cs with valid token and URL
  3. Use singleton IUnleash instance from one API controller to call IsEnabled()
  4. Run

Expected behavior
Feature flag is read and app works

Screenshots

Image

Stack trace:

System.DllNotFoundException
HResult=0x80131524
Message=Unable to load DLL 'yggdrasilffi': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Source=Yggdrasil.Engine
StackTrace:
at Yggdrasil.FFI.new_engine()
at Yggdrasil.YggdrasilEngine..ctor(List1 strategies) at Unleash.UnleashServices..ctor(UnleashSettings settings, EventCallbackConfig eventConfig, List1 strategies)
at Unleash.DefaultUnleash..ctor(UnleashSettings settings, IStrategy[] strategies)
at Unleash.ClientFactory.UnleashClientFactory.d__2.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at WebApplication1.UnleashWrapper.Initialize() in C:\Users\pandrijasevic\source\repos\WebApplication1\WebApplication1\UnleashWrapper.cs:line 27
at WebApplication1.WebApiApplication.Application_Start() in C:\Users\pandrijasevic\source\repos\WebApplication1\WebApplication1\Global.asax.cs:line 22

Desktop (please complete the following information):

  • OS: Windows 11 Arm64, but same happens on Windows 10/11 x86_64
  • Browser Chrome

Additional context
When I download yggdrasil.dll from https://github.com/Unleash/yggdrasil/releases and copy it manually in the app's bin directory, it all works as expected. Please note that when I create similar minimal example with NET9 ASP.NET Core, it works correctly out of the box as the dll is available in the "runtimes" subdirectory.
I already commented on #270 but it did not get much traction, and this is a blocker for our rollout (we are expecting to use Enterprise plan if that matters).

@sighphyre
Copy link
Member

Hey @pandrija, thanks for opening a separate issue for this.

I haven't been able to reproduce this properly, but let me poke it a bit

If this is an urgent blocker for you folks, you should be able to use version 4 of the SDK, which doesn't use this binary

@sighphyre
Copy link
Member

Hey @pandrija, okay I can reproduce this after all. It's .NET Framework shenanigans. I should have a fix out soon for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Investigating
Development

No branches or pull requests

2 participants