Open Araxeus opened 1 month ago
Would you mind seeing if you have better luck on node 20? I haven't actually tested node 22 yet, and I don't see anything else problematic here.
same exact error on node v20.16.0
Dumb questions - can you get to example.org on your computer? Does it work with other urls? Is there any kind of virus scan that could be blocking the process?
can you get to example.org on your computer
yes
Does it work with other urls?
no
Is there any kind of virus scan that could be blocking the process?
nope, I even tried disabling my antivirus (ESET NOD32)
I can start the cloud fine, but the moment a client tries to connect - both crash
I just tested again with the latest version on a clean install and it seems to work fine on my mac (m2 running Sonoma). Only thing I changed was putting the code in a wrapper fn and calling tsc on the typescript file
import Hero from '@ulixee/hero-playground';
(async () => {
const hero = new Hero();
await hero.goto('https://example.org');
const title = await hero.document.title;
const intro = await hero.document.querySelector('p').textContent;
await hero.close();
console.log({ title, intro });
})();
I'm on Windows 10 and this is also the code i ran
tsc on the typescript file
what typescript file? you wrote javascript code why would you need to transpile it?
Typescript was quite unnecessary. I just wrote it to compile it to commonjs to see if that was what was going on
@blakebyrnes I am also getting this error on using Chrome 121 on Windows 10.
@Cmeesh11 If you're on discord, please connect with me there. I think this is going to require a lot of back and forth to figure out why windows is blocking these processes only on some machines.
When I try running the demo code, I get the following error:
my code
```js import Hero from '@ulixee/hero-playground'; const hero = new Hero(); await hero.goto('https://example.org'); const title = await hero.document.title; const intro = await hero.document.querySelector('p').textContent; await hero.close(); console.log({ title, intro }); ```
Full log (
ULX_DEBUG=true
)``` (node:10816) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. (Use `node --trace-deprecation ...` to show where the warning was created) starting hero... 2024-08-12T11:53:19.546Z INFO [cloud\lib\CloudNode] CloudNode.start { context: {} } 2024-08-12T11:53:19.564Z INFO [hero-core\index] Core.start { options: { shouldShutdownOnSignals: true, dataDir: 'C:\\Users\\Araxeus\\AppData\\Local\\Temp/.ulixee' }, context: {} } 2024-08-12T11:53:19.565Z INFO [unblocked-agent\lib\Pool] Pool.start { context: {} } 2024-08-12T11:53:19.596Z INFO [hero-core\index] Core started 32ms { dataDir: 'C:\\Users\\Araxeus\\AppData\\Local\\Temp/.ulixee', context: {} } 2024-08-12T11:53:19.596Z INFO [datastore-core\index] DatastoreCore.start { options: { serverEnvironment: 'development', datastoresDir: 'C:\\Users\\Araxeus\\AppData\\Local\\Temp/.ulixee/ulixee/datastores', datastoresTmpDir: 'C:\\Users\\Araxeus\\AppData\\Local\\Temp\\.ulixee\\datastore', maxRuntimeMs: 600000, waitForDatastoreCompletionOnShutdown: true, enableDatastoreWatchMode: true, datastoresMustHaveOwnAdminIdentity: false, cloudAdminIdentities: [], datastoreRegistryHost: undefined, storageEngineHost: undefined, statsTrackerHost: undefined, queryHeroSessionsDir: 'C:\\Users\\Araxeus\\AppData\\Local\\Temp/.ulixee/ulixee/query-hero-sessions', replayRegistryHost: undefined, escrowSpendTrackingHost: undefined, paymentServiceHost: undefined, datastoreLookupHost: undefined, localchainConfig: undefined }, context: {} } 2024-08-12T11:53:19.623Z STATS [datastore-core\index] DatastoreCore.started 27ms { context: {} } 2024-08-12T11:53:19.625Z STATS [cloud\lib\CloudNode] CloudNode.started 79ms { publicHost: 'localhost:1818', cloudConfiguration: { nodeRegistryHost: undefined, servicesSetupHost: undefined, networkIdentity: undefined, port: 1818, host: undefined, hostedServicesServerOptions: undefined }, context: {} } Started Ulixee Cloud at localhost:1818 2024-08-12T11:53:19.643Z INFO [unblocked-agent-mitm-socket\lib\CertificateGenerator] CertsIpcHandler.stdout: SessionArgs main.SessionArgs{IpcSocketPath:"\\\\.\\pipe\\ipc-certs-OSXhN1H2hL0xIKTY9isnk", RejectUnauthorized:false, ClientHelloId:"", TcpTtl:0, TcpWindowSize:0, Debug:true, DebugData:false, Mode:"certs"} { context: {} } 2024-08-12T11:53:19.644Z INFO [unblocked-agent-mitm-socket\lib\CertificateGenerator] CertificateGenerator.onMessage { id: 0, privateKey: '-----BEGIN RSA PRIVATE KEY-----\n' + '...key used by man-in-the-middle removed for logs...\n' + '-----END RSA PRIVATE KEY-----\n', status: 'init', context: {} } 2024-08-12T11:53:19.648Z INFO [hero\connections\ConnectionToHeroCore] Overriding max concurrency with Core value { maxConcurrency: 10, context: {} } 2024-08-12T11:53:19.680Z INFO [unblocked-agent\lib\Agent] Agent created { id: '1g1SWW34pvNhKC7f-bgId', incognito: true, hasHooks: true, browserEngine: { fullVersion: '124.0.6367.208' }, context: { sessionId: '1g1SWW34pvNhKC7f-bgId' } } 2024-08-12T11:53:19.683Z INFO [unblocked-agent\lib\Pool] Pool.waitForAvailability { maxConcurrentAgents: 10, activeAgentsCount: 0, waitingForAvailability: 0, context: {} } 2024-08-12T11:53:19.686Z INFO [unblocked-agent\lib\Browser] Browser.Launching { name: 'chrome', fullVersion: '124.0.6367.208', context: {} } 2024-08-12T11:53:19.711Z INFO [unblocked-agent\lib\BrowserProcess] chrome.LaunchProcess { executablePath: 'C:\\Users\\Araxeus\\AppData\\Local\\ulixee\\chrome\\124.0.6367.208\\chrome.exe', launchArguments: [ '--chrome-version=124.0.6367.208', '--ignore-certificate-errors', '--no-startup-window', '--use-mock-keychain', '--proxy-bypass-list=<-loopback>', '--proxy-server=localhost:23335', '--remote-debugging-pipe', '--headless=new', '--user-data-dir=C:\\Users\\Araxeus\\AppData\\Local\\Temp\\fMQHd-1-124-0-6367-208', '--disable-background-networking', '--enable-features=NetworkService,NetworkServiceInProcess', '--disable-background-timer-throttling', '--disable-backgrounding-occluded-windows', '--disable-breakpad', '--disable-client-side-phishing-detection', '--disable-domain-reliability', '--disable-default-apps', '--disable-dev-shm-usage', '--disable-extensions', '--disable-features=PaintHolding,LazyFrameLoading,DestroyProfileOnBrowserClose,AvoidUnnecessaryBeforeUnloadCheckSync,OutOfBlinkCors,GlobalMediaControls,MediaRouter,DialMediaRouteProvider,OptimizationHints', '--disable-blink-features=AutomationControlled', '--disable-hang-monitor', '--disable-ipc-flooding-protection', '--disable-prompt-on-repost', '--disable-renderer-backgrounding', '--disable-sync', '--force-color-profile=srgb', '--disable-skia-runtime-opts', '--use-fake-device-for-media-stream', '--no-default-browser-check', '--metrics-recording-only', '--no-first-run', '--enable-auto-reload', '--password-store=basic', '--allow-running-insecure-content', '--window-size=1440,900', '--force-webrtc-ip-handling-policy=default_public_interface_only', '--no-startup-window', '--hide-scrollbars', '--mute-audio', '--blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4' ], context: {} } 2024-08-12T11:53:20.046Z STATS [unblocked-agent\lib\Browser] Browser.Launched 360ms { protocolVersion: '1.3', product: 'Chrome/124.0.6367.208', revision: '@39799791a8b3dd684d9e442edcf63a3176e7f788', userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/124.0.0.0 Safari/537.36', jsVersion: '12.4.254.15', executablePath: 'C:\\Users\\Araxeus\\AppData\\Local\\ulixee\\chrome\\124.0.6367.208\\chrome.exe', desiredFullVersion: '124.0.6367.208', context: {} } 2024-08-12T11:53:20.054Z INFO [unblocked-agent\lib\Agent] Agent Opening in Pool { id: '1g1SWW34pvNhKC7f-bgId', browserId: '1', mitmEnabled: true, usingIsolatedMitm: true, isIncognito: true, context: { sessionId: '1g1SWW34pvNhKC7f-bgId' } } 2024-08-12T11:53:20.057Z STATS [unblocked-agent\lib\DevtoolsSessionLogger] send:Target.createBrowserContext { messageId: 4, params: { disposeOnDetach: true, proxyBypassList: '<-loopback>', proxyServer: 'localhost:23339' }, context: { sessionId: '1g1SWW34pvNhKC7f-bgId' } } 2024-08-12T11:53:20.060Z STATS [unblocked-agent\lib\DevtoolsSessionLogger] receive:Target.createBrowserContext { messageId: 4, result: { browserContextId: '7B5D1D2DB2177750773EA54A1CCC09B1' }, context: { sessionId: '1g1SWW34pvNhKC7f-bgId' } } 2024-08-12T11:53:20.067Z STATS [unblocked-agent\lib\DevtoolsSessionLogger] send:Target.createTarget { messageId: 5, params: { url: 'about:blank', browserContextId: '7B5D1D2DB2177750773EA54A1CCC09B1', background: true }, context: { sessionId: '1g1SWW34pvNhKC7f-bgId' } } 2024-08-12T11:53:20.109Z STATS [unblocked-agent\lib\DevtoolsSessionLogger] receive:Target.attachedToTarget { pageId: '9667E22097712732A58B1C8D7392B761', params: { sessionId: '862696AFBB2CE0613BAAE68A0D3B0477', targetInfo: { targetId: '9667E22097712732A58B1C8D7392B761', type: 'page', title: '', url: 'about:blank', attached: true, canAccessOpener: false, browserContextId: '7B5D1D2DB2177750773EA54A1CCC09B1' }, waitingForDebugger: true }, context: { sessionId: '1g1SWW34pvNhKC7f-bgId' } } 2024-08-12T11:53:20.111Z STATS [unblocked-agent\lib\DevtoolsSessionLogger] receive:Target.targetCreated { pageId: '9667E22097712732A58B1C8D7392B761', params: { targetInfo: { targetId: '9667E22097712732A58B1C8D7392B761', type: 'page', title: '', url: 'about:blank', attached: true, canAccessOpener: false, browserContextId: '7B5D1D2DB2177750773EA54A1CCC09B1' } }, context: { sessionId: '1g1SWW34pvNhKC7f-bgId' } } 2024-08-12T11:53:20.129Z STATS [unblocked-agent\lib\DevtoolsSessionLogger] receive:Target.createTarget { messageId: 5, result: { targetId: '9667E22097712732A58B1C8D7392B761' }, context: { sessionId: '1g1SWW34pvNhKC7f-bgId' } } 2024-08-12T11:53:20.132Z INFO [unblocked-agent\lib\Page] Page.created { context: { sessionId: '1g1SWW34pvNhKC7f-bgId', browserContextId: '7B5D1D2DB2177750773EA54A1CCC09B1', targetId: '9667E22097712732A58B1C8D7392B761' } } 2024-08-12T11:53:20.135Z STATS [unblocked-agent\lib\DevtoolsSessionLogger] send:Network.enable { pageId: '9667E22097712732A58B1C8D7392B761', messageId: 6, params: { maxPostDataSize: 0, maxResourceBufferSize: 1056784, maxTotalBufferSize: 5283920 }, devtoolsSessionId: '862696AFBB2CE0613BAAE68A0D3B0477', context: { sessionId: '1g1SWW34pvNhKC7f-bgId' } } 2024-08-12T11:53:20.137Z STATS [unblocked-agent\lib\DevtoolsSessionLogger] send:Page.getFrameTree { pageId: '9667E22097712732A58B1C8D7392B761', messageId: 7, params: {}, devtoolsSessionId: '862696AFBB2CE0613BAAE68A0D3B0477', context: { sessionId: '1g1SWW34pvNhKC7f-bgId' } } 2024-08-12T11:53:20.138Z STATS [unblocked-agent\lib\DevtoolsSessionLogger] send:Page.enable { pageId: '9667E22097712732A58B1C8D7392B761', messageId: 8, params: {}, devtoolsSessionId: '862696AFBB2CE0613BAAE68A0D3B0477', context: { sessionId: '1g1SWW34pvNhKC7f-bgId' } } 2024-08-12T11:53:20.139Z STATS [unblocked-agent\lib\DevtoolsSessionLogger] send:Runtime.evaluate { pageId: '9667E22097712732A58B1C8D7392B761', messageId: 9, params: { expression: 'document.readyState' }, devtoolsSessionId: '862696AFBB2CE0613BAAE68A0D3B0477', context: { sessionId: '1g1SWW34pvNhKC7f-bgId' } } 2024-08-12T11:53:20.140Z STATS [unblocked-agent\lib\DevtoolsSessionLogger] send:Page.setLifecycleEventsEnabled { pageId: '9667E22097712732A58B1C8D7392B761', messageId: 10, params: { enabled: true }, devtoolsSessionId: '862696AFBB2CE0613BAAE68A0D3B0477', context: { sessionId: '1g1SWW34pvNhKC7f-bgId' } } 2024-08-12T11:53:20.140Z STATS [unblocked-agent\lib\DevtoolsSessionLogger] send:Runtime.enable { pageId: '9667E22097712732A58B1C8D7392B761', messageId: 11, params: {}, devtoolsSessionId: '862696AFBB2CE0613BAAE68A0D3B0477', context: { sessionId: '1g1SWW34pvNhKC7f-bgId' } } 2024-08-12T11:53:20.142Z STATS [unblocked-agent\lib\DevtoolsSessionLogger] send:Runtime.addBinding { pageId: '9667E22097712732A58B1C8D7392B761', messageId: 12, params: { name: '__ulxPagePaintEventListenerCallback', executionContextName: '__agent_world__' }, devtoolsSessionId: '862696AFBB2CE0613BAAE68A0D3B0477', context: { sessionId: '1g1SWW34pvNhKC7f-bgId' } } 2024-08-12T11:53:20.143Z STATS [unblocked-agent\lib\DevtoolsSessionLogger] send:Page.addScriptToEvaluateOnNewDocument { pageId: '9667E22097712732A58B1C8D7392B761', messageId: 13, params: { source: '(function ulxInjectedScripts(runtimeFunction) {\n' + 'co... [truncated 35557 chars]', worldName: '__agent_world__' }, devtoolsSessionId: '862696AFBB2CE0613BAAE68A0D3B0477', context: { sessionId: '1g1SWW34pvNhKC7f-bgId' } } 2024-08-12T11:53:20.145Z STATS [unblocked-agent\lib\DevtoolsSessionLogger] send:DOMStorage.enable { pageId: '9667E22097712732A58B1C8D7392B761', messageId: 14, params: {}, devtoolsSessionId: '862696AFBB2CE0613BAAE68A0D3B0477', context: { sessionId: '1g1SWW34pvNhKC7f-bgId' } } 2024-08-12T11:53:20.146Z STATS [unblocked-agent\lib\DevtoolsSessionLogger] send:IndexedDB.enable { pageId: '9667E22097712732A58B1C8D7392B761', messageId: 15, params: {}, devtoolsSessionId: '862696AFBB2CE0613BAAE68A0D3B0477', context: { sessionId: '1g1SWW34pvNhKC7f-bgId' } } 2024-08-12T11:53:20.146Z STATS [unblocked-agent\lib\DevtoolsSessionLogger] send:Target.setAutoAttach { pageId: '9667E22097712732A58B1C8D7392B761', messageId: 16, params: { autoAttach: true, waitForDebuggerOnStart: true, flatten: true }, devtoolsSessionId: '862696AFBB2CE0613BAAE68A0D3B0477', context: { sessionId: '1g1SWW34pvNhKC7f-bgId' } } 2024-08-12T11:53:20.150Z STATS [unblocked-agent\lib\DevtoolsSessionLogger] send:Emulation.setUserAgentOverride { pageId: '9667E22097712732A58B1C8D7392B761', messageId: 17, params: { userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36', acceptLanguage: 'en-US,en', platform: 'Win32', userAgentMetadata: { brands: [ { brand: 'Chromium', version: '124' }, { brand: 'Google Chrome', version: '124' }, { brand: 'Not-A.Brand', version: '99' } ], fullVersion: '124.0.6367.92', fullVersionList: [ { brand: 'Chromium', version: '124.0.6367.92' }, { brand: 'Google Chrome', version: '124.0.0.0' }, { brand: 'Not-A.Brand', version: '99.0.0.0' } ], platform: 'Windows', platformVersion: '14.0.0', architecture: 'x86', model: '', mobile: false } }, devtoolsSessionId: '862696AFBB2CE0613BAAE68A0D3B0477', context: { sessionId: '1g1SWW34pvNhKC7f-bgId' } } 2024-08-12T11:53:20.152Z STATS [unblocked-agent\lib\DevtoolsSessionLogger] send:Emulation.setTimezoneOverride { pageId: '9667E22097712732A58B1C8D7392B761', messageId: 18, params: { timezoneId: 'Asia/Jerusalem' }, devtoolsSessionId: '862696AFBB2CE0613BAAE68A0D3B0477', context: { sessionId: '1g1SWW34pvNhKC7f-bgId' } } 2024-08-12T11:53:20.153Z STATS [unblocked-agent\lib\DevtoolsSessionLogger] send:Emulation.setLocaleOverride { pageId: '9667E22097712732A58B1C8D7392B761', messageId: 19, params: { locale: 'en-US,en' }, devtoolsSessionId: '862696AFBB2CE0613BAAE68A0D3B0477', context: { sessionId: '1g1SWW34pvNhKC7f-bgId' } } 2024-08-12T11:53:20.154Z STATS [unblocked-agent\lib\DevtoolsSessionLogger] send:Emulation.setDeviceMetricsOverride { pageId: '9667E22097712732A58B1C8D7392B761', messageId: 20, params: { width: 1424, height: 732, deviceScaleFactor: 1, mobile: false, positionX: 0, positionY: 9, screenWidth: 1440, screenHeight: 900 }, devtoolsSessionId: '862696AFBB2CE0613BAAE68A0D3B0477', context: { sessionId: '1g1SWW34pvNhKC7f-bgId' } } 2024-08-12T11:53:20.156Z STATS [unblocked-agent\lib\DevtoolsSessionLogger] send:Emulation.setFocusEmulationEnabled { pageId: '9667E22097712732A58B1C8D7392B761', messageId: 21, params: { enabled: true }, devtoolsSessionId: '862696AFBB2CE0613BAAE68A0D3B0477', context: { sessionId: '1g1SWW34pvNhKC7f-bgId' } } 2024-08-12T11:53:20.158Z STATS [unblocked-agent\lib\DevtoolsSessionLogger] send:Runtime.addBinding { pageId: '9667E22097712732A58B1C8D7392B761', messageId: 22, params: { name: 'onShadowDomPushedCallbackFn' }, devtoolsSessionId: '862696AFBB2CE0613BAAE68A0D3B0477', context: { sessionId: '1g1SWW34pvNhKC7f-bgId' } } 2024-08-12T11:53:20.160Z STATS [unblocked-agent\lib\DevtoolsSessionLogger] send:Page.addScriptToEvaluateOnNewDocument { pageId: '9667E22097712732A58B1C8D7392B761', messageId: 23, params: { source: '\n' + '(function newDocumentScriptWrapper(scopedVars = {... [truncated 50102 chars]', worldName: undefined }, devtoolsSessionId: '862696AFBB2CE0613BAAE68A0D3B0477', context: { sessionId: '1g1SWW34pvNhKC7f-bgId' } } 2024-08-12T11:53:20.161Z STATS [unblocked-agent\lib\DevtoolsSessionLogger] send:Runtime.addBinding { pageId: '9667E22097712732A58B1C8D7392B761', messageId: 24, params: { name: '__heroPageListenerCallback', executionContextName: '__agent_world__' }, devtoolsSessionId: '862696AFBB2CE0613BAAE68A0D3B0477', context: { sessionId: '1g1SWW34pvNhKC7f-bgId' } } 2024-08-12T11:53:20.162Z STATS [unblocked-agent\lib\DevtoolsSessionLogger] send:Page.addScriptToEvaluateOnNewDocument { pageId: '9667E22097712732A58B1C8D7392B761', messageId: 25, params: { source: '(function installInjectedScripts() {\n' + '\n' + 'const export... [truncated 33725 chars]', worldName: '__agent_world__' }, devtoolsSessionId: '862696AFBB2CE0613BAAE68A0D3B0477', context: { sessionId: '1g1SWW34pvNhKC7f-bgId' } } 2024-08-12T11:53:20.162Z STATS [unblocked-agent\lib\DevtoolsSessionLogger] send:Page.setInterceptFileChooserDialog { pageId: '9667E22097712732A58B1C8D7392B761', messageId: 26, params: { enabled: true }, devtoolsSessionId: '862696AFBB2CE0613BAAE68A0D3B0477', context: { sessionId: '1g1SWW34pvNhKC7f-bgId' } } 2024-08-12T11:53:20.163Z STATS [unblocked-agent\lib\DevtoolsSessionLogger] send:Runtime.runIfWaitingForDebugger { pageId: '9667E22097712732A58B1C8D7392B761', messageId: 27, params: {}, devtoolsSessionId: '862696AFBB2CE0613BAAE68A0D3B0477', context: { sessionId: '1g1SWW34pvNhKC7f-bgId' } } 2024-08-12T11:53:20.166Z ERROR [hero-core\index] UnhandledError(fatal) { origin: 'uncaughtException', context: {}, sessionId: null, sessionName: undefined } Error: read ECONNRESET at TCP.onStreamRead (node:internal/stream_base_commons:218:20) { errno: -4077, code: 'ECONNRESET', syscall: 'read' } 2024-08-12T11:53:20.167Z STATS [commons\lib\ShutdownHandler] ShutdownHandler.onSignal { signal: 'exit', context: {} } 2024-08-12T11:53:20.167Z STATS [commons\lib\ShutdownHandler] ShutdownHandler.execute { signal: 'exit', fn: 'function () { [native code] }', callsite: 'at CloudNode.startPublicServer (C:\\Git\\test\\unblocked\\cloud\\main\\lib\\CloudNode.ts:303:23)', context: {} } node:events:498 throw er; // Unhandled 'error' event ^ Error: read ECONNRESET at TCP.onStreamRead (node:internal/stream_base_commons:218:20) Emitted 'error' event on Socket instance at: at emitErrorNT (node:internal/streams/destroy:170:8) at emitErrorCloseNT (node:internal/streams/destroy:129:3) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { errno: -4077, code: 'ECONNRESET', syscall: 'read' } Node.js v22.5.1 ```