Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save aaronschachter/95999abcf33eeacb77a150179cad331f to your computer and use it in GitHub Desktop.

Select an option

Save aaronschachter/95999abcf33eeacb77a150179cad331f to your computer and use it in GitHub Desktop.

"Duplicate locales provided" Error Investigation

Date: 2026-06-24 Zendesk: #1152735 Triage thread: #triage-build-content First spotted: Aaron flagged during June 17 deploy

Error

BadArgumentError: Invalid argument provided: Duplicate locales provided

Stack: prepareCMSInsertRow.ts:81 -> planInsertMany.ts:34 -> CMSInsertOperations/index.ts:180

Thrown during PG storage layer insert when publishing CMS items (single-item publish via ?live=true).

Instance Count (last 7 days, prod only)

Date Count Service Notes
June 18 1 webflow-app-designer First prod occurrence (next day after deploy with PR #112025)
June 19 3 webflow-app-designer, webflow-api-public Both designer and Data API paths
June 23 2 webflow-api-public API-only
June 24 ~20 webflow-app-designer Burst today, customer filed Zendesk
Total ~26 error-level Plus ~12 warn/debug/alert companion log lines = 38 total log entries

4 additional entries in acceptance env are from Melissa (support agent) reproducing on a cloned site.

Affected Site (NEEDS VERIFICATION)

All raw log entries inspected reference the same identifiers:

  • Site: the-players-club-demo (ID: 63b837dc0c589a17b229102a)
  • Collection: Team Squad (ID: 642ed7f8af160bc37708b2a7)
  • CMS Database: 63dccc8505089e801533239d
  • User: 60b50b40553ca3cf7d225d69
  • Locale causing the duplicate: 653adac7e882f528b36c949a (site has only 1 locale configured)

TODO: Verify no other sites are affected. The siteShortName field was empty in Datadog pattern grouping. Verification queries below.

Datadog Verification Queries

Raw logs (all envs, 7 days): https://app.datadoghq.com/logs?from_ts=1781735906470&live=false&query=%22Duplicate+locales+provided%22&stream_sort=desc&to_ts=1782340706470

Prod-only pattern view (grouped by siteShortName): https://app.datadoghq.com/logs?agg_q=%40siteShortName&agg_q_source=base&clustering_pattern_field_path=message&from_ts=1781654400000&live=false&query=%22Duplicate+locales+provided%22+env%3Aprod&stream_sort=desc&to_ts=1782316800000&viz=pattern

Prod errors only (last 7 days): https://app.datadoghq.com/logs?from_ts=1781735921990&live=false&query=%22Duplicate+locales+provided%22+env%3Aprod+status%3Aerror&stream_sort=desc&to_ts=1782340721990

Traces from the Zendesk customer's session (June 24 ~20:32-20:36 UTC):

  • 585062009509051300
  • 3017486135958930189
  • 2221088855089556947

Site-scoped logs (confirm all hits are this site): https://app.datadoghq.com/logs?from_ts=1781654400000&live=false&query=%22Duplicate+locales+provided%22+env%3Aprod+-%2263b837dc0c589a17b229102a%22&stream_sort=desc&to_ts=1782340706470

^ This query excludes the known site ID. If it returns 0 results, all instances are confirmed to be this one site.

Code Paths Hit

Two distinct CMS write paths trigger the error:

  1. Insert (new item + publish): postCollectionItem -> insertCMSItem -> addItems -> insertMany -> planInsertMany -> prepareCMSInsertRow (BOOM)
  2. Update (edit existing item): updateCMSItems -> updateItem -> insertMany -> planInsertMany -> prepareCMSInsertRow (BOOM)

Both converge at prepareCMSInsertRow.ts:81 where the locale dedup check fires.

Suspected Cause

Juan suspects CMSAUTH-5387/5388 (INSERT/UPDATE write context wiring, PR #112025, ticket CONT-4959).

Datadog's error tracking also flagged PR #112025 as the suspected first-seen version.

The site has 1 locale but prepareCMSInsertRow sees duplicate locale IDs in the insert row data. Likely a data integrity issue specific to this collection's locale metadata rather than a universal regression (Juan couldn't repro on a blank site).

Customer Impact

  • Customer reports the error toast fires, but the item does actually get created and published (at least to the .webflow.io staging domain).
  • The custom domain publish (theplayersgolfclub.com) fails with a separate Validation Failure error.
  • Only the "Team Squad" collection is affected. Other collections on the same site work fine.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment