Skip to content

Spellcheck no longer initialises correctly on Linux (Electron 40+) #50327

Closed

Description

@callumskeet-fm

Preflight Checklist

Electron Version

40.8.3

What operating system(s) are you using?

Other Linux

Operating System Version

Fedora 43

What arch are you using?

x64

Last Known Working Electron version

39.8.3

Does the issue also appear in Chromium / Google Chrome?

No

Expected Behavior

Spellcheck is enabled by default (expectation based on this documentation https://www.electronjs.org/docs/latest/tutorial/spellchecker).
Calling ses.setSpellCheckerEnabled will either enable or disable the spellcheck feature for a given session.

Actual Behavior

Spellcheck is not enabled by default.
Passing { webPreferences: { spellcheck: true } } to the BrowserWindow constructor doesn't enable spellchecking.
Calling ses.setSpellCheckerEnabled(true) also doesn't enable spellchecking.

The issue won't reproduce the first time you run it. It only manifests on subsequent runs from my testing.

It also never reproduces in Electron Fiddle, which is why I've submitted a repo instead of a Fiddle Gist.

The issue is still present in the latest nightly build (v43.0.0-nightly.20260317).

Testcase Gist URL

https://github.com/callumskeet-fm/electron-linux-spellcheck-bug

Additional Information

Current workaround

Calling ses.setSpellCheckerEnabled(false) then later calling ses.setSpellCheckerEnabled(true), e.g:

mainWindow.webContents.session.setSpellcheckerEnabled(false);
mainWindow.once('ready-to-show', () => {
    mainWindow.webContents.session.setSpellCheckerEnabled(true);
});

Activity

  1. changed the title [-]Spellcheck no longer works on Linux (Electron 40+)[/-] [+]Spellcheck no longer initialises correctly on Linux (Electron 40+)[/+] on Mar 18, 2026
  2. codebytere commented on Mar 18, 2026

    @codebytere
    Member

    Can you elaborate a little further? Tried to repro on latest stable using your repo but i see:

    Image

    which does look correct?

  3. added
    blocked/need-info ❌
    on Mar 18, 2026
  4. damianremington274-blip commented on Mar 18, 2026

    @damianremington274-blip
  5. removed
    blocked/need-info ❌
    on Mar 18, 2026
  6. callumskeet-fm commented on Mar 18, 2026

    @callumskeet-fm
    Author

    @codebytere was this from the first time running it or did it work on subsequent runs as well?

    I found it initialises fine on the first launch but fails from then on.

  7. nikwen commented on Mar 18, 2026

    @nikwen
    Member

    @callumskeet-fm Would you be able to check which v40 alpha/beta/nightly version introduced the issue?

  8. added
    blocked/need-info ❌
    has-repro-repo
    on Mar 18, 2026
  9. callumskeet-fm commented on Mar 18, 2026

    @callumskeet-fm
    Author

    @nikwen it appears in the first nightly release of Electron 40: v40.0.0-nightly.20250904

  10. removed
    blocked/need-info ❌
    on Mar 18, 2026
  11. nikwen commented on Mar 20, 2026

    @nikwen
    Member

    Thanks for testing!

  12. jwclinton commented on Apr 8, 2026

    @jwclinton

    Environment:

    OS: Ubuntu 24.04 LTS
    
    Electron Version: Latest Stable (downloaded within the past week)
    

    Observation:
    I believe I have isolated the exact trigger for this "works first time, fails thereafter" spellchecking issue. It appears to be related to how Chromium/Electron handles reading the cached .bdic file from the local disk on subsequent launches, failing silently rather than falling back properly.

    Here is the testing matrix I ran that isolates the behavior using the en-US-10-1.bdic dictionary:

    Steps to Reproduce & Expected vs Actual Behavior:

    Clean State (Network ON): Delete en-US-10-1.bdic from the Dictionaries folder, ensure the network is connected, and launch the app.
    
        Result: Spellchecking initializes, downloads the file, and works perfectly.
    
    Subsequent Launch (Network ON): Close the app, leave the newly downloaded en-US-10-1.bdic file in place, and restart.
    
        Result: Spellchecking silently fails.
    
    Manual Reset (Network ON): Delete the en-US-10-1.bdic file again and restart.
    
        Result: Spellchecking works perfectly again.
    
    Offline Cached Launch (Network OFF): Disconnect the network, leave the downloaded en-US-10-1.bdic in place, and restart.
    
        Result: Spellchecking silently fails (identical to Step 2).
    
    Offline Clean Launch (Network OFF): Keep the network disconnected, delete en-US-10-1.bdic, and restart.
    
        Result: A popup error appears stating "Something went wrong," and spellchecking fails (expected behavior, as it cannot reach the CDN).
    
    Recovery (Network ON): Reconnect the network, delete the file, and restart.
    
        Result: Spellchecking works perfectly again.
    

    Other observation:
    Just in case it was a local cache / timestamp issue I also repeated the test and touched the file instead of deleting it. This did not fix the problem, the spellchecking still failed.

    Workaround:
    Adding this in main.ts resolves the issue permanently (and is so wrong is many ways)...
    app.whenReady().then(() => {
    // --- SPELLCHECKER WORKAROUND: Delete cached versioned dict ---
    try {
    const dictPath = path.join(app.getPath('userData'), 'Dictionaries', 'en-US-10-1.bdic');
    if (fs.existsSync(dictPath)) {
    fs.unlinkSync(dictPath);
    console.log([Spellcheck Workaround] Deleted stale dictionary: ${dictPath});
    }
    } catch (err) {
    console.error('[Spellcheck Workaround] Failed to delete dictionary:', err);
    }
    });

    Conclusion:
    The network download and initial memory buffer processing work flawlessly. The failure strictly occurs when the engine attempts to read the locally cached .bdic file on subsequent launches.

  13. wrdhub commented on Apr 9, 2026

    @wrdhub

    Reading this issue more closely today, we are actually having the opposite issue. The spellchecker does not work the first time our app is launched on Linux (we can confirm that this happens on multiple environments), but then works with subsequent launches. This definitely started when we update Electron from 39.2.4 to 40.4.1.

  14. jwclinton commented on Apr 9, 2026

    @jwclinton

    Reading this issue more closely today, we are actually having the opposite issue. The spellchecker does not work the first time our app is launched on Linux (we can confirm that this happens on multiple environments), but then works with subsequent launches. This definitely started when we update Electron from 39.2.4 to 40.4.1.

    Interesting. Thought I found your issue, ah well.

  15. MrDaisyBates commented on Jun 2, 2026

    @MrDaisyBates

    Hello! I've run across this issue because I've actually been dealing with a long standing bug/issue in Tangent. suchnsuch/Tangent#311

    Tangent was previously running on Electron 38 (we think) back at the end of 2025 and was updated to Electron 40+ at the beginning of the year. Ever since then, my spell check on Tangent has been unreliable. Mostly just not working, but the electron versions have been updated and there's noticeable differences now, but I wouldn't say solid, consistent performance.

    One more "smoking gun" situation of it is this video clip of me typing gibberish, and the spell check only seems to work when I minimize the application (or activate another application) and then type something. If I do both of these, it seems to be reactivating.

    Screencast.From.2026-06-02.17-40-27.mp4

    Another one where we were trying to figure out what reproduced. We realized that sometimes there was some "lag" to it activating (but now we think it's more about tabbing into something else).

    Screencast.From.2026-06-02.17-29-48.mp4

    To be clear, the spell check seems to be working fine for people using Mac and Windows, but myself and some other Linux user(s) are having similar issues. While I have Fedora 43 like the person creating this post, there are Linux users using non-RPM operating systems having similar issues, too, so, I do believe it's wider than just Fedora.

    So, to be clear, any time I close Tangent, switch notes, etc, the spell check stops working and only starts working again once provoked in some way (toggling the settings, tabbing out, and returning, for example).

    Currently Tangent is running 42.1. Spell check is still unreliable, but this version of Electron maybe seems closer to working than it has previously (so, I appreciate you guys doing what you've been doing!), but it seems there could be a bit more to go.

  16. advert665 commented on Jun 28, 2026

    @advert665

    I had this same issue building Logseq 0.10.15 with 41.7.1 via nixpkgs. Using a nix overlay, I implemented the workaround highlighted by tutanota tutao/tutanota#10487 to start the session with one language, then switch back to the desired language on dictionary init. It then works as intended.

  17. kethinov commented on Aug 6, 2026

    @kethinov
    Contributor

    I traced this to a bug in Chromium and sent them a patch to fix it here: https://chromium-review.googlesource.com/c/chromium/src/+/8206965

    When/if they merge it, I'll submit PRs to backport this to current Electron releases.

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

    40-x-ybug 🪲component/spellcheckhas-repro-repoplatform/linux

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions