vuejs / vuejs/devtools

DevTools crash somewhere in timelineEventAdded

Open
#728 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

need reproduction
Dominant language
TypeScript
Stars
2.9k
Forks
279
PR merge metrics
No merged PRs in 30d

Description

After I activate the Vue Devtools by opening the Vue tab once, I sometimes get JS crashes because Devtools code tries to dereference a null object.

Here's what I so far, hopefully you'll be able to take an educated guess on what the condition that triggers the bug is.

From my experience so far, it could be linked to @intlify/unplugin-vue-i18n but I am not 100% sure. Maybe just a coincidence.

The problem occurs in a hook for timelineEventAdded. Here's the call stack (obfuscated though).
image

Here's the crashing code, with a little bit of context so hopefully you can locate the un-minified source:
image

The problem is that e is a plain object. You can see its fields in the screenshot above, but it has no constructor. So e.constructor.name fails with Cannot read properties of undefined (reading: 'name').

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the unminified handler for the timelineEventAdded hook and trace the object that reaches the failing constructor.name access. Reproduce the crash after opening the Vue tab, including the suspected @intlify/unplugin-vue-i18n setup if possible. Done means plain event objects no longer cause the reported null-object JavaScript crash.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.