{"record":{"id":"372695ec8f4f0efc","repo":"slackhq/nebula","slug":"error-creating-interface-w","errorCode":null,"errorMessage":"Error creating interface: %w","messagePattern":"Error creating interface: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"wintun/tun.go","lineNumber":73,"sourceCode":"\n//go:linkname procyield runtime.procyield\nfunc procyield(cycles uint32)\n\n//go:linkname nanotime runtime.nanotime\nfunc nanotime() int64\n\n// CreateTUN creates a Wintun interface with the given name. Should a Wintun\n// interface with the same name exist, it is reused.\nfunc CreateTUN(ifname string, mtu int) (Device, error) {\n\treturn CreateTUNWithRequestedGUID(ifname, WintunStaticRequestedGUID, mtu)\n}\n\n// CreateTUNWithRequestedGUID creates a Wintun interface with the given name and\n// a requested GUID. Should a Wintun interface with the same name exist, it is reused.\nfunc CreateTUNWithRequestedGUID(ifname string, requestedGUID *windows.GUID, mtu int) (Device, error) {\n\twt, err := wintun.CreateAdapter(ifname, WintunTunnelType, requestedGUID)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"Error creating interface: %w\", err)\n\t}\n\n\ttun := &NativeTun{\n\t\twt:     wt,\n\t\tname:   ifname,\n\t\thandle: windows.InvalidHandle,\n\t}\n\n\ttun.session, err = wt.StartSession(0x800000) // Ring capacity, 8 MiB\n\tif err != nil {\n\t\ttun.wt.Close()\n\t\treturn nil, fmt.Errorf(\"Error starting session: %w\", err)\n\t}\n\ttun.readWait = tun.session.ReadWaitEvent()\n\treturn tun, nil\n}\n\nfunc (tun *NativeTun) Name() (string, error) {","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/slackhq/nebula/blob/dd8f660c0ac37903ec4080ca4d3c861ba9342ceb/wintun/tun.go#L55-L91","documentation":"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.","triggerScenarios":"Thrown at wintun/tun.go:73 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"dd8f660c0ac37903ec4080ca4d3c861ba9342ceb","analyzedAt":"2026-09-03T11:13:55.444Z","contentChangedAt":"2026-09-03T11:13:55.444Z","schemaVersion":2},"datasetVersion":"2026-09-10T17:17:09.494Z"}