Setup Failed: Could not start up: Error in setup

cd frappe-bench
bench switch-to-branch master
bench update --patch

This solved the issue for me without multiple tries