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

The "path" argument must be of type string - issue after update 1.2.1 #886

Closed
paulelsner opened this issue Nov 8, 2019 · 8 comments
Closed
Assignees
Milestone

Comments

@paulelsner
Copy link

paulelsner commented Nov 8, 2019

Brief Issue Summary

Hi, after the update today I get the following issue:

[rollbar] Unhandled exception: Unhandled Promise rejection: Post-folder-open TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined {"folder":{"uri":{"$mid":1,"fsPath":"/home/xx/repos/xxx","external":"file:///home/xx/repos/xxx","path":"/home/xx/repos/xxx","scheme":"file"},"name":"xxx","index":0}}
[rollbar] Unhandled exception: Unhandled Promise rejection: build TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined {}

I cannot configure and cannot build anymore :(

Platform and Versions

  • Operating System: remote on Ubuntu with Windows as host
  • CMake Version: 3.15.1
  • VSCode Version: 1.40.0
  • CMake Tools Extension Version: 1.2.1
  • Compiler/Toolchain: Clang 7
@paulelsner
Copy link
Author

Furhter testing shows that it is not connected to the vscode update 1.40.0 but the the extension update. And the issue happens on Mac as well on Linux. Windows works fine.

I found a workaround:
open /home/xx/.vscode/extensions/ms-vscode.cmake-tools-1.2.1/dist/main.js

and remove all lines from the function getVSInstallForKit

You do not need to search for VisualStudio installations on Linux anyhow ;)

@paulelsner paulelsner changed the title The "path" argument must be of type string - issue after update 1.40.0 The "path" argument must be of type string - issue after update 1.2.1 Nov 8, 2019
@bobbrow bobbrow added this to the 1.2.2 milestone Nov 8, 2019
@bobbrow
Copy link
Member

bobbrow commented Nov 8, 2019

That function won't be called on linux unless there is a Visual Studio Kit in your cmake-kits.json. Is that the case? Do you have Visual Studio Kits committed to your repo? Can you share your Kits file(s)?

@paulelsner
Copy link
Author

paulelsner commented Nov 8, 2019

Yes there are Kits for Windows, Linux and Mac defined, since we do cross platform development.

This is my shortend Kit file

[
    {
        "name": "My Clang 7 C++17",
        "compilers": {
            "C": "/usr/bin/clang-7",
            "CXX": "/usr/bin/clang++-7"
        },
        "cmakeSettings": {
            "CMAKE_CXX_STANDARD": "17",
            "CMAKE_CXX_STANDARD_REQUIRED": "ON",
            "CMAKE_CXX_EXTENSIONS": "OFF",
            "CMAKE_POSITION_INDEPENDENT_CODE": "ON"
        }
    },
    {
        "name": "My AppleClang C++14",
        "compilers": {
            "C": "/usr/bin/clang",
            "CXX": "/usr/bin/clang++"
        },
        "cmakeSettings": {
            "CMAKE_CXX_STANDARD": "14",
            "CMAKE_CXX_STANDARD_REQUIRED": "ON",
            "CMAKE_CXX_EXTENSIONS": "OFF",
            "CMAKE_POSITION_INDEPENDENT_CODE": "ON"
        }
    },
    {
        "name": "My Visual Studio 2017 (x86)",
        "visualStudio": "VisualStudio.15.0",
        "visualStudioArchitecture": "amd64_x86",
        "preferredGenerator": {
            "name": "Visual Studio 15 2017"
        }
    }
]

@bobbrow
Copy link
Member

bobbrow commented Nov 8, 2019

Thanks. That was unexpected. We'll get a fix in for this.

@paulelsner
Copy link
Author

Thanks!

@Victsz
Copy link

Victsz commented Nov 11, 2019

@bobbrow Can you take a look at this microsoft/vscode-cpptools#3731 (comment)
After update cmake tools 1.2.1, the cpp tools cannot find the source files

@bobbrow
Copy link
Member

bobbrow commented Nov 13, 2019

1.2.2 was released today. Please give that a try and let us know if you continue to have issues.

@paulelsner
Copy link
Author

Work now. Thanks!

@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants