Cursor AI auto completion (ghost text) does not work

Hey everyone!

I’ve got a weired bug in Cursor. The autocompletion is sometimes working and sometimes dont, while the Chat features are available and working properly. I was trying to switch HTTP2 back and forth, but it doesn’t help. The issue has the same behaviour in Windows, WSL and via SSH.

Here are the logs that i get in the developer tools Console:


[Cpp] Error updating ghost text TypeError: Cannot read properties of undefined (reading 'getHTMLElement')
    at omi.isFocused (workbench.desktop.main.js:4020:48145)
    at lEi.isProblemFocused (workbench.desktop.main.js:4975:2905)
    at lEi.isTextFocusedOrSimilarlyFocused (workbench.desktop.main.js:4975:3016)
    at workbench.desktop.main.js:4975:3194
    at Array.find (<anonymous>)
    at lEi.getFocusedCodeEditor (workbench.desktop.main.js:4975:3181)
    at lEi.lc (workbench.desktop.main.js:4987:3817)
    at ve (workbench.desktop.main.js:4972:8217)
    at new lEi (workbench.desktop.main.js:4972:8274)
    at QTi.o (workbench.desktop.main.js:3217:1592)
update @ workbench.desktop.main.js:2349
workbench.desktop.main.js:2371 [Extension Host] (node:17276) ExperimentalWarning: Use `importAttributes` instead of `importAssertions`
(Use `Cursor --trace-warnings ...` to show where the warning was created)
Nkr @ workbench.desktop.main.js:2371
workbench.desktop.main.js:4922 Extension Host
6workbench.desktop.main.js:2349 [Cpp] Error updating ghost text TypeError: Cannot read properties of undefined (reading 'getHTMLElement')
    at omi.isFocused (workbench.desktop.main.js:4020:48145)
    at lEi.isProblemFocused (workbench.desktop.main.js:4975:2905)
    at lEi.isTextFocusedOrSimilarlyFocused (workbench.desktop.main.js:4975:3016)
    at workbench.desktop.main.js:4975:3194
    at Array.find (<anonymous>)
    at lEi.getFocusedCodeEditor (workbench.desktop.main.js:4975:3181)
    at lEi.lc (workbench.desktop.main.js:4987:3817)
    at ve (workbench.desktop.main.js:4972:8217)
    at new lEi (workbench.desktop.main.js:4972:8274)
    at QTi.o (workbench.desktop.main.js:3217:1592)
update @ workbench.desktop.main.js:2349
2workbench.desktop.main.js:4852 Writing file file:///c%3A/Users/Admin/.cursor/extensions/ms-vscode-remote.remote-wsl-0.81.8/dist/node/wslDaemon.js
2workbench.desktop.main.js:4852 Writing file file:///c%3A/Users/Admin/.cursor/extensions/ms-vscode-remote.remote-wsl-0.81.8/dist/node/extension.js
3workbench.desktop.main.js:2349 [Cpp] Error updating ghost text TypeError: Cannot read properties of undefined (reading 'getHTMLElement')
    at omi.isFocused (workbench.desktop.main.js:4020:48145)
    at lEi.isProblemFocused (workbench.desktop.main.js:4975:2905)
    at lEi.isTextFocusedOrSimilarlyFocused (workbench.desktop.main.js:4975:3016)
    at workbench.desktop.main.js:4975:3194
    at Array.find (<anonymous>)
    at lEi.getFocusedCodeEditor (workbench.desktop.main.js:4975:3181)
    at lEi.lc (workbench.desktop.main.js:4987:3817)
    at ve (workbench.desktop.main.js:4972:8217)
    at new lEi (workbench.desktop.main.js:4972:8274)
    at QTi.o (workbench.desktop.main.js:3217:1592)
update @ workbench.desktop.main.js:2349
workbench.desktop.main.js:4940 Error refreshing background composers ConnectError: [invalid_argument] Error
    at t (workbench.desktop.main.js:2405:131870)
    at async Object.listBackgroundComposers (workbench.desktop.main.js:98:15147)
    at async jki.refreshBackgroundComposers (workbench.desktop.main.js:4940:7887)
(anonymous) @ workbench.desktop.main.js:4940
www.vscode-unpkg.net/_gallery/anysphere/pyright/latest:1 
        
        
       Failed to load resource: the server responded with a status of 404 ()
workbench.desktop.main.js:593 Failed to refresh server config from server: ConnectError: [invalid_argument] Error
    at t (workbench.desktop.main.js:2405:131870)
    at async Object.getServerConfig (workbench.desktop.main.js:98:15147)
    at async m3t.forceRefreshServerConfig (workbench.desktop.main.js:593:32293)
forceRefreshServerConfig @ workbench.desktop.main.js:593
2workbench.desktop.main.js:4020 Uncaught TypeError: Cannot read properties of undefined (reading 'getHTMLElement')
    at omi.isFocused (workbench.desktop.main.js:4020:48145)
    at lEi.isProblemFocused (workbench.desktop.main.js:4975:2905)
    at lEi.isTextFocusedOrSimilarlyFocused (workbench.desktop.main.js:4975:3016)
    at workbench.desktop.main.js:4975:3194
    at Array.find (<anonymous>)
    at lEi.getFocusedCodeEditor (workbench.desktop.main.js:4975:3181)
    at lEi.lc (workbench.desktop.main.js:4987:3817)
    at HTMLDocument.handleKeyDownForCppKeys (workbench.desktop.main.js:4972:3157)
1 Like

Same problem here

I’m having the same issue. It seems to fix itself randomly, but broken 90% of the time.

I’m using the latest version of Cursor on MacOS. I also have a Windows machine with Cursor which works fine, leading me to believe this is either an issue specific to my Macbook or a MacOS Cursor bug.

Okay, i’ve managed to fix it with developer console

It turned out that there is a problem with PyRight compatibility, because both PyRight and ghost text are trying to modify the UI. So the PyRight removal helped the situation

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.