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
ConsoleMessage type and text not interoperable between Chrome and Firefox #6255
Comments
The |
@mjzffr this might be a FF issue? I'm not 100% - should we also consider Puppeteer itself translating Chrome/FF consoles into an interface that is consistent regardless of browser? |
There are a number of issues here. tl;dr is that Firefox doesn't implement all the CDP events yet + there may be some discrepancies between Blink and Gecko. In the Chrome case, the sample script is reporting data based on {"method":"Runtime.consoleAPICalled","params":{"type":"log","args":[{"type":"string","value":"message"}],"executionContextId":3,"timestamp":1.596131012139123e+12,"stackTrace":{"callFrames":[{"functionName":"","scriptId":"4","url":"__puppeteer_evaluation_script__","lineNumber":0,"columnNumber":8}]}},"sessionId":"F24311E58CE491073C2839A39B2E8C83"} Firefox doesn't yet implement In the Firefox case, the sample script is getting its data from {"sessionId":1,"method":"Log.entryAdded","params":{"entry":{"source":"javascript","level":"verbose","text":["message"],"url":"__puppeteer_evaluation_script__","lineNumber":1,"timestamp":1596131013412}}} I'd have to do more digging to say more about |
@foolip I implemented Runtime.consoleAPICalled a while ago and it landed in Firefox 85. Would you mind having a look again if everything satisfies your needs? |
We're marking this issue as unconfirmed because it has not had recent activity and we weren't able to confirm it yet. It will be closed if no further activity occurs within the next 30 days. |
Just checked and there is no difference anymore between Chrome and Firefox. Both output the following:
|
Thanks @whimboo! |
Steps to reproduce
Tell us about your environment:
What steps will reproduce the problem?
Please include code that reproduces the issue.
Output from running the above is:
What is the expected result?
The
msg.type()
andmsg.text()
should be the same for Chrome and Firefox, to make it possible to use console messages without switching on which product is under test.What happens instead?
msg.type()
is "log" andmsg.text()
is "message".msg.type()
is "verbose" andmsg.text()
is an array with a single item "message"msg.args()
is also different, but I don't know what it should be, and am not using it myself.The text was updated successfully, but these errors were encountered: