ulixee / hero

The web browser built for scraping
MIT License
652 stars 32 forks source link

BrowserLaunchError when starting browser #172

Closed GlenDC closed 1 year ago

GlenDC commented 1 year ago
BrowserLaunchError: Could not write to connection with Browser Process: Ulixee Server failed to launch Chrome - write EPIPE. See server logs for details.
------BROWSER_CREATION_Q--------------------------
    at Queue.run (/app/brorun/node_modules/commons/lib/Queue.ts:40:19)
    at Pool.getBrowser (/app/brorun/node_modules/core/lib/Pool.ts:126:44)
    at Agent.open (/app/brorun/node_modules/core/lib/Agent.ts:108:34)
    at async Session.openBrowser (/app/brorun/node_modules/core/lib/Session.ts:387:5)
    at async Function.create (/app/brorun/node_modules/core/lib/Session.ts:869:9)
    at async ConnectionToHeroClient.createSession (/app/brorun/node_modules/core/connections/ConnectionToHeroClient.ts:190:30)
    at async CommandRunner.runFn (/app/brorun/node_modules/core/lib/CommandRunner.ts:36:14)
    at async ConnectionToHeroClient.executeCommand (/app/brorun/node_modules/core/connections/ConnectionToHeroClient.ts:252:12)
    at async ConnectionToHeroClient.handleRequest (/app/brorun/node_modules/core/connections/ConnectionToHeroClient.ts:65:14)
------REMOTE CORE---------------------------------
    at Function.reviver (/app/brorun/node_modules/commons/lib/TypeSerializer.ts:242:26)
    at JSON.parse ()
    at Function.parse (/app/brorun/node_modules/commons/lib/TypeSerializer.ts:31:17)
    at WsTransportToCore.onMessage (/app/brorun/node_modules/net/lib/WsTransportToCore.ts:111:36)
    at WebSocket.emit (node:events:513:28)
    at WebSocket.emit (node:domain:489:12)
    at Receiver.receiverOnMessage (/app/brorun/node_modules/ws/lib/websocket.js:1068:20)
    at Receiver.emit (node:events:513:28)
    at Receiver.emit (node:domain:489:12)
    at Receiver.dataMessage (/app/brorun/node_modules/ws/lib/receiver.js:517:14)
------CONNECTION----------------------------------
    at new Resolvable (/app/brorun/node_modules/commons/lib/Resolvable.ts:16:18)
    at createPromise (/app/brorun/node_modules/commons/lib/utils.ts:168:10)
    at PendingMessages.create (/app/brorun/node_modules/net/lib/PendingMessages.ts:47:44)
    at ConnectionToHeroCore.sendRequest (/app/brorun/node_modules/net/lib/ConnectionToCore.ts:153:50)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async CoreCommandQueue.sendRequest (/app/brorun/node_modules/client/lib/CoreCommandQueue.ts:287:12)
    at async Object.cb (/app/brorun/node_modules/client/lib/CoreCommandQueue.ts:229:16)
    at async Queue.next (/app/brorun/node_modules/commons/lib/Queue.ts:95:19)
------CORE COMMANDS-------------------------------
    at Queue.run (/app/brorun/node_modules/commons/lib/Queue.ts:40:19)
    at CoreCommandQueue.run (/app/brorun/node_modules/client/lib/CoreCommandQueue.ts:218:8)
    at Object.cb (/app/brorun/node_modules/client/lib/CoreSessions.ts:31:64)
    at Queue.next (/app/brorun/node_modules/commons/lib/Queue.ts:95:44)
    at Queue.run (/app/brorun/node_modules/commons/lib/Queue.ts:43:10)
    at CoreSessions.create (/app/brorun/node_modules/client/lib/CoreSessions.ts:30:8)
    at ConnectionToHeroCore.createSession (/app/brorun/node_modules/client/connections/ConnectionToHeroCore.ts:62:38)
    at Hero._Hero_getCoreSessionOrReject (/app/brorun/node_modules/client/lib/Hero.ts:527:10)
    at Hero.get activeTab [as activeTab] (/app/brorun/node_modules/client/lib/Hero.ts:139:33)
    at Hero.goto (/app/brorun/node_modules/client/lib/Hero.ts:366:17)
------AGENT QUEUE---------------------------------
    at Queue.run (/app/brorun/node_modules/commons/lib/Queue.ts:40:19)
    at CoreSessions.create (/app/brorun/node_modules/client/lib/CoreSessions.ts:30:8)
    at ConnectionToHeroCore.createSession (/app/brorun/node_modules/client/connections/ConnectionToHeroCore.ts:62:38)
    at Hero._Hero_getCoreSessionOrReject (/app/brorun/node_modules/client/lib/Hero.ts:527:10)
    at Hero.get activeTab [as activeTab] (/app/brorun/node_modules/client/lib/Hero.ts:139:33)
    at Hero.goto (/app/brorun/node_modules/client/lib/Hero.ts:366:17)
    at eval (eval at deserializeClientFnWithArgs (/app/brorun/brorun/server/dist/lib/api/resolvers.js:118:12), :3:12)
    at /app/brorun/brorun/core/src/service.ts:142:26
    at Service.execInner (/app/brorun/brorun/core/src/service.ts:111:30)
    at Job.task (/app/brorun/brorun/core/src/service.ts:133:55)

My process no longer wishes to start a new Hero instance, with this as a trace. The logs say nothing extra either.

GlenDC commented 1 year ago

This problem resolved itself on our end, without any changes. But no clue why this was.

is it possible because problems on the side of target? But if so, that wouldn't explain this error, right?

blakebyrnes commented 1 year ago

Was this on boot-up? Or did it suddenly stop? In either case, this error means Chrome wasn't able to launch on your machine. Is it possible your machine was auto-updating a shared lib on the machine?

GlenDC commented 1 year ago

Better logging would probably be useful there.

blakebyrnes commented 1 year ago

There are a bunch of logs you can see if you turn on more verbose logging or look in the session databases, but the same logs are often just noise. If you have a session db, I can see if there's anything we should have bubbled up.

GlenDC commented 1 year ago

Hmm. Going to see if perhaps i should somehow have that info exposed in our layer logs for such cases. Will come back to you if needed.

GlenDC commented 1 year ago

Going to close it, hasn't popped up since I reported it.