Skip to content

Crash on launch when markdown file is open and focused #41

@apoapostolov

Description

@apoapostolov

Bug Report

Meo markdown visualizer crashes with a service worker error when VS Code launches with a markdown file already open and focused.

Steps to Reproduce

  1. Have a markdown (.md) file open in VS Code
  2. Ensure the markdown file tab is focused/active
  3. Quit VS Code
  4. Relaunch VS Code
  5. The markdown file is restored as open on startup
  6. Meo attempts to load the visualizer

Expected Behavior

Meo should load normally and display the markdown visualizer without errors.

Actual Behavior

Meo crashes and displays a toast notification:

Additional Context

The error suggests the service worker registration is attempting to run before the document is fully initialized when VS Code restores the editor state on startup.

Note: This issue may be related to having a large number of extensions installed (tested with ~51 extensions). The service worker registration timing conflict could be exacerbated by VS Code's startup time when many extensions are loading simultaneously.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions