Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macos and linux can not connect with cdp in pyppeteer #406

Open
xishandong opened this issue Feb 5, 2025 · 1 comment
Open

macos and linux can not connect with cdp in pyppeteer #406

xishandong opened this issue Feb 5, 2025 · 1 comment
Assignees
Labels
CDP Chrome Debug Protocol Investigate pyppeteer

Comments

@xishandong
Copy link

(coffee_js_server) root@iZt4nhuq1nq8iailj5blsgZ:~/coffee/server# ./lightpanda-x86_64-linux --host 127.0.0.1 --port 9222
info(websocket): starting blocking worker to listen on 127.0.0.1:9222
info(server): accepting new conn...
info(server): client connected
thread 1189041 panic: reached unreachable code
/home/runner/work/browser/browser/src/cdp/page.zig:0:0: 0x17a521b in page (lightpanda)
/home/runner/work/browser/browser/src/cdp/cdp.zig:107:22: 0x17692b7 in dispatch (lightpanda)
/home/runner/work/browser/browser/src/cdp/target.zig:490:29: 0x179e659 in target (lightpanda)
/home/runner/work/browser/browser/src/cdp/cdp.zig:106:26: 0x1769316 in dispatch (lightpanda)
/home/runner/work/browser/browser/src/cdp/cdp.zig:87:20: 0x1610f7d in wrapper (lightpanda)
/opt/hostedtoolcache/zig/0.13.0/x64/lib/std/debug.zig:0:9: 0x15312a2 in run_for_ns (lightpanda)
/home/runner/work/browser/browser/src/server.zig:476:31: 0x152f3c8 in handle (lightpanda)
/opt/hostedtoolcache/zig/0.13.0/x64/lib/std/Thread.zig:429:13: 0x153230e in entryFn (lightpanda)
???:?:?: 0x7f5ef9e32ac2 in ??? (libc.so.6)
Unwind information for libc.so.6:0x7f5ef9e32ac2 was not available, trace may be incomplete

Aborted (core dumped)

import asyncio

from pyppeteer import launch, connect

async def main():
b = await connect(browserURL="http://localhost:9222")
page = await b.newPage()
await page.goto("https://www.baidu.com")
await page.screenshot({"path": "example.png"})
await b.close()

if name == "main":
loop = asyncio.get_event_loop()
loop.run_until_complete(main())

@krichprollsch krichprollsch self-assigned this Feb 5, 2025
@krichprollsch
Copy link
Member

Hello @xishandong,
Thank you for the issue.
Lightpanda is not compatible with screenshot, this part is not implemented.
But I'm unsure it's the cause of the crash.
Could-you retry your script w/o this line please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CDP Chrome Debug Protocol Investigate pyppeteer
Projects
None yet
Development

No branches or pull requests

2 participants