High severitycompilation
Power BI Refresh Error:
StateComparisonError
What does this error mean?
A dbt Slim CI run using state:modified or state:modified+ failed because the manifest comparison process encountered an error — such as a version mismatch, corrupted artifact, or schema change to a contracted node — that prevented reliable change detection.
Common causes
- 1The production manifest.json was generated by a different dbt version than the CI environment, causing the schema URL to differ and making state comparison unreliable
- 2A model that previously had a contract was removed or significantly restructured, and the state comparison logic raised an error on the incompatible diff
- 3The production manifest was generated mid-run and is in a partially written state, causing JSON parse errors during comparison
How to fix it
- 1Step 1: Compare the dbt version used to generate the production manifest with the dbt version in your CI environment — they should match or be at a compatible minor version.
- 2Step 2: Validate the production manifest is complete: python3 -c "import json; json.load(open('manifest.json'))" — a parse error confirms a corrupted artifact.
- 3Step 3: If the comparison consistently fails after a dbt version upgrade, regenerate the production manifest by running a full dbt compile or dbt build in the production environment with the new version.
- 4Step 4: As a fallback, run without --select state:modified to execute all models until the manifest version mismatch is resolved.