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

"TypeError: Cannot read property 'map' of undefined at asCompletionResult" occurs when a file is editted before the extension fully activates #2807

Closed
sean-mcmanus opened this issue Nov 12, 2018 · 5 comments
Assignees
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service
Milestone

Comments

@sean-mcmanus
Copy link
Collaborator

Open a workspace and immediately edit a cpp file. Use Toggle Developer Tools to see the error output:

[Extension Host] TypeError: Cannot read property 'map' of undefined
	at asCompletionResult

I'm not aware of any "real" bug this causes, but it seems like we're not doing something correct.

@bobbrow
Copy link
Member

bobbrow commented Jan 10, 2019

I have a fix for this.

@bobbrow bobbrow self-assigned this Jan 10, 2019
@sean-mcmanus sean-mcmanus added the fixed Check the Milestone for the release in which the fix is or will be available. label Jan 11, 2019
@sean-mcmanus
Copy link
Collaborator Author

Cool, thanks. I thought it was some TypeScript issue.

@haovic
Copy link

haovic commented Jan 17, 2019

I am getting massive amounts of these errors when I view the Developer Tools. My intelliSense and syntax error checking (red squiggles) do not work either, and I think the issues are related. Whenever I type in a C++ file (even after waiting), tons of these errors appear. Here is an image of the issue:

image

I've also tried different combinations of almost all settings regarding intelliSense, as well as reinstalling both the extension as well as VSCode itself. The Insider Edition does not solve this issue either. Here is an example of my c_cpp_properties.json

{
    "configurations": [
        {
            "name": "WSL",
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "compilerPath": "/usr/bin/gcc",
            "cStandard": "c11",
            "cppStandard": "c++17",
            "intelliSenseMode": "gcc-x64"
        }
    ],
    "version": 4
}

I know that I do not have an includePath in this example, but I heard it might be worth trying to take it out. Currently, I have intelliSense fallback disabled. I think it's also worth mentioning that tag parser/fuzzy works to the extent of autocomplete when turned on, but syntax highlighting continues to fail. intelliSense works for Python. Any ideas?

@sean-mcmanus
Copy link
Collaborator Author

@haovic Have you tried 0.21.0-insiders4? This TypeError issue should be fixed in that.

@sean-mcmanus
Copy link
Collaborator Author

@haovic Oh, nevermind -- I found your response in the other thread.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service
Projects
None yet
Development

No branches or pull requests

3 participants