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

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

Closed
1 of 2 tasks
andyzg opened this issue Jun 9, 2021 · 6 comments · Fixed by PostHog/posthog-js#269
Closed
1 of 2 tasks

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

andyzg opened this issue Jun 9, 2021 · 6 comments · Fixed by PostHog/posthog-js#269
Labels
bug Something isn't working right

Comments

@andyzg
Copy link

andyzg commented Jun 9, 2021

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!

@andyzg andyzg added the bug Something isn't working right label Jun 9, 2021
@andyzg andyzg changed the title Can't find Drag Event "Can't find DragEvent" error on mobile web Jun 9, 2021
@mariusandra
Copy link
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.

@andyzg
Copy link
Author

andyzg commented Jun 15, 2021

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!

@studious
Copy link

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

@mariusandra
Copy link
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? :)

@Yuyz0112
Copy link

@mariusandra 1.0.3 has been published now.

@Twixes
Copy link
Collaborator

Twixes commented Aug 29, 2021

Thank you @Yuyz0112!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working right
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants