What could cause this, and what can I do to fix it?

I think this stemmed from a change I made to a custom object, Invention__c. I deleted the default "Invention Layout" and replaced it with two others. When I did that I got the error "Entity of type 'Layout' named 'Invention__c-Invention Layout' cannot be found."

To fix that, I recreated the page layout and named it the same thing. Now I am getting this error. How can I recover the work I did in the scratch org? I don't mind making a new scratch org if I need to trash the current one.

  • OK, so I deleted that scratch org and created a new scratch org. I pushed to this new scratch org and then added fields and page layouts. That went fine, but in adding a new lightning bundle and an apex class I am getting the same error. What could be the problem? – Chance Dec 14 '17 at 20:55
  • The problem seems to be with the controller class I built. I really cannot fathom what is causing the error. I deleted the controller class and then tried sfdx force:source:pull and suddenly it worked! Somehow my class is being pulled after I deleted it? I don't understand this at all. – Chance Dec 15 '17 at 14:54
  • And now I cannot recreate the class. It is saying there is a duplicate on id value of <unknown>. Not only that, but I cannot edit my lightning components because it is saying "Failed to save myComp.cmp: invalid record id." Not only that, but my pull is not getting the components. What gives? Is this a bug with scratch orgs? Can I not do lightning development in scratch orgs? – Chance Dec 15 '17 at 14:58
  • After closing and reopening my scratch org and VS, I tried to open my lightning bundle. Dev console opened up, then said it could not read the file, and closed all my component tabs. Now the lightning component is completely removed. It seems the problem was in the components? – Chance Dec 15 '17 at 15:16
  • I have this same problem with another scratch org. I am beginning to believe this is a bug. – Chance Dec 18 '17 at 20:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.