Skip to content

Unexpected error: callback can only be called for once #2519

Closed

Description

@zenkiet

Description

An unexpected error occurred in the main process.

Stack Trace

TypeError: callback can only be called for once
    at Object.module.<computed> [as getAllDisplays] (electron/js2c/browser_init.js:6950:30)
    at ensureWindowVisibleOnSomeDisplay (/Applications/Mark Text.app/Contents/Resources/app.asar/node_modules/electron-window-state/index.js:58:28)
    at validateState (/Applications/Mark Text.app/Contents/Resources/app.asar/node_modules/electron-window-state/index.js:77:7)
    at module.exports (/Applications/Mark Text.app/Contents/Resources/app.asar/node_modules/electron-window-state/index.js:165:3)
    at Ut.createWindow (/Applications/Mark Text.app/Contents/Resources/app.asar/dist/electron/main.js:2:304276)
    at jt._createEditorWindow (/Applications/Mark Text.app/Contents/Resources/app.asar/dist/electron/main.js:2:315178)
    at jt.ready (/Applications/Mark Text.app/Contents/Resources/app.asar/dist/electron/main.js:2:313119)
    at App.<anonymous> (/Applications/Mark Text.app/Contents/Resources/app.asar/dist/electron/main.js:2:314274)
    at App.emit (events.js:210:5)

Version

Mark Text: v0.16.1
Operating system: Darwin x64 20.3.0 (darwin)

Activity

  1. added
    🐛 bug
    🐞 pri/critical
    🍏 platform/macOS
    on May 16, 2026
  2. 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

    🍏 platform/macOS🐛 bug🐞 pri/critical

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions