Nothing actually worked I tried stopping AEM instance delete the folder logs and repository/index , downloaded the OAK-Run-Jar restarted the instances several times restarted the PC chrome everything but when I build the project I am getting this same error.
I found the solution one of my bundle was Active but still giving an error kindly delete the index file from crx-quickstart and run again the instance will work fine.
Check if you have enough memory required for an AEM instance.
5 GB free disk space in the installation directory
2 GB memory
If it was working before and the issue is observed recently, try to dig down the old error.log files (error.log files that are rotated as old files with dates) and check if you have any error related to memory like the below