{"record":{"id":"9cc9696a8adc2367","repo":"netbirdio/netbird","slug":"error-assigning-ip-s","errorCode":null,"errorMessage":"error assigning ip: %s","messagePattern":"error assigning ip: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/iface/device/device_darwin.go","lineNumber":62,"sourceCode":"\nfunc (t *TunDevice) Create() (WGConfigurer, error) {\n\ttunDevice, err := tun.CreateTUN(t.name, int(t.mtu))\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error creating tun device: %s\", err)\n\t}\n\tt.filteredDevice = newDeviceFilter(tunDevice)\n\n\t// We need to create a wireguard-go device and listen to configuration requests\n\tt.device = device.NewDevice(\n\t\tt.filteredDevice,\n\t\tt.iceBind,\n\t\tdevice.NewLogger(wgLogLevel(), \"[netbird] \"),\n\t)\n\n\terr = t.assignAddr()\n\tif err != nil {\n\t\tt.device.Close()\n\t\treturn nil, fmt.Errorf(\"error assigning ip: %s\", err)\n\t}\n\n\tt.configurer = configurer.NewUSPConfigurer(t.device, t.name, t.iceBind.ActivityRecorder())\n\terr = t.configurer.ConfigureInterface(t.key, t.port)\n\tif err != nil {\n\t\tt.device.Close()\n\t\tt.configurer.Close()\n\t\treturn nil, fmt.Errorf(\"error configuring interface: %s\", err)\n\t}\n\treturn t.configurer, nil\n}\n\nfunc (t *TunDevice) Up() (*udpmux.UniversalUDPMuxDefault, error) {\n\terr := t.device.Up()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/netbirdio/netbird/blob/93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c/client/iface/device/device_darwin.go#L44-L80","documentation":"Error \"error assigning ip: %s\" thrown in netbirdio/netbird.","triggerScenarios":"Thrown at client/iface/device/device_darwin.go:62 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c","analyzedAt":"2026-08-16T03:09:19.136Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}