While trying to pull changes from a scratch org (sfdx force:source:pull
, tried with and without -f
), I'm getting this error:
Entity of type 'ListView' named 'Note_Relation__c.My_Notes' cannot be found.
I do have a custom object Note_Relation__c
, and it exists both locally and in the scratch org. However, it's not an object that is normally accessed directly. It has no tab, and should have no list views. Nonetheless, I've checked the object's list view (via prefix, e.g., /a0D
in both Classic and LEX view), and I can find no list views at all. I've also tried adding an entry to .forceignore
:
force-app/main/default/objects/Note_Relation__c/listViews/My_Notes.listView
This has no effect either. At this point, I'm stuck with a bunch of config changes in a scratch org that I cannot pull. I can find no references to this error message with scratch orgs. Has anyone seen this issue?
Edit to clarify: I tried the .forceignore
line based on what I think the file name should be; I have no force-app/main/default/objects/Note_Relation__c/listViews
directory locally.
Edit 2: Workaround: I found a workaround that doesn't make sense to me, but it works. I'm not adding it as an answer yet because I'm not sure what's happening. The workaround is to add the following line to .forceignore
Note_Relation__c.My_Notes
Even though this isn't a DX filepath, it's the name from the error message, and it seems to work.
force:source:tracking:clear
orforce:source:tracking:reset
If source tracking gets confused, and starts reporting inaccuracies, you can clear local source tracking information withforce:source:tracking:clear
or both local and remote source tracking information withforce:source:tracking:reset
. Be very careful when using these commands, because they cannot be undone, and they reset source tracking at the org-level, which means other developers also have their source tracking reset.