what are the major changes you did before getting this error - can you track the changes?
looks to be some corruption with repository. is this error in your local environment?
did you change the order and number and try
/0003{/glob "*.pdf"/type "allow"}
anything from dispatcher logs?
are these pdf files appearing fine in publish instance?
Check the service user permission in publisher
cq:lastReplicationAction property of a page. This property is protected and cannot be accessed by anonymous users.
Did you check the reindexing completed successfully after creating index definition?
as you set the <reindex> to true - it should run.
Verify the reindexCount value - it should have increased.
second
can you check with complete path in your query (/content/costco/homepage/jcr:content)
Did you check, if the issue related with Access / Permission issue?
Service User
Check Permission
or
Check the Query and CFM path
Is this CFM working fine in Project A?
How are you adding javascript third party library?
I.e as an external source url or added in AEM client library, so that AEM can minify it?
did you try copying the library source in internal file?