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

Hangs on Content() #415

Open
reginaldl opened this issue Feb 6, 2024 · 3 comments
Open

Hangs on Content() #415

reginaldl opened this issue Feb 6, 2024 · 3 comments

Comments

@reginaldl
Copy link
Contributor

reginaldl commented Feb 6, 2024

Hi,

I'm experiencing what appears to be a deadlock when calling page.Content().
I'm crawling multiple pages in parallel using different browser contexts.
It works great most of the time, but it will eventually hang after some iterations.

I've been doing some debugging, here is the stack trace where it hangs:

goroutine 301671 [select]:
github.com/playwright-community/playwright-go.(*protocolCallback).GetResult(...)
        /Users/reginald/go/pkg/mod/github.com/playwright-community/playwright-go@v0.4101.0/connection.go:379
github.com/playwright-community/playwright-go.(*channel).innerSend(0x14008492af0, {0x10486880d, 0x7}, 0x0, {0x0?, 0x14000a0ea68?, 0x14006eaa370?})
        /Users/reginald/go/pkg/mod/github.com/playwright-community/playwright-go@v0.4101.0/channel.go:34 +0xd8
github.com/playwright-community/playwright-go.(*channel).Send.func1()
        /Users/reginald/go/pkg/mod/github.com/playwright-community/playwright-go@v0.4101.0/channel.go:18 +0x38
github.com/playwright-community/playwright-go.(*connection).WrapAPICall(0x0?, 0x14007d15c40, 0x0?)
        /Users/reginald/go/pkg/mod/github.com/playwright-community/playwright-go@v0.4101.0/connection.go:163 +0xb4
github.com/playwright-community/playwright-go.(*channel).Send(0x0?, {0x10486880d?, 0x10441c6d0?}, {0x0?, 0x10441c730?, 0x14005453bc0?})
        /Users/reginald/go/pkg/mod/github.com/playwright-community/playwright-go@v0.4101.0/channel.go:17 +0x64
github.com/playwright-community/playwright-go.(*frameImpl).Content(0x14007d15d18?)
        /Users/reginald/go/pkg/mod/github.com/playwright-community/playwright-go@v0.4101.0/frame.go:72 +0x38
github.com/playwright-community/playwright-go.(*pageImpl).Content(0x14006eaa250?)
        /Users/reginald/go/pkg/mod/github.com/playwright-community/playwright-go@v0.4101.0/page.go:239 +0x28

In this specific case, it hung for 17s.
I'd appreciate some help debugging this.

Does this mean that the underlying driver died somehow?
Could we get stuck if the page is reloading or navigating?
I'm running with DEBUGP now, will update if anything comes up.

@reginaldl
Copy link
Contributor Author

So I'm seeing this being sent:

ESC[32mSEND>ESC[0m
{"guid":"frame@37d9349a3f09fa710a337896a6e6dc94","id":356473,"metadata":{"apiName":"SerializeCallStack","isInternal":false,"location":{"file":"connection.go","line":162},"wallTime":326321000},"method":"content",
"params":{}}

Unfortunately, no response to "id": 356473. Playwright is definitely there as I see requests from other contexts...

@canstand
Copy link
Collaborator

canstand commented Feb 8, 2024

It's more like an upstream issue. Most timeouts are controlled by the server side (upstream). We need a way to reproduce it before we can investigate it.

@gokaybiz
Copy link

gokaybiz commented Mar 7, 2024

So I'm seeing this being sent:

ESC[32mSEND>ESC[0m
{"guid":"frame@37d9349a3f09fa710a337896a6e6dc94","id":356473,"metadata":{"apiName":"SerializeCallStack","isInternal":false,"location":{"file":"connection.go","line":162},"wallTime":326321000},"method":"content",
"params":{}}

Unfortunately, no response to "id": 356473. Playwright is definitely there as I see requests from other contexts...

Hi, is it a firefox issue, am i right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants