This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix:Ganache loading forever being stuck due to project details not lo…
…ading (#1382) Fixed Ganache loading forever being stuck because project details loader never resolves/rejects The project loader is performed using a child spawn that should resolved or rejects at some point. However, it seems that in some cases (when some dependencies of the truffle project are missing), the child spawn will issue an 'exit` event without ever entering the 'error` event. This is problematic because since this is not trapped properly, the actual Ganache dependency that is waiting for project loading to happen never resolves and the Ganache UI is loading forever being stuck in this loop. To resolves that, the 'exit' signal is now catched as well as the standard error output of the process. When the child process exits with a bad error code and as now received the `error` event, a message is now forwarded within an `Error` object and the standard error output is present in there. This removes the infinite loop in Ganache and shows the actual standard error in the process.
- Loading branch information