GithubHelp home page GithubHelp logo

Comments (8)

Osiris-Team avatar Osiris-Team commented on July 29, 2024 1

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.

Osiris-Team avatar Osiris-Team commented on July 29, 2024

I guess ur on Windows?

from hbrowser.

Osiris-Team avatar Osiris-Team commented on July 29, 2024

@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.

Osiris-Team avatar Osiris-Team commented on July 29, 2024

Gonna close this for now since there was no response.

from hbrowser.

nocelab avatar nocelab commented on July 29, 2024

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.

Osiris-Team avatar Osiris-Team commented on July 29, 2024

@nocelab Can u give the latest version a try. Also, delete the headless-browser folder just to be sure.

from hbrowser.

nocelab avatar nocelab commented on July 29, 2024

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.

Osiris-Team avatar Osiris-Team commented on July 29, 2024

Related to: npm/rfcs#531
Going to prepend the node installation path and release an update later.

from hbrowser.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.