ulixee / unblocked

A suite of tools for protecting the web's open knowledge.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Setting a timeout does nothing

loss-and-quick opened this issue · comments

commented

When i use await hero.waitForLoad('AllContentLoaded', { timeoutMs: 1180000 }); or await hero.goto(url, { timeoutMs: 20 00000 }); , timeoutMs doesnt affect anything

Stack of `waitForLoad`
TimeoutError: Timeout waiting for navigation "AllConte
ntLoaded"


--->  await hero.waitForLoad('AllContentLoaded', { t
imeoutMs: 1180000 });


TimeoutError: Timeout waiting for navigation "AllConte
ntLoaded"
  at new Resolvable (/home/client/hk_bot/node_module
s/commons/lib/Resolvable.ts:16:18)
  at FrameNavigationsObserver.createStatusTriggeredP
romise (/home/client/hk_bot/agent/core/lib/FrameNaviga
tionsObserver.ts:280:24)
  at FrameNavigationsObserver.waitForLoad (/home/cli
ent/hk_bot/agent/core/lib/FrameNavigationsObserver.ts:
84:26)
  at Frame.waitForLoad (/home/client/hk_bot/agent/co
re/lib/Frame.ts:286:43)
  at FrameEnvironment.waitForLoad (/home/client/hk_b
ot/node_modules/core/lib/FrameEnvironment.ts:475:23)
  at process.processTicksAndRejections (node:interna
l/process/task_queues:95:5)
  at async CommandRecorder.runCommandFn (/home/clien
t/hk_bot/node_modules/core/lib/CommandRecorder.ts:85:1
6)
  at async CommandRunner.runFn (/home/client/hk_bot/
node_modules/core/lib/CommandRunner.ts:36:14)
  at async ConnectionToHeroClient.executeCommand (/h
ome/client/hk_bot/node_modules/core/connections/Connec
tionToHeroClient.ts:248:12)
  at async ConnectionToHeroClient.handleRequest (/ho
me/client/hk_bot/node_modules/core/connections/Connect
ionToHeroClient.ts:63:14)
------REMOTE CORE---------------------------------
  at Function.reviver (/home/client/hk_bot/node_modu
les/commons/lib/TypeSerializer.ts:242:26)
  at JSON.parse (<anonymous>)
  at Function.parse (/home/client/hk_bot/node_module
s/commons/lib/TypeSerializer.ts:31:17)
  at WsTransportToCore.onMessage (/home/client/hk_bo
t/node_modules/net/lib/WsTransportToCore.ts:111:36)
  at WebSocket.emit (node:events:513:28)
  at Receiver.receiverOnMessage (/home/client/hk_bot
/node_modules/ws/lib/websocket.js:1068:20)
  at Receiver.emit (node:events:513:28)
  at Receiver.dataMessage (/home/client/hk_bot/node_
modules/ws/lib/receiver.js:517:14)
  at /home/client/hk_bot/node_modules/ws/lib/receive
r.js:468:23
  at /home/client/hk_bot/node_modules/ws/lib/permess
age-deflate.js:308:9
------CONNECTION----------------------------------
  at new Resolvable (/home/client/hk_bot/node_module
s/commons/lib/Resolvable.ts:16:18)
  at createPromise (/home/client/hk_bot/node_modules
/commons/lib/utils.ts:168:10)
  at PendingMessages.create (/home/client/hk_bot/nod
e_modules/net/lib/PendingMessages.ts:47:44)
  at ConnectionToHeroCore.sendRequest (/home/client/
hk_bot/node_modules/net/lib/ConnectionToCore.ts:153:50
)
  at async CoreCommandQueue.sendRequest (/home/clien
t/hk_bot/node_modules/client/lib/CoreCommandQueue.ts:2
87:12)
  at async Object.cb (/home/client/hk_bot/node_modul
es/client/lib/CoreCommandQueue.ts:229:16)
  at async Queue.next (/home/client/hk_bot/node_modu
les/commons/lib/Queue.ts:95:19)
------CORE COMMANDS-------------------------------
  at Queue.run (/home/client/hk_bot/node_modules/com
mons/lib/Queue.ts:40:19)
  at CoreCommandQueue.run (/home/client/hk_bot/node_
modules/client/lib/CoreCommandQueue.ts:218:8)
  at CoreFrameEnvironment.waitForLoad (/home/client/
hk_bot/node_modules/client/lib/CoreFrameEnvironment.ts
:216:29)
  at FrameEnvironment.waitForLoad (/home/client/hk_b
ot/node_modules/client/lib/FrameEnvironment.ts:252:21)
  at async Tab.waitForLoad (/home/client/hk_bot/node
_modules/client/lib/Tab.ts:256:12)
  at async doSitesTasks (/home/client/hk_bot/build/a
utomatization.js:79:13)
  at async proccesGroup (/home/client/hk_bot/build/i
ndex.js:380:21)
  at async Promise.allSettled (index 2)
  at async farm (/home/client/hk_bot/build/index.js:
454:21)
  at async /home/client/hk_bot/build/index.js:492:25

--------------------------------------------------
------5336482099----------------------------------
------AVY3BpFwd_IhiPwN4Yaam-----------------------
--------------------------------------------------
Stack of `goto`
TimeoutError: Timeout connecting to www.SOMESITE.xyz at
x.x.x.x:443


--->  await hero.goto(url, { timeoutMs: 20
00000 });


TimeoutError: Timeout connecting to www.SOMESITE.xyz at
x.x.x.x:443
  at new Resolvable (/home/minicx/hk_bot/node_module
s/commons/lib/Resolvable.ts:16:18)
  at MitmSocket.connect (/home/minicx/hk_bot/agent/m
itm-socket/index.ts:157:27)
  at process.processTicksAndRejections (node:interna
l/process/task_queues:95:5)
  at async MitmRequestAgent.createSocketConnection (
/home/minicx/hk_bot/agent/mitm/lib/MitmRequestAgent.ts
:173:5)
  at async Object.cb (/home/minicx/hk_bot/agent/mitm
/lib/SocketPool.ts:78:26)
  at async Queue.next (/home/minicx/hk_bot/node_modu
les/commons/lib/Queue.ts:95:19)
------SOCKET TO ORIGIN----------------------------
  at Queue.run (/home/minicx/hk_bot/node_modules/com
mons/lib/Queue.ts:40:19)
  at SocketPool.getSocket (/home/minicx/hk_bot/agent
/mitm/lib/SocketPool.ts:60:23)
  at MitmRequestAgent.assignSocket (/home/minicx/hk_
bot/agent/mitm/lib/MitmRequestAgent.ts:195:35)
  at MitmRequestAgent.request (/home/minicx/hk_bot/a
gent/mitm/lib/MitmRequestAgent.ts:72:16)
  at HttpRequestHandler.createProxyToServerRequest (
/home/minicx/hk_bot/agent/mitm/handlers/BaseHttpHandle
r.ts:61:50)
  at process.processTicksAndRejections (node:interna
l/process/task_queues:95:5)
  at async HttpRequestHandler.onRequest (/home/minic
x/hk_bot/agent/mitm/handlers/HttpRequestHandler.ts:37:
36)
  at async Function.onRequest (/home/minicx/hk_bot/a
gent/mitm/handlers/HttpRequestHandler.ts:316:5)
  at async MitmProxy.onHttpRequest (/home/minicx/hk_
bot/agent/mitm/lib/MitmProxy.ts:220:7)
------REMOTE CORE---------------------------------
  at Function.reviver (/home/minicx/hk_bot/node_modu
les/commons/lib/TypeSerializer.ts:242:26)
  at JSON.parse (<anonymous>)
  at Function.parse (/home/minicx/hk_bot/node_module
s/commons/lib/TypeSerializer.ts:31:17)
  at WsTransportToCore.onMessage (/home/minicx/hk_bo
t/node_modules/net/lib/WsTransportToCore.ts:111:36)
  at WebSocket.emit (node:events:513:28)
  at Receiver.receiverOnMessage (/home/minicx/hk_bot
/node_modules/ws/lib/websocket.js:1068:20)
  at Receiver.emit (node:events:513:28)
  at Receiver.dataMessage (/home/minicx/hk_bot/node_
modules/ws/lib/receiver.js:517:14)
  at /home/minicx/hk_bot/node_modules/ws/lib/receive
r.js:468:23
  at /home/minicx/hk_bot/node_modules/ws/lib/permess
age-deflate.js:308:9
------CONNECTION----------------------------------
  at new Resolvable (/home/minicx/hk_bot/node_module
s/commons/lib/Resolvable.ts:16:18)
  at createPromise (/home/minicx/hk_bot/node_modules
/commons/lib/utils.ts:168:10)
  at PendingMessages.create (/home/minicx/hk_bot/nod
e_modules/net/lib/PendingMessages.ts:47:44)
  at ConnectionToHeroCore.sendRequest (/home/minicx/
hk_bot/node_modules/net/lib/ConnectionToCore.ts:153:50
)
  at process.processTicksAndRejections (node:interna
l/process/task_queues:95:5)
  at async CoreCommandQueue.sendRequest (/home/minic
x/hk_bot/node_modules/client/lib/CoreCommandQueue.ts:2
87:12)
  at async Object.cb (/home/minicx/hk_bot/node_modul
es/client/lib/CoreCommandQueue.ts:229:16)
  at async Queue.next (/home/minicx/hk_bot/node_modu
les/commons/lib/Queue.ts:95:19)
------CORE COMMANDS-------------------------------
  at Queue.run (/home/minicx/hk_bot/node_modules/com
mons/lib/Queue.ts:40:19)
  at CoreCommandQueue.run (/home/minicx/hk_bot/node_
modules/client/lib/CoreCommandQueue.ts:218:8)
  at CoreTab.goto (/home/minicx/hk_bot/node_modules/
client/lib/CoreTab.ts:243:36)
  at Tab.goto (/home/minicx/hk_bot/node_modules/clie
nt/lib/Tab.ts:190:36)
  at process.processTicksAndRejections (node:interna
l/process/task_queues:95:5)
  at async doSitesTasks (/home/minicx/hk_bot/build/a
utomatization.js:78:13)
  at async proccesGroup (/home/minicx/hk_bot/build/i
ndex.js:380:21)
  at async Promise.allSettled (index 0)
  at async farm (/home/minicx/hk_bot/build/index.js:
454:21)
  at async /home/minicx/hk_bot/build/index.js:492:25

--------------------------------------------------
------5295023505-17-------------------------------
------_16Dj2F87RCSkfrUa3zSH-----------------------
--------------------------------------------------

From discussions with author, the hope is for goto timeout to also apply to Http Socket connects.

Synchronized goto with connect. Closing for now as we never found a session showing an invalid waitForLoad timeout.