{"record":{"id":"f8311d75efa22170","repo":"fish2018/pansou","slug":"anubis-w-f8311d","errorCode":null,"errorMessage":"提交 Anubis 验证结果失败: %w","messagePattern":"提交 Anubis 验证结果失败: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/miosou/miosou.go","lineNumber":204,"sourceCode":"\tif elapsed < 1 {\n\t\telapsed = 1\n\t}\n\tquery := url.Values{\n\t\t\"id\":          []string{challenge.Challenge.ID},\n\t\t\"response\":    []string{hash},\n\t\t\"nonce\":       []string{strconv.FormatUint(nonce, 10)},\n\t\t\"redir\":       []string{baseURL + \"/\"},\n\t\t\"elapsedTime\": []string{strconv.FormatInt(elapsed, 10)},\n\t}\n\tpassReq, err := http.NewRequestWithContext(ctx, http.MethodGet, baseURL+anubisPassPath+\"?\"+query.Encode(), nil)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"创建 Anubis 验证提交请求失败: %w\", err)\n\t}\n\tsetPageHeaders(passReq)\n\tpassReq.Header.Set(\"Referer\", resp.Request.URL.String())\n\tpassResp, err := p.client.Do(passReq)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"提交 Anubis 验证结果失败: %w\", err)\n\t}\n\tio.Copy(io.Discard, io.LimitReader(passResp.Body, 1<<20))\n\tpassResp.Body.Close()\n\tif passResp.StatusCode != http.StatusOK || isAnubisGateResponse(passResp) {\n\t\treturn fmt.Errorf(\"Anubis 验证结果返回状态码 %d\", passResp.StatusCode)\n\t}\n\treturn nil\n}\n\nfunc (p *MiosouPlugin) invalidateGate() {\n\tp.gateMu.Lock()\n\tp.gateReady = false\n\tp.gateMu.Unlock()\n}\n\nfunc setHeaders(req *http.Request, accept string) {\n\treq.Header.Set(\"User-Agent\", browserUserAgent)\n\treq.Header.Set(\"Accept\", accept)","sourceCodeStart":186,"sourceCodeEnd":222,"githubUrl":"https://github.com/fish2018/pansou/blob/beaa56133755a548ebc51b090b3816e2ae044aa6/plugin/miosou/miosou.go#L186-L222","documentation":"After solving the challenge, the answer is submitted via GET to the Anubis pass endpoint. This error wraps an http.Client.Do transport failure on that submission request (miosou.go:204) — the solution was computed but never delivered.","triggerScenarios":"p.client.Do(passReq) fails: connection reset/refused, TLS error, DNS failure, or the shared gateTimeout context expired during PoW solving, leaving no time for submission.","commonSituations":"Slow devices spending most of gateTimeout on the PoW so the submission phase times out; unstable network mid-flow; server dropping keep-alive connections between the two requests.","solutions":["Increase gateTimeout so PoW solving + submission both fit, especially on slow hardware.","Retry — ensureGate re-runs the whole flow up to 3 times.","Check network/proxy stability between the site and the client.","If context.DeadlineExceeded, reserve budget for submission (e.g. shorter PoW deadline, longer total deadline)."],"exampleFix":"// before\nctx, cancel := context.WithTimeout(context.Background(), gateTimeout)\n// after\nctx, cancel := context.WithTimeout(context.Background(), gateTimeout)\ndebug := \"\" // on timeout, check errors.Is(err, context.DeadlineExceeded)\n_ = debug","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := p.ensureGate(); err != nil {\n    if errors.Is(err, context.DeadlineExceeded) || strings.Contains(err.Error(), \"提交 Anubis 验证结果失败\") {\n        // budget exhausted: raise gateTimeout or retry later\n    }\n    return err\n}","preventionTips":["Give gateTimeout enough headroom for PoW plus submission","Check errors.Is(err, context.DeadlineExceeded) to distinguish timeout from transport failure","Keep connections warm by reusing the same http.Client","Avoid running PoW on heavily loaded CPUs"],"tags":["network","http","anubis","proof-of-work"],"backgroundTag":"http-request-failed","analyzedSha":"beaa56133755a548ebc51b090b3816e2ae044aa6","analyzedAt":"2026-09-07T00:31:18.025Z","contentChangedAt":"2026-09-07T00:31:18.025Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}