Comments (8)
Oh ok looks like npm tries to run its install script via a system wide node installation, instead of the one installed by headleass browser in your current working dir, which is weird and doesnt happen for me.
Im gonna do some research on this.
from hbrowser.
I guess ur on Windows?
from hbrowser.
@empty-person
I sadly cannot reproduce the error with the provided information.
It could be that during the download/installation of NodeJs something went wrong.
Print the debug log System.out like this:
HBrowser hBrowser = new HBrowser();
try (PlaywrightWindow playwrightWindow = hBrowser.openCustomWindow()
.debugOutputStream(System.out)
.buildPlaywrightWindow()) {
// ...
} catch (Exception e) {
e.printStackTrace();
}
and share the result please.
from hbrowser.
Gonna close this for now since there was no response.
from hbrowser.
on Windows the first time I running my code:
Exception in thread "main" java.lang.RuntimeException: java.io.FileNotFoundException: c:\temp\HBrowser\headless-browser\node-js\node.exe
... is missing node-v17.4.0-win-x64
in path, nodejs is installed in c:\temp\HBrowser\headless-browser\node-js\node-v17.4.0-win-x64
from hbrowser.
@nocelab Can u give the latest version a try. Also, delete the headless-browser folder just to be sure.
from hbrowser.
running PuppeteerWindowTest.java with 2.3.4 (sorry for italian console output):
[NPM-INSTALL] Installing 'puppeteer'...
[NPM-ERROR] npm ERR! code 1
[NPM-ERROR] npm ERR! path C:\WORK\node_modules\puppeteer
[NPM-ERROR] npm ERR! command failed
[NPM-ERROR] npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node install.js
[NPM-ERROR] npm ERR! "node" non รจ riconosciuto come comando interno o esterno,
[NPM-ERROR] npm ERR! un programma eseguibile o un file batch.
[NPM-ERROR]
[NPM-ERROR] npm ERR! A complete log of this run can be found in:
[NPM-ERROR] npm ERR! C:\Users\user1\AppData\Local\npm-cache\_logs\2022-02-08T16_42_45_007Z-debug-0.log
Exception in thread "main" java.lang.RuntimeException: java.lang.IllegalThreadStateException: process has not exited
at com.osiris.headlessbrowser.windows.PuppeteerWindow.<init>(PuppeteerWindow.java:122)
at com.osiris.headlessbrowser.windows.WindowBuilder.buildPuppeteerWindow(WindowBuilder.java:70)
at com.osiris.headlessbrowser.PuppeteerWindowTest.main(PuppeteerWindowTest.java:10)
Caused by: java.lang.IllegalThreadStateException: process has not exited
at java.base/java.lang.ProcessImpl.exitValue(ProcessImpl.java:539)
at com.osiris.headlessbrowser.js.contexts.NodeContext.npmInstall(NodeContext.java:496)
at com.osiris.headlessbrowser.windows.PuppeteerWindow.<init>(PuppeteerWindow.java:74)
... 2 more
from hbrowser.
Related to: npm/rfcs#531
Going to prepend the node installation path and release an update later.
from hbrowser.
Related Issues (14)
- Two suggestions: screenshots, and table-of-features HOT 1
- .dyml files saved on windows produce wrong values because of \r\n
- .dyml value contains space at beginning
- Cause: java.io.IOException: Stream closed (in NodeContext)
- java.lang.RuntimeException: java.io.IOException: Stream closed HOT 2
- Wrong arch detection - node: cannot execute binary file error HOT 3
- Wrong NodeJS architecture in installation (Windows x64/amd64) HOT 5
- GraalWindow: Implement the DOM-API HOT 1
- Fix NodeJs issues
- Fix error on NodeWindow close
- Make headless undetectable with xvfb HOT 1
- Click with promise.All HOT 2
- Growing node.exe memory HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hbrowser.