fish2018/pansou · error

获取PoW验证数据失败

Error message

获取PoW验证数据失败: %w

What it means

Wrapped request error in GyingPlugin.solveRemotePowChallenge (plugin/gying/gying.go:1687): the GET to the /res/pow challenge endpoint failed at the transport level (requestWithChallengeRetry returned an error), so the proof-of-work data could not be retrieved.

Solutions

  1. 确认 gying 站点 /res/pow 端点仍存在
  2. 对挑战请求增加退避重试
  3. 开启 DebugLog 观察具体底层错误
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at plugin/gying/gying.go:1687 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of fish2018/pansou@beaa561337 (2026-09-07). Data as JSON: /api/errors/daa504d606d90245. Report an issue: GitHub.

Appendix: source

Thrown at plugin/gying/gying.go:1687

		return p.solvePowChallenge(scraper, requestURL, &challenge)
	}

	return p.solveLegacyHashChallenge(scraper, requestURL, &challenge)
}

func (p *GyingPlugin) solveRemotePowChallenge(scraper *cloudscraper.Scraper, requestURL string) error {
	powURL, err := p.buildPowURL(requestURL)
	if err != nil {
		return err
	}

	if DebugLog {
		fmt.Printf("[Gying] Remote PoW Challenge命中: url=%s powURL=%s\n", requestURL, powURL)
	}

	body, statusCode, _, err := p.requestWithChallengeRetry(scraper, http.MethodGet, powURL, "", "")
	if err != nil {
		return fmt.Errorf("获取PoW验证数据失败: %w", err)
	}
	if statusCode != http.StatusOK {
		return fmt.Errorf("获取PoW验证数据失败: HTTP %d", statusCode)
	}

	var challenge ChallengePageData
	if err := json.Unmarshal(body, &challenge); err != nil {
		return fmt.Errorf("解析PoW验证数据失败: %w", err)
	}
	if challenge.N == "" || challenge.X == "" || challenge.T <= 0 {
		return fmt.Errorf("PoW验证数据无效")
	}

	y, err := p.computePowResult(&challenge)
	if err != nil {
		return err
	}

View on GitHub (pinned to beaa561337)