Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Sentry: e.preventDefault is not a function #2423

Unanswered
Kylyi asked this question in Help and Questions
Discussion options

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.

image

It happens at this exact point:
image

Any idea what's going on?

You must be logged in to vote

Replies: 1 comment 3 replies

Comment options

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.

You must be logged in to vote
3 replies
Comment options

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.

Comment options

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!

Comment options

I'll ping our testing team. Anyway, thanks for the hints!

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

AltStyle によって変換されたページ (->オリジナル) /