Skip to content

Cannot find the source of "TypeError: Cannot read properties of undefined (reading 'uri')" #13

Closed
@AntoineGS

Description

@AntoineGS

So this is pretty much certainly an issue with the way I am using the SDK but I cannot seem to figure out what uri it is reading.
Starting with version 1.279, when I go from opening the editor without an opened file, and then open a file, I get the following:

2025-03-25 21:00:05.771 [59] [ERROR]: LSP message: [default] unhandledRejection: TypeError: Cannot read properties of undefined (reading 'uri')
    at C:\snapshot\copilot-client\lib\src\nextEditSuggestions\observableLspWorkspace.ts:45:57
    at EventEmitter.emit (node:events:537:28)
    at notificationHandler (C:\snapshot\copilot-client\agent\src\textDocumentManager.ts:135:53)
    at handleNotification (C:\snapshot\copilot-client\node_modules\vscode-jsonrpc\lib\common\connection.js:640:25)
    at handleMessage (C:\snapshot\copilot-client\node_modules\vscode-jsonrpc\lib\common\connection.js:342:13)
    at processMessageQueue (C:\snapshot\copilot-client\node_modules\vscode-jsonrpc\lib\common\connection.js:362:17)
    at Immediate.<anonymous> (C:\snapshot\copilot-client\node_modules\vscode-jsonrpc\lib\common\connection.js:334:13)
    at processImmediate (node:internal/timers:471:21)

Versions 1.278 and below do not have the error message.

Since it is closed source I cannot get the context of the error 🙃, if someone would be able to give me some pointers it would be greatly appreciated.

Thanks in advance :)
(The editor in question is NeoVim, and the plugin is copilot.lua)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions