fish2018/pansou · error

未能验证intermediate_action_id

Error message

未能验证intermediate_action_id

What it means

discoverActionIDs could not validate the intermediate_action_id: after probing the candidate IDs, no candidate satisfied the intermediate-ID verification check, so intermediateIDFound stayed false. Discovery aborts because the full ID set (credential, intermediate, final link) is required.

Solutions

  1. Clear the action ID cache and re-run discovery to extract a fresh candidate set.
  2. Enable DebugLog to inspect which candidates were probed and why each failed verification.
  3. Manually verify the expected intermediate-ID behavior against the live site (curl).
  4. Update the plugin to match the new upstream ID scheme.
Defensive patterns

Strategy: retry

Try / catch

ids, err := plugin.DiscoverActionIDs()
if err != nil && strings.Contains(err.Error(), "未能验证intermediate_action_id") {
    plugin.InvalidateActionIDCache()
    ids, err = plugin.DiscoverActionIDs() // re-extract candidates
}

Prevention

When it happens

Trigger: Running discoverActionIDs when none of the remaining candidate IDs passes the intermediate-ID probe — upstream changed the intermediate ID, all candidates were consumed by earlier validations, or each probe call errored/returned an unexpected shape.

Common situations: Upstream site updated its ID set so the expected intermediate ID no longer exists among extracted candidates; site layout change reduced candidate extraction; network errors during probes.

Understand the failure class

Background: "invalid response format", "malformed payload", "missing data field": when an API returns 200 but the response shape is wrong — this error's family across 23 libraries.

Related errors


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

Appendix: source

Thrown at plugin/panyq/panyq.go:524

	
	// 从后向前验证
	for i := len(remainingIDs) - 1; i >= 0; i-- {
		id := remainingIDs[i]
		if DebugLog {
			fmt.Printf("panyq: 尝试第 %d 个剩余ID作为intermediate_action_id: %.10s...\n", i+1, id)
		}
		if p.validateIntermediateID(id, testCreds.Hash, testCreds.Sha) {
			finalIDs[ActionIDKeys[1]] = id
			intermediateIDFound = true
			if DebugLog {
				fmt.Printf("panyq: 找到有效的intermediate_action_id: %s\n", id)
			}
			break
		}
	}
	
	if !intermediateIDFound {
		return nil, fmt.Errorf("未能验证intermediate_action_id")
	}
	
	// 获取测试EID
	testHits, _, err := p.getSearchResults(testCreds.Sign, 1, p.client) // 获取第一页测试结果
	if err != nil {
		return nil, fmt.Errorf("获取测试结果失败: %w", err)
	}
	
	if len(testHits) == 0 {
		return nil, fmt.Errorf("获取测试EID失败: 无搜索结果")
	}
	
	testEID := testHits[0].EID
	
	if DebugLog {
		fmt.Printf("panyq: 获取到测试EID: %s\n", testEID)
	}
	

View on GitHub (pinned to beaa561337)