Skip to content

Unexpected error: Cannot find window menu for id 1. #3313

Closed

Description

@Toover

Description

An unexpected error occurred in the main process.

Stack Trace

Error: Cannot find window menu for id 1.
    at wt.getWindowMenuById (/Applications/Mark Text.app/Contents/Resources/app.asar/dist/electron/main.js:2:260308)
    at IpcMainImpl.<anonymous> (/Applications/Mark Text.app/Contents/Resources/app.asar/dist/electron/main.js:2:262120)
    at IpcMainImpl.emit (events.js:315:20)
    at Object.<anonymous> (electron/js2c/browser_init.js:157:8980)
    at Object.emit (events.js:315:20)

Version

Mark Text: v0.16.3
Operating system: Darwin x64 21.5.0 (darwin)

Activity

  1. Toover commented on Jun 16, 2022

    @Toover
    Author

    I do not remember what I did, but I remember I was trying to close windows. Firefox got some tabs stuck as well. It could potentially be a system issue, but not all apps were impacted.

  2. XXMY commented on Oct 23, 2023

    @XXMY

    Description

    I've got the same error while exiting the app.
    An unexpected error occurred in the main process.
    This content was created by mark text application automatically.

    Stack Trace

    Error: Cannot find window menu for id 1.
        at ft.getWindowMenuById (/Applications/Mark Text.app/Contents/Resources/app.asar/dist/electron/main.js:2:250602)
        at IpcMainImpl.<anonymous> (/Applications/Mark Text.app/Contents/Resources/app.asar/dist/electron/main.js:2:252725)
        at IpcMainImpl.emit (events.js:210:5)
        at WebContents.<anonymous> (electron/js2c/browser_init.js:3908:15)
        at WebContents.emit (events.js:210:5)
    

    Version

    Mark Text: v0.16.2
    Operating system: Darwin x64 21.6.0 (darwin)

  3. added
    🐛 bug
    🐞 pri/critical
    on May 16, 2026
  4. Jocs commented on May 23, 2026

    @Jocs
    Member

    Closing — this crash was reported against the legacy webpack-bundled build (the stack trace points into dist/electron/renderer.js / dist/electron/main.js / webpack:/marktext/..., which no longer exists).

    The renderer + main process were rewritten on top of electron-vite in PR #4001 (commit 85607dd, shipped in 0.18.x). Many of the crash sites referenced in stacks like this were either rewritten, replaced, or now sit behind explicit guards. The general "Unexpected error" surface was also re-audited and given regression tests in PR #4268.

    Please upgrade to the latest 0.18.x build. If you still hit a crash on a recent build, please reopen with the new MarkText version and the steps that triggered it — the new stack traces will point us to the actual current code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bug🐞 pri/critical

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions