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: Dead click false positive #9755

Closed
bruno-garcia opened this issue Dec 5, 2023 · 6 comments · Fixed by #13518
Closed

Replay: Dead click false positive #9755

bruno-garcia opened this issue Dec 5, 2023 · 6 comments · Fixed by #13518
Assignees
Labels
Package: replay Issues related to the Sentry Replay SDK Stale

Comments

@bruno-garcia
Copy link
Member

Clicking on a 'drop down' causes it to show but is detected as false positive:
image

Example replay link.

SDK version: 7.85.0

@mydea
Copy link
Member

mydea commented Feb 5, 2024

Theory: The dropdown is triggered on e.g. mousedown or something like this - some event that is triggered before click. So when we register the click, the mutation already happened, and we think it was a slow click. But this needs to be verified.

@jas-kas
Copy link
Member

jas-kas commented Feb 5, 2024

Approaches to resolve this:

  • Once we identify the cause, we can update our documentation: troubleshooting entry
  • Modification in detection logic

@AbhiPrasad AbhiPrasad added Package: replay Issues related to the Sentry Replay SDK Waiting for: Community labels Aug 2, 2024
@getsantry getsantry bot moved this to Waiting for: Community in GitHub Issues with 👀 3 Aug 2, 2024
@getsantry
Copy link

getsantry bot commented Aug 24, 2024

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry bot added the Stale label Aug 24, 2024
@bruno-garcia
Copy link
Member Author

This is still happening. In fact these are the top 3 dead clicks in Sentry:

Image

@mydea
Copy link
Member

mydea commented Aug 29, 2024

Hmm, I have another clue, found a way to hopefully reduce some more false positives.

Currently, we check for rrweb IncrementalSource.Mutation do determine if something changes. However, there are some more types in there we can check for, which we may also interpret as a mutation:

export declare enum IncrementalSource {
    Mutation = 0,
    MouseMove = 1,
    MouseInteraction = 2,
    Scroll = 3,
    ViewportResize = 4,
    Input = 5,
    TouchMove = 6,
    MediaInteraction = 7,
    StyleSheetRule = 8,
    CanvasMutation = 9,
    Font = 10,
    Log = 11,
    Drag = 12,
    StyleDeclaration = 13,
    Selection = 14,
    AdoptedStyleSheet = 15,
    CustomElement = 16
}

I will extend our check to consider these changes as "DOM mutations":

const IncrementalMutationSources = new Set([
  IncrementalSource.Mutation,
  IncrementalSource.StyleSheetRule,
  IncrementalSource.StyleDeclaration,
  IncrementalSource.AdoptedStyleSheet,
  IncrementalSource.CanvasMutation,
  IncrementalSource.Selection,
  IncrementalSource.MediaInteraction
]);

Importantly, this may also detect some stuff like playing/pausing audio 🤔 not 100% sure if this will fix the problem, but it should def. reduce opportunities for false positives, at least!

mydea added a commit that referenced this issue Aug 30, 2024
…13518)

Previously, we only considered `Mutation` style changes of rrweb as "DOM
mutations" for dead click detection.
However, after closer inspection, there are also some other types of
changes that we may consider as DOM mutations. By including these we can
hopefully reduce some false positives.

Not quite sure how to test this 🤔 It's probably also OK to just ship
this, as the worst-case scenario is that we have some false-negatives
and do not capture certain things, but our general goal here is to be
rather on the cautious side, so I think that is acceptable.

Possibly fixes
#9755
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: replay Issues related to the Sentry Replay SDK Stale
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants