Skip to content

"Can't find DragEvent" error on mobile web #4671

Closed
PostHog/posthog-js
#269

Description

@andyzg

Bug description

We've been getting a lot of errors from Sentry with the following
image

Upon saving the client side source code, I grep'ed DragEvent and could only find an instance of it from posthog's source code. This only happens on certain mobile browsers.

Please describe.
If this affects the front-end, screenshots would be of great help.

Expected behavior

DragEvent shouldn't be accessed as a variable unless it's defined.

How to reproduce

Unable to reproduce given that I don't know the code path that triggers DragEvent. I currently get it via Sentry.

Environment

  • PostHog Cloud
  • self-hosted PostHog, version/commit: please provide

Additional context

Thank you for your bug report – we love squashing them!

Activity

  1. added
    bugSomething isn't working right
    on Jun 9, 2021
  2. changed the title [-]Can't find Drag Event[/-] [+]"Can't find DragEvent" error on mobile web[/+] on Jun 9, 2021
  3. mariusandra commented on Jun 11, 2021

    @mariusandra
    Collaborator

    We also have one such report in our sentry.

    It seems the bug comes from the the session recorder (recorder.js). Possibly updating rrweb in posthog-js might fix it... To be continued.

  4. andyzg commented on Jun 15, 2021

    @andyzg
    Author

    Hey @mariusandra , any ideas on whether this would break the web app? We're still seeing the error pretty frequently and aren't sure how to reproduce on our devices.

    If you know when this would get resolved, that would be great!

  5. studious commented on Aug 24, 2021

    @studious

    We are also getting a lot of these errors since we deployed the posthog client today. They are all from TouchMove on devices where DragMove doesn't exist.

    t instanceof MouseEvent
    ? e.IncrementalSource.MouseMove
    : t instanceof DragEvent
      ? e.IncrementalSource.Drag
      : e.IncrementalSource.TouchMove
    
  6. mariusandra commented on Aug 24, 2021

    @mariusandra
    Collaborator

    Hey, it seems that this issue is fixed upstream by rrweb-io/rrweb#630 and rrweb-io/rrweb#652 . Unfortunately those changes are not yet released in a new 1.0.3 version of rrweb.

    @Yuyz0112 I see you made a commit to release 1.0.3, but then it was never published. Is there any way to get this version out? :)

  7. Yuyz0112 commented on Aug 29, 2021

    @Yuyz0112

    @mariusandra 1.0.3 has been published now.

  8. Twixes commented on Aug 29, 2021

    @Twixes
    Contributor

    Thank you @Yuyz0112!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working right

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions