Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Example driver code don't work for me

See original GitHub issue

I ran the example driver code and got TimeoutError

[9618:9655:0117/] Failed to launch GPU process.
DEBUG:asyncio:Using selector: EpollSelector to Chrome tab ws:// for message... to Chrome tab ws:// for message... to Chrome tab ws:// for message... to Chrome tab ws:// for message... to Chrome tab ws:// to Chrome! Found 5 tabs for message... command = {"method": "Page.enable", "params": {}, "id": 1}
DEBUG:websockets.protocol:client >> Frame(fin=True, opcode=1, data=b'{"method": "Page.enable", "params": {}, "id": 1}') for ack event set for id=1
DEBUG:websockets.protocol:client << Frame(fin=True, opcode=1, data=b'{"id":1,"result":{}}') message, processing... ack event with id=1 for message... ack event set for id=1 sent command = {"method": "Page.enable", "params": {}, "id": 1} command = {"method": "Page.navigate", "params": {"url": ""}, "id": 2}
DEBUG:websockets.protocol:client >> Frame(fin=True, opcode=1, data=b'{"method": "Page.navigate", "params": {"url": ""}, "id": 2}') for ack event set for id=2
DEBUG:websockets.protocol:client << Frame(fin=True, opcode=1, data=b'{"method":"Page.frameStartedLoading","params":{"frameId":"9704.1"}}') message, processing... event message! a "Page.frameStartedLoading" event , storing against hash and name...
DEBUG:chromewhip.helpers:generated hash = Page.frameStartedLoading:frameId=9704.1 for message...
DEBUG:websockets.protocol:client << Frame(fin=True, opcode=1, data=b'{"method":"Page.lifecycleEvent","params":{"name":"commit","timestamp":197780.337573}}')
DEBUG:websockets.protocol:client << Frame(fin=True, opcode=1, data=b'{"method":"Page.frameNavigated","params":{"frame":{"id":"9704.1","loaderId":"9704.1","url":"","securityOrigin":"","mimeType":"text/html"}}}') message, processing... event message!
DEBUG:websockets.protocol:client << Frame(fin=True, opcode=1, data=b'{"method":"Page.loadEventFired","params":{"timestamp":197780.340161}}')
DEBUG:websockets.protocol:client << Frame(fin=True, opcode=1, data=b'{"method":"Page.lifecycleEvent","params":{"name":"load","timestamp":197780.340161}}')
DEBUG:websockets.protocol:client << Frame(fin=True, opcode=1, data=b'{"method":"Page.frameStoppedLoading","params":{"frameId":"9704.1"}}')
DEBUG:websockets.protocol:client << Frame(fin=True, opcode=1, data=b'{"method":"Page.domContentEventFired","params":{"timestamp":197780.348346}}')
DEBUG:websockets.protocol:client << Frame(fin=True, opcode=1, data=b'{"method":"Page.lifecycleEvent","params":{"name":"DOMContentLoaded","timestamp":197780.348346}}')
DEBUG:websockets.protocol:client << Frame(fin=True, opcode=1, data=b'{"id":2,"result":{"frameId":"9704.1"}}')
DEBUG:websockets.protocol:client << Frame(fin=True, opcode=1, data=b'{"method":"Page.lifecycleEvent","params":{"name":"firstPaint","timestamp":197780.39997}}')
DEBUG:websockets.protocol:client << Frame(fin=True, opcode=1, data=b'{"method":"Page.lifecycleEvent","params":{"name":"firstContentfulPaint","timestamp":197780.399986}}')
DEBUG:websockets.protocol:client << Frame(fin=True, opcode=1, data=b'{"method":"Page.lifecycleEvent","params":{"name":"firstTextPaint","timestamp":197780.399987}}')
DEBUG:websockets.protocol:client << Frame(fin=True, opcode=1, data=b'{"method":"Page.lifecycleEvent","params":{"name":"firstMeaningfulPaintCandidate","timestamp":197780.399988}}')
DEBUG:websockets.protocol:client << Frame(fin=True, opcode=1, data=b'{"method":"Page.lifecycleEvent","params":{"name":"networkAlmostIdle","timestamp":197780.880721}}')
DEBUG:websockets.protocol:client << Frame(fin=True, opcode=1, data=b'{"method":"Page.lifecycleEvent","params":{"name":"networkIdle","timestamp":197781.097418}}'){"method": "Page.navigate", "params": {"url": ""}, "id": 2}
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/chromewhip/", line 167, in _send
    await asyncio.wait_for(ack_event.wait(), timeout=TIMEOUT_S)  # recv
  File "/usr/lib/python3.6/asyncio/", line 362, in wait_for
    raise futures.TimeoutError()

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/mouse/.PyCharmCE2017.1/config/scratches/", line 32, in <module>
    result = loop.run_until_complete(tab.send_command(cmd, await_on_event_type=await_on_event_type))
  File "/usr/lib/python3.6/asyncio/", line 467, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.6/dist-packages/chromewhip/", line 264, in send_command
    return await self._send(*command, input_event_cls=input_event_type, trigger_event_cls=await_on_event_type)
  File "/usr/local/lib/python3.6/dist-packages/chromewhip/", line 241, in _send
    raise TimeoutError('Unknown cause for timeout to occurs for "%s" with id=%s' % (method, id_)) Unknown cause for timeout to occurs for "Page.navigate" with id=2
ERROR:asyncio:Task exception was never retrieved
future: <Task finished coro=<ChromeTab.recv_handler() done, defined at /usr/local/lib/python3.6/dist-packages/chromewhip/> exception=TypeError("LifecycleEventEvent unable to deserialise: __init__() missing 2 required positional arguments: 'frameId' and 'loaderId'",)>
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/chromewhip/", line 91, in json_to_event
    result = event_cls(**payload['params'])
TypeError: __init__() missing 2 required positional arguments: 'frameId' and 'loaderId'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/chromewhip/", line 97, in recv_handler
    event = helpers.json_to_event(result)
  File "/usr/local/lib/python3.6/dist-packages/chromewhip/", line 93, in json_to_event
    raise TypeError('%s unable to deserialise: %s' % (event_cls.__name__, e))
TypeError: LifecycleEventEvent unable to deserialise: __init__() missing 2 required positional arguments: 'frameId' and 'loaderId'

Process finished with exit code 1

/usr/local/lib/python3.6/dist-packages/chromewhip/ As you can see in debugger there is no frameId and loaderId in params and LifecycleEventEvent constructor needs it! image



Is that an error in chromewhip or i understand something wrong? This error also arrised when using docker and http api.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

chazkiicommented, Feb 10, 2018

@andreymeretsky I’ve been able to recreate error in my Docker container (works fine locally under MacOS), will let you know how I go.

Tylerlhesscommented, Oct 16, 2018

I think the Docker Error might be that you never start Chrome. This causes it to time out while connecting to the remote debug port. This is fixed by you having Chrome running locally with --remote-debug-port=9222 as per the readme.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error codes in Device Manager in Windows - Microsoft Support
Lists the error codes that may be reported by Device Manager and the possible resolutions in Windows.
Read more >
13 Methods to Fix This Device Cannot Start (code 10) Error
Code10 occurs when the Device Manager fails to start the hardware device. It generally points out that corrupted or unspecified drivers or faulty...
Read more >
Driver Development Part 1: Introduction to Drivers - CodeProject
This article will go into the basics of creating a simple driver.
Read more >
Doordash Promo Code Not Working: 5 Reasons Why And Fixes
Indeed, promo codes and discounts can affect consumer behavior. For example, a consumer may be more likely to try a new local restaurant...
Read more >
[Solved] NVIDIA Code 43: Windows has stopped this device ...
Method #03 worked for me. Thanks for sharing this tip. Noel Toro • 3 years ago. The easy driver fixed it. Not sure...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found