Slack error hash_conflict: View hash does not match current state
Last verified against Slack API reference - chat.postMessage errors
Error returned when the provided hash doesn't match the current stored value.What error hash_conflict means
You passed a hash to views.update (or views.publish), and the view changed since you read that hash. Slack says "Error returned when the provided hash doesn't match the current stored value." This is Slack's built-in optimistic locking, and the error means the lock did its job.
The views.update reference describes hash as "A string that represents view state to protect against possible race conditions." Every view payload includes the current hash. If two updates run at the same time, for example two quick button clicks, or a background job updating a view while the user interacts with it, the second update carries an outdated hash and is rejected instead of overwriting the first.
Your update was not applied. Decide whether it still matters: reload the latest state, rebuild the view, and update again with the new hash. The hash argument is optional; without it, Slack has no stored value to compare against.
What it looks like
POST /api/views.update
{"view_id": "VMM512F2U", "hash": "156772938.1827394", "view": {...}}
{"ok": false, "error": "hash_conflict"}Why it happens
- Two updates to the same view ran concurrently (double-clicks, parallel handlers).
- A background job updated the view using a hash captured before the user's latest action.
- The hash was cached and reused across several updates.
How to fix Slack error hash_conflict
- 1Always take the hash from the most recent payload or API response for that view.
- 2On hash_conflict, reload your state, rebuild the view and retry once with the new hash.
- 3Serialize updates per view_id (a per-view lock or queue).
- 4Leave hash out only where losing a concurrent change is acceptable.
How to stop it recurring
Keep the authoritative state on your server, render views from it, and pass the latest hash with each update. Disable or debounce buttons that start slow work so a second click cannot race the first. Log conflicts per view; frequent conflicts point to a missing lock or an unthrottled background job.
Official reference: Slack API reference - chat.postMessage errors. See all Slack error codes or the Slack limits and quotas.
Related codes
- not_found: View not foundError returned when the given view_id or external_id doesn't exist.
- duplicate_external_id: external_id already in useError returned when the given external_id has already be used.
- view_too_large: View payload exceeds 250kbError returned if the provided view is greater than 250kb.
- expired_trigger_id: trigger_id has expiredThe trigger_id is expired.
Error hash_conflict - quick answers
What does Slack error hash_conflict mean?
You passed a hash to views.update (or views.publish ), and the view changed since you read that hash. Slack says "Error returned when the provided hash doesn't match the current stored value." This is Slack's built-in optimistic locking, and the error means the lock did its job.
How do I fix Slack error hash_conflict?
1. Always take the hash from the most recent payload or API response for that view. 2. On hash_conflict, reload your state, rebuild the view and retry once with the new hash. 3. Serialize updates per view_id (a per-view lock or queue). 4. Leave hash out only where losing a concurrent change is acceptable.
Can I retry after error hash_conflict?
Yes - this is a retryable condition. Back off (start around one second and double on each attempt, with jitter) and watch for a retry-after hint from the platform before resending.
Stop debugging Slack by hand
Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.