Rayrun
← Back to Discord Forum

Playwright not capturing console.log()

Hello everyone,

I'm facing an issue where PW stops capturing any console logs after a certain point when using onConsoleMessage. The issue seems to occur after a relatively large JSON object gets logged to the console.

I've tried setting DEBUG=pw:api and PWDEBUG=1, both headless and headful modes, but it didn't help. Is there a default timeout after which it simply stops receiving logs, or am I missing some other thing?

I'm using v1.37.0 with chromium.

This thread is trying to answer question "Why does Playwright stop capturing console logs after a large JSON object gets logged and how can this be resolved?"

21 replies

Could someone please help?

The behaviour is the same on all browsers.

.aleksandaraleksandrov
.aleksandaraleksandrov

Hello poxuizm, can u provide a video or screenshots?

@.aleksandaraleksandrov: Here, playwright stops capturing logs after the upper log is received

Here, playwright stops capturing logs after the upper log is received

HUTbXp7.png

The log below is what I need to obtain

.aleksandaraleksandrov
.aleksandaraleksandrov

wow, this is a lot of data. You need all this?

I only need the bottom one

.aleksandaraleksandrov
.aleksandaraleksandrov

can't you just print the second one?

@.aleksandaraleksandrov: the website is the one logging the data to the console, so i cant do that

the website is the one logging the data to the console, so i cant do that

.aleksandaraleksandrov
.aleksandaraleksandrov

hmm, I thought u are doing the console.logs

no, it's the server

.aleksandaraleksandrov
.aleksandaraleksandrov

so what about the console on the browser?

it gets logged to browser's console

but playwright only captures everything up until that large json

.aleksandaraleksandrov
.aleksandaraleksandrov

or if you have 5 min you can sharescreen and share me the whole idea. I have like 10-20 min right now

@.aleksandaraleksandrov: that'd be great

that'd be great

.aleksandaraleksandrov
.aleksandaraleksandrov

ok, just call when you are ready

@.aleksandaraleksandrov: do we get on <#1054477379352936478>

do we get on <#1054477379352936478>

.aleksandaraleksandrov
.aleksandaraleksandrov

no no

Related Discord Threads

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].