Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read properties of undefined (reading 'getModelColumnOfViewPosition') #200117

Closed
RedCMD opened this issue Dec 6, 2023 · 11 comments
Closed
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@RedCMD
Copy link
Contributor

RedCMD commented Dec 6, 2023

2nd time I got the error Cannot read properties of undefined (reading 'getModelColumnOfViewPosition')

has only happened twice
both times it was when I ctrl+A ctrl+X all the code in a .tmLanguage.json file

Windows 11 x64 zip installation
VSCode 1.8.4 stable

related: #97449

@mjbvz
Copy link
Contributor

mjbvz commented Dec 6, 2023

Does this reproduce in the latest VS Code insiders build with all extensions disabled?

If it does, please share the file which causes this

@mjbvz mjbvz added the info-needed Issue requires more information from poster label Dec 6, 2023
@einarpersson
Copy link

I just experienced this while doing a first test with Github Copilot inline chat refactorisation

  1. I selected a all lines in a typescript file (~19 LOC)
  2. I started an inline chat and asked it to refactor it to use proper functions instead of consts
  3. It started streaming correctly, but then got that error message (Cannot read properties of undefined (reading 'getModelColumnOfViewPosition')

This was repetable.

Interestingly, when I only selected the first 10 LOC it worked as expected.

Version: 1.85.0 (user setup)
Commit: af28b32d7e553898b2a91af498b1fb666fdebe0c
Date: 2023-12-06T20:48:09.019Z
Electron: 25.9.7
ElectronBuildId: 25551756
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.19044
Github Copilot v1.141.594 (pre-release)

@mjbvz
Copy link
Contributor

mjbvz commented Dec 12, 2023

Please share the TS code and copilot prompt you used

@endomorphosis
Copy link

I have experienced the same error under the same circumstances as mjbvz

@hexrw
Copy link

hexrw commented Dec 27, 2023

I recently ran into the same issue when asking Copilot to write a simple ETL script using TS and Node 20. Didn't resolve even when I disabled all other extensions. There's nothing in logs other than successful [fetchCompletions] requests

Prompt

Make this code take every file inside ../api/schemas/ (including nested files) and compile it using compileFromFile() and then write the result to a corresponding file in ../api/types overwriting if needed

Copilot

  • Version: 1.143.0
  • Build: prod
  • Editor: vscode/1.85.1

Environment

  • http_proxy: n/a
  • https_proxy: n/a
  • no_proxy: n/a
  • SSL_CERT_FILE: n/a
  • SSL_CERT_DIR: n/a
  • OPENSSL_CONF: n/a

Feature Flags

  • Custom Certificates: disabled
  • Send Restricted Telemetry: disabled
  • Chat: enabled

Node setup

  • Number of root certificates: 140
  • Operating system: Linux
  • Operating system version: 6.6.6-76060606-generic
  • Operating system architecture: x64
  • NODE_OPTIONS: n/a
  • NODE_EXTRA_CA_CERTS: n/a
  • NODE_TLS_REJECT_UNAUTHORIZED: n/a
  • tls default min version: TLSv1.2
  • tls default max version: TLSv1.3

Network Configuration

  • Proxy host: n/a
  • Proxy port: n/a
  • Proxy auth: n/a
  • Kerberos SPN: n/a
  • Reject unauthorized: disabled

Reachability

  • github.com: HTTP 200 -
  • copilot-proxy.githubusercontent.com: HTTP 200 -
  • api.githubcopilot.com: HTTP 200 -
  • default.exp-tas.com: HTTP 200 -

VS Code Configuration

  • HTTP proxy:
  • HTTP proxy autentication: n/a
  • Proxy Strict SSL: true
  • Extension HTTP proxy support: override

Extensions

  • Is win-ca installed?: false
  • Is mac-ca installed?: false

@mjbvz mjbvz assigned alexdima and unassigned mjbvz Jan 3, 2024
@Tejareddy94
Copy link

Tejareddy94 commented Jan 11, 2024

I too got the same error for Github Co-pilot. It stopped generating the response with the below error

image

If i modify this prompt to "Convert to module" it generated the response.

FYI
image

@RoyPrinsGH
Copy link

Same issue here. Only happens when I select all lines in a file and use CTRL + I to request an edit.

@coffee-mug
Copy link

Same issue here. What's strange is that the prompt worked fine for another file, that uses the same structure overall. Cannot share the prompt publicly as it uses some information from a database.

@VeniVidiV1c1
Copy link

If this happens to anyone just restart the application it solves it everytime it appears for me

@VSCodeTriageBot
Copy link
Collaborator

Hey @alexdima, this issue might need further attention.

@RedCMD, you can help us out by closing this issue if the problem no longer exists, or adding more information.

@VSCodeTriageBot
Copy link
Collaborator

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@VSCodeTriageBot VSCodeTriageBot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests