-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Sentry: e.preventDefault is not a function #2423
-
Hi, we've encountered the following warning from sentry.
I think the image below explains it well.
Sadly, it doesn't seem to be reproducible in "regular" environments.
It happens at this exact point:
image
Any idea what's going on?
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 3 replies
-
It's pretty hard to help you if you don't provide any code (but I guess you can't).
I can see in your Sentry screenshot that the error occurred with "HeadlessChrome" so maybe it means it's happening in your e2e tests? (hence the fact that it's not reproducible in "regular" environments)
Also maybe it's not a problem with Vue Router itself but a Vue Router plugin (or any library interacting in some way with Vue Router).
I hope it helps.
Beta Was this translation helpful? Give feedback.
All reactions
-
Yeah, this is happening on our test environment with cypress stuff.
I can share code but I'm honestly not sure what specifically to share/what's relevant. I'll try.
We have some custom Table impementation where the TableRow.vue is as follows:
In short, the table row may act as a link and uses the NuxtLink component if that's the case. Once clicked, the sentry reports the thing above.
image
It doesn't seem to happen on "regular" environment.
Beta Was this translation helpful? Give feedback.
All reactions
-
Did you tried introducing a delay before clicking on the element in your e2e test? Maybe it's happening too soon and the row hasn't been rendered yet.
If the exact same scenario works when done manually, it's pretty likely that there is a difference in your regular vs e2e environments (it could be an environment variable, data in your DB, a condition based on whether you are on a production vs development environment... etc.
Try to introduce delay as suggested above. Ensure data is as expected (using either Cypress debugger or console.log if you are more comfortable with it.
Without a minimal reproduction (which isn't always easy to create), I don't think I can help you more here. But good luck!
Beta Was this translation helpful? Give feedback.
All reactions
-
I'll ping our testing team. Anyway, thanks for the hints!
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1