You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Getting a Starting inspector on 127.0.0.1:9229 failed: unknown error
Reproducible example
publicfunctionprocessHTML(Request$request)
{
$nodeExecutablePath = 'C:\Program Files\nodejs\node.exe'; // Replace with the actual path$htmlContent = $request->all()[0]; // gets the html of the requester$puppeteer = newPuppeteer([
'executable_path' => $nodeExecutablePath,
'debug' => true
]);
$browser = $puppeteer->launch();
$page = $browser->newPage();
$page->setContent($htmlContent);
// Run JavaScript code within the page$result = $page->evaluate(JsFunction::create(' // Your JavaScript code here return {test: 23}'));
$browser->close();
// Process the result, which contains the output of your JavaScript code// You can return this result or further process it as neededreturnresponse()->json(['result' => $result]);
}
Describe the bug
Getting a
Starting inspector on 127.0.0.1:9229 failed: unknown error
Reproducible example
Expected behavior
$result
to be{test: 23}
Generated logs
Environment (please complete the following information):
What I've done so far
netstat -ano | findstr :9229
returns
TCP 127.0.0.1:54268 127.0.0.1:9229 SYN_SENT 6532
Get-Process -Id 6532
returns
Handles NPM(K) PM(K) WS(K) CPU(s) Id SI ProcessName 2308 70 197948 244980 210.34 6532 1 chrome
My Node package manager is:
The text was updated successfully, but these errors were encountered: