rialto-php / puphpeteer

A Puppeteer bridge for PHP, supporting the entire API.
MIT License
1.34k stars 208 forks source link

ProcessUnexpectedlyTerminatedException #74

Open AsimTariq opened 4 years ago

AsimTariq commented 4 years ago

Describe the bug When trying to run this code i get the error:

production.ERROR: Nesk\Rialto\Exceptions\ProcessUnexpectedlyTerminatedException: The process has been unexpectedly terminated.

Reproducible example

    $puppeteer = new Puppeteer([
        'executable_path' => 'C:\Program Files\nodejs\node.exe'
    ]);
    $browser = $puppeteer->launch(); 

Expected behavior Expected it to run without problems

Environment (please complete the following information):

My Node package manager is:

Additional context I have been looking at https://github.com/bobthecow/psysh/wiki/Configuration but i do not have this folder. I am using Lumen framework. There is no psysh folder. https://github.com/bobthecow/psysh/issues/198

MattPurland commented 4 years ago

@AsimTariq did you ever overcome this issue? I'm experiencing the exact same problem

MattPurland commented 4 years ago

If it helps anyone, I'm getting the following in the process error log (%HOMEPATH%\AppData\Local\Temp\sf_proc_00.err)

'git' is not recognized as an internal or external command, operable program or batch file.

I have no idea why this would happen, @AsimTariq are you getting the same error? I'm guessing this may be related to why we need to specify the path to node.exe as the PATH doesn't seem to apply here.

zlseqx commented 4 years ago

https://github.com/nesk/puphpeteer/issues/88#issue-598199063;

I also encountered such a problem, how did you deal with it?

bapcltd-marv commented 4 years ago

I had an issue similar to this where puphpeteer was falling over due to the js-portion receiving an invalid json payload- this was due to loading too much data via setContent, dumping the content to file & loading the file eliminated my particular issue.

nesk commented 4 years ago

Related to #87