Corrupted layout or schematic files ->schematic error

https://forum.kicad.info/t/is-it-a-good-idea-to-use-a-nightly-build-version/9309

I’ve found that the “Netlist” and “Update Pcb from Schematic” don’t always agree. You might try both tools and see if one gives a better result.