{"record":{"id":"eec4dc07f961a000","repo":"lionsoul2014/ip2region","slug":"newv6config-w","errorCode":null,"errorMessage":"NewV6Config: %w","messagePattern":"NewV6Config: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"binding/golang/main.go","lineNumber":69,"sourceCode":"\t}\n\tv4Config, err := service.NewV4Config(v4CPolicy, v4DbPath, 1)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"NewV4Config: %w\", err)\n\t}\n\n\t// try to create v6 config\n\tv6Policy, err := service.CachePolicyFromName(v6CachePolicy)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"parse v6 cache policy: %w\", err)\n\t}\n\n\tv6DbPath, err := homedir.Expand(v6XdbPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"Expand(`%s`): %s\", v6XdbPath, err)\n\t}\n\tv6Config, err := service.NewV6Config(v6Policy, v6DbPath, 1)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"NewV6Config: %w\", err)\n\t}\n\n\treturn service.NewIp2Region(v4Config, v6Config)\n}\n\nfunc createSearcher(dbPath string, cachePolicy string) (*xdb.Searcher, error) {\n\thandle, err := os.OpenFile(dbPath, os.O_RDONLY, 0600)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"open xdb file `%s`: %w\", dbPath, err)\n\t}\n\n\tdefer handle.Close()\n\n\t// verify the xdb file\n\t// @Note: do NOT call it every time you create a searcher since this will slow down the search response.\n\t// @see the util.Verify function for details.\n\terr = xdb.Verify(handle)\n\tif err != nil {","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/lionsoul2014/ip2region/blob/c1a1fc7d5941760db3f8431dc05c48cf7f0e30a1/binding/golang/main.go#L51-L87","documentation":"Go service factory: NewV6Config (open/verify/header/version/cache loading for the v6 xdb) failed; the wrapped cause identifies the failing step, e.g. bad file or version mismatch.","triggerScenarios":"Thrown at binding/golang/main.go:69 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped cause (verify, header load, version match, cache load)","Point the v6 config at a valid IPv6 xdb database","Regenerate or re-download the v6 xdb and retry"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c1a1fc7d5941760db3f8431dc05c48cf7f0e30a1","analyzedAt":"2026-09-02T16:58:39.988Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T21:17:11.164Z"}