Troubleshooting
Common failures and how to diagnose them. Most issues fall into one of three buckets: build-time (nupkg not produced or wrong shape), publish-time (registry rejected the upload), or load-time (the WorkManager Runtime can't load the package after CreateWorker). For a load-time failure, start with the worker's load-failed or failed event on sys.workmanager.worker.lifecycle: it carries error_type and error_message. The WorkManager's Troubleshooting page covers the Runtime side.
"virtufin-worker build fails with ERROR: .../Virtufin.Worker.HttpGet.nupkg not written; is VirtufinPackageWorker enabled?"
Worker.DevKit's VirtufinPackageWorker target didn't run. Check:
- Exactly one project under
<Worker>/src/sets<VirtufinPackageWorker>true</VirtufinPackageWorker>; that is the one the CLI publishes. - Does
dotnet publishitself succeed? Its output is printed above the error.
"virtufin-worker build --native hangs in docker buildx build"
Two common causes:
- The cross-build image can't be pulled. It is private:
docker login docker.haenerconsulting.comfirst, or pre-pulldocker.haenerconsulting.com/library/dotnet-crossbuild:11. - On Apple Silicon, the cross-build image runs via
qemu-x86_64emulation. This is slow (~15+ minutes for an AOT compile). The compile is happening, just slowly. Let it finish, or run on an x86_64 host.
"load-failed: TypeLoadException or MissingMethodException naming a Virtufin.* type"
The Runtime resolves a managed worker's Virtufin.* dependencies at load time, always at their latest versions, so the worker runs against newer libraries than it was built with. A member the worker uses was removed or changed in one of them (a MINOR bump before 1.0). The loaded event's libraries field lists the versions a successful load resolved.
Fix: repin Directory.Packages.props to the latest versions on the feed, rebuild, fix the compile errors, and publish a new LIBRARY_VERSION.
"A consumer implementing the runtime-arch check raises UnsupportedWorkerRuntimeError: supports [linux-arm64, linux-x64], but you are on osx-arm64"
You're trying to load a Linux-only worker nupkg on macOS. The worker was built with linux-arm64,linux-x64 RIDs and the AOT path doesn't ship osx-* binaries.
Fix:
1. Run the worker in a Linux container. virtufin-worker build --native only produces linux-arm64 and linux-x64 (the cross-build image has no osx-* toolchain).
2. OR use the managed layout (application/x-dotnet-dll, built by virtufin-worker build without Docker). The managed DotNetDllEngine loads it on any RID.
"load-failed with an HTTP 401"
The org feeds are private and the code source carried no credential. The Runtime fetches the package itself, so the 401 shows up as the load failure, not as a CreateWorker error.
Fix: pass "credential": {"named": "virtufin"} in the code_source (see Getting Started); workers.toml entries do this with authentication = "virtufin".
"load-failed with an HTTP 404"
The URL names a version the feed does not hold. Verify:
- The version is published on the feed. The feed keeps only recent versions, so an old version in a script or in workers.toml disappears after later publishes.
- The URL is the right Gitea path; virtufin-worker create <Worker> --dry-run prints the one it would send.
"AOT smoke test fails: missing nupkg entries: [...]
virtufin-worker build --native didn't stage the .so. Check:
- The AOT compile actually produced the .so (look at the dotnet publish output).
- The AssemblyName in the AOT csproj matches the on-disk filename (it should, by default).
- The build's rename step (<AssemblyName>.so to lib<AssemblyName>.so) found its input. If the AOT output is named differently (e.g. <AssemblyName>Native.so), the rename no-ops and the nupkg has the wrong filename.
"AOT smoke test fails: 404 NOT exported (got: [...])"
The .so was produced but the [UnmanagedCallersOnly] exports aren't there. Check the AOT shim's Process and FreeResult methods have the correct attributes:
[UnmanagedCallersOnly(EntryPoint = "Process")]
public static unsafe int Process(
IntPtr host, IntPtr inBuf, int inLen, IntPtr outBuf, IntPtr outLen)
=> AotNative<MyWorkerNative>.ProcessStatic(
host, inBuf, inLen, (IntPtr*)outBuf, (int*)outLen);
[UnmanagedCallersOnly(EntryPoint = "FreeResult")]
public static void FreeResult(IntPtr result)
=> AotNative<MyWorkerNative>.FreeResultStatic(result);
If the methods aren't there or the entry-point names differ, the AOT compiler may have stripped them as unused. The NativeAOT analyzer (<EnableAotAnalyzer>true</EnableAotAnalyzer>) flags these at build time.
"Docker pull hangs on the cross-build image"
The registry is reachable (HEAD works) but the layer download stalls. This is a known intermittent issue with the local registry mirror. Mitigations:
1. Retry with a delay.
2. Run on a host with a more direct network path to the registry.
3. Pre-pull the image and pass --docker-image '' to virtufin-worker build --native to use the host toolchain instead (requires clang and aarch64-linux-gnu-objcopy / x86_64-linux-gnu-objcopy on $PATH).
"A worker stays LOADING"
The Runtime fetches the package (with a 30-second timeout), resolves its dependencies and loads the engine in the background. Check: - The URL is reachable from the Runtime pod (DNS, network) and its host passes the WorkManager's code-source allow-list. - The version exists on the feed.
The Runtime's log shows the fetch failure at load time; see the WorkManager's Troubleshooting.
"A message produced no response"
A worker on the devkit base classes answers a failure with an error response on wrk.<type>.error (or the caller's replytopic). A message the worker still failed on is not retried: the Runtime publishes it once to dlq.<input topic> with dlqworkerid, dlqerrortype and dlqerrormessage. Subscribe to that topic and filter on dlqworkerid; see Dead letters.
See also
- Build Script — what each script does
- Packaging Modes — the nupkg structure the Runtime expects
- Engines — managed, native and Python for the workers here
- Runtime Arch Check — what the
.supported-ridssidecar is for