Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[phpDocumentor 3] Windows --setting=graphs.enabled=true Unable to launch a new process. #2365

Open
donbidon opened this issue May 29, 2020 · 4 comments

Comments

@donbidon
Copy link

donbidon commented May 29, 2020

Using --setting=graphs.enabled=true leads to failure: Unable to launch a new process.
php.ini

; open_basedir = 
; disable_functions =
; disable_classes =

https://skr.sh/i/290520/1AAOR0Jk.png?download=1

Environment

  • Version used: v3.0.0-rc;
  • Install method: composer;
  • PHP version:
    ** PHP 7.3.18 (cli) (built: May 12 2020 10:54:33) ( NTS MSVC15 (Visual C++ 2017) x64 );
    ** PHP 7.4.6 (cli) (built: May 12 2020 11:38:52) ( NTS Visual C++ 2017 x64 );
  • Graphviz 2.38 x86 (bin directory added to path variable, dot.exe command works);
  • Operating system and version: Windows 10 x64 1909 build 18363.836.
@jaapio jaapio added this to Needs triage in phpDoc issue triage board May 29, 2020
@mvriel mvriel added this to To do in Comference Hackathon Aug 21, 2020
@jamesjohnmcguire
Copy link

jamesjohnmcguire commented Oct 2, 2021

I'm also running into this on Windows with version 3.1.2. Here is a stack trace:

ERROR [console] Error thrown while running command "-vvv --setting="graphs.enabled=true" -d SourceCode -t Documentation". Message: "Unable to launch a new process."
[
"exception" => Symfony\Component\Process\Exception\RuntimeException^ {
#message: "Unable to launch a new process."
#code: 0
#file: "phar://path.to/phpdocumentor.phar/vendor/symfony/process/Process.php"
#line: 350
trace: {
phar://path.to/phpdocumentor.phar/vendor/symfony/process/Process.php:350 {
Symfony\Component\Process\Process->start(callable $callback = null, array $env = [])^
› if (!\is_resource($this->process)) {
› throw new RuntimeException('Unable to launch a new process.');
› }
}
phar://path.to/phpdocumentor.phar/vendor/symfony/process/Process.php:247 { …}
phar://path.to/phpdocumentor.phar/src/phpDocumentor/Transformer/Writer/Graph/PlantumlRenderer.php:52 { …}
phar://path.to/phpdocumentor.phar/src/phpDocumentor/Transformer/Writer/Graph/PlantumlClassDiagram.php:55 { …}
phar://path.to/phpdocumentor.phar/src/phpDocumentor/Transformer/Writer/Graph.php:73 { …}
phar://path.to/phpdocumentor.phar/src/phpDocumentor/Transformer/Transformer.php:231 { …}
phar://path.to/phpdocumentor.phar/src/phpDocumentor/Transformer/Transformer.php:198 { …}
phar://path.to/phpdocumentor.phar/src/phpDocumentor/Transformer/Transformer.php:133 { …}
phar://path.to/phpdocumentor.phar/src/phpDocumentor/Pipeline/Stage/Transform.php:97 { …}
phar://path.to/phpdocumentor.phar/vendor/league/pipeline/src/FingersCrossedProcessor.php:11 { …}
phar://path.to/phpdocumentor.phar/vendor/league/pipeline/src/Pipeline.php:34 { …}
phar://path.to/phpdocumentor.phar/vendor/league/pipeline/src/Pipeline.php:39 { …}
phar://path.to/phpdocumentor.phar/vendor/league/pipeline/src/FingersCrossedProcessor.php:11 { …}
phar://path.to/phpdocumentor.phar/vendor/league/pipeline/src/Pipeline.php:34 { …}
phar://path.to/phpdocumentor.phar/vendor/league/pipeline/src/Pipeline.php:39 { …}
phar://path.to/phpdocumentor.phar/src/phpDocumentor/Console/Command/Project/RunCommand.php:290 { …}
phar://path.to/phpdocumentor.phar/vendor/symfony/console/Command/Command.php:256 { …}
phar://path.to/phpdocumentor.phar/vendor/symfony/console/Application.php:989 { …}
phar://path.to/phpdocumentor.phar/vendor/symfony/framework-bundle/Console/Application.php:96 { …}
phar://path.to/phpdocumentor.phar/vendor/symfony/console/Application.php:290 { …}
phar://path.to/phpdocumentor.phar/vendor/symfony/framework-bundle/Console/Application.php:82 { …}
phar://path.to/phpdocumentor.phar/vendor/symfony/console/Application.php:166 { …}
phar://path.to/phpdocumentor.phar/bin/phpdoc:43 { …}
C:\Users\JamesMc\Data\External\Util\Bin\phpdocumentor.phar:14 { …}
}
},
"command" => "-vvv --setting="graphs.enabled=true" -d SourceCode -t Documentation",
"message" => "Unable to launch a new process."
]
16:34:28 DEBUG [console] Command "-vvv --setting="graphs.enabled=true" -d SourceCode -t Documentation" exited with code "1"
[
"command" => "-vvv --setting="graphs.enabled=true" -d SourceCode -t Documentation",
"code" => 1
]

In Process.php line 350:

[Symfony\Component\Process\Exception\RuntimeException]
Unable to launch a new process.

$process = new Process([$this->plantUmlBinaryPath, '-tsvg', $pumlFileLocation], DIR, null, null, 600.0);

@jamesjohnmcguire
Copy link

The failing symfony process code starting at line 350 in process.php:

    $this->process = @proc_open($commandline, $descriptors, $this->processPipes->pipes, $this->cwd, $envPairs, $this->options);

    if (!\is_resource($this->process)) {
        throw new RuntimeException('Unable to launch a new process.');
    }

@jamesjohnmcguire
Copy link

Seems to be Windows specific. Some search results indicate that using the following should resolve the issue:

$process->setEnhanceWindowsCompatibility(false);

@sebastian-meyer
Copy link
Contributor

*bump*

Any news on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
phpDoc issue triage board
  
Needs triage
Development

No branches or pull requests

3 participants