Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
fix:Ganache loading forever being stuck due to project details not lo…
Browse files Browse the repository at this point in the history
…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
maoueh authored and davidmurdoch committed Aug 28, 2019
1 parent 7ec85e7 commit 4926df7
Show file tree
Hide file tree
Showing 7 changed files with 388 additions and 429 deletions.
Loading

0 comments on commit 4926df7

Please sign in to comment.