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

replay captures console.assert incorrectly #1280

Closed
pauldambra opened this issue Jul 2, 2024 · 1 comment · Fixed by rrweb-io/rrweb#1530
Closed

replay captures console.assert incorrectly #1280

pauldambra opened this issue Jul 2, 2024 · 1 comment · Fixed by rrweb-io/rrweb#1530

Comments

@pauldambra
Copy link
Member

pauldambra commented Jul 2, 2024

When you call console.assert the first argument is evaluated, if it is true then the message is printed to the screen, otherwise nothing happens

See https://developer.mozilla.org/en-US/docs/Web/API/console/assert_static

rrweb's console recorder has no special handling for assert so we always print the message including the evaluated first arg

this gives an incorrect view of what could have been seen by the browser user

printed when false

Screenshot 2024-07-01 at 21 13 12

we should capture this and print everything except the first arg

nothing printed when true

Screenshot 2024-07-01 at 21 12 54

we should not capture this

error printed when referencing undefined variable

Screenshot 2024-07-01 at 21 12 24

this wouldn't hit the console recorder (but its error would)

@pauldambra
Copy link
Member Author

i'll close this... it'll be resolved when we receive whatever release comes after rrweb 2-alpha-16

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