Hi @Ammaz_Ahmed ,
There are many reasons for the issue, please check the following threads the community members are discussed various methods to solve the issue.
Document is invalid - Workflow - Help - UiPath Community Forum
Document is invalid- Unable to open the Workflow file - Help / Studio - UiPath Community Forum
Document is Invalid Error - UiPath tool - Help / Orchestrator - UiPath Community Forum