Unable to synchronize nodes

https://developer.concordium.software/en/testnet/net/guides/run-node-macos.html
I have followed the above steps to run the node, but I get a log message “TreeState: Database invariant violation: Could not read last finalized block” and the node cannot be synchronized, so I cannot use the Testnet Wallet.
Please let me know how to fix this.

Have you tried following these recovery instructions Troubleshoot a node on MacOS — Concordium documentation ?

That is currently the only way to recover. It looks like your database was corrupted. A common way that happens is if the node is killed without giving it the opportunity to shut down properly.