slackhq/nebula · error
Error creating interface: %w
Error message
Error creating interface: %w
What it means
Wrapping error in CreateTUNWithRequestedGUID (Windows): wintun.CreateAdapter failed to create or open the Wintun adapter with the requested name/GUID. Typical causes: the Wintun driver is not installed, insufficient privileges (driver load needs admin), or a stale conflicting adapter; the HRESULT is preserved via %w.
Source
Thrown at wintun/tun.go:73
//go:linkname procyield runtime.procyield
func procyield(cycles uint32)
//go:linkname nanotime runtime.nanotime
func nanotime() int64
// CreateTUN creates a Wintun interface with the given name. Should a Wintun
// interface with the same name exist, it is reused.
func CreateTUN(ifname string, mtu int) (Device, error) {
return CreateTUNWithRequestedGUID(ifname, WintunStaticRequestedGUID, mtu)
}
// CreateTUNWithRequestedGUID creates a Wintun interface with the given name and
// a requested GUID. Should a Wintun interface with the same name exist, it is reused.
func CreateTUNWithRequestedGUID(ifname string, requestedGUID *windows.GUID, mtu int) (Device, error) {
wt, err := wintun.CreateAdapter(ifname, WintunTunnelType, requestedGUID)
if err != nil {
return nil, fmt.Errorf("Error creating interface: %w", err)
}
tun := &NativeTun{
wt: wt,
name: ifname,
handle: windows.InvalidHandle,
}
tun.session, err = wt.StartSession(0x800000) // Ring capacity, 8 MiB
if err != nil {
tun.wt.Close()
return nil, fmt.Errorf("Error starting session: %w", err)
}
tun.readWait = tun.session.ReadWaitEvent()
return tun, nil
}
func (tun *NativeTun) Name() (string, error) {View on GitHub (pinned to dd8f660c0a)
Solutions
- Install/update the Wintun driver
- Run nebula with administrator privileges
- Remove a stale adapter with the same name and retry
- Check the wrapped HRESULT for the exact failure
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at wintun/tun.go:73 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of slackhq/nebula@dd8f660c0a (2026-09-03).
Data as JSON: /api/errors/372695ec8f4f0efc.
Report an issue: GitHub.