When attempting to run a comparison, you may have come across an error similar to this:
"The resource data for the static resource 'unpackaged/staticresources/ leaflet.resource-meta.xml' appears to be missing, although the XML file is present. Gearset cannot process this file without this data."
This article explains why this error occurs and how you can get past it.
What causes this error?
Static resources are a unique metadata type that doesn't store the required data within the "
.resource-meta.xml" file itself. Instead, the files references another accompanying file, that actually contains the required data. This is a screenshot from the "staticresources" folder within a repository:
As you can see, for each "
.resource-meta.xml" also has an accompanying data file (e.g.
leaflet.resource). You'll run into this error if Gearset can locate one of these files, but not the other. Here is an example of a problematic "staticresources" folder where these are missing:
I'm not attempting to compare/deploy the "Static Resources" metadata type, why am I still hitting this error?
Regardless of the metadata types that you're attempting to compare, you will still find that you hit this error. As the first step of any comparison, Gearset looks at your entire repository, so if there are any issues within it, we won't be able to read it properly.
How do I fix this error?
You have a couple of options as to how you can avoid this trouble:
1) Add the missing file to your repository. As long as you have both the reference file and data file for each static resource, you shouldn't hit this error.
2) Remove the file that's referencing the missing file. For example, simply removing the problem "
.resource-meta.xml" file should avoid this error.