[rollbar] Unhandled exception: TypeError: Cannot read property 'startsWith' of undefined {}
Brief Issue Summary
Whenever I try to do any build-related command, I get the following message (build is replaced with whatever command's id, such as configure):
[rollbar] Unhandled exception: Unhandled Promise rejection: build TypeError: Cannot read property 'startsWith' of undefined {}
CMake Tools Log
[extension] [5024] cmake.build started
[main] Run build
[main] Starting new CMake driver
[main] Starting CMake driver
[legacy-driver] Creating instance of LegacyCMakeDriver
[driver] CMakeDriver Kit set to Visual Studio Community 2017 - x86
[kit] OK running C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat x86, env vars:[["CL",""],["_CL_",""],["INCLUDE","..."],["LINK",""],["_LINK_",""],["LIB","..."],["TMP","..."],["FRAMEWORKDIR","..."],["FRAMEWORKDIR64",""],["FRAMEWORKVERSION","v4.0.30319"],["FRAMEWORKVERSION64",""],["UCRTCONTEXTROOT",""],["UCRTVERSION","10.0.17763.0"],["UNIVERSALCRTSDKDIR","..."],["VCINSTALLDIR","..."],["VCTARGETSPATH",""],["WINDOWSLIBPATH","..."],["WINDOWSSDKDIR","..."],["WINDOWSSDKLIBVERSION","..."],["WINDOWSSDKVERSION","..."],["VISUALSTUDIOVERSION","15.0"]]
[driver] Run _refreshExpansions
[driver] Run _refreshExpansions cb
[cache] Reading CMake cache file c:/.../CMakeCache.txt
[cache] Parsing CMake cache string
[driver] Setting new variant , Emit debug information without performing optimizations
[driver] Run _refreshExpansions
[driver] Run _refreshExpansions cb
[rollbar] Unhandled exception: Unhandled Promise rejection: build TypeError: Cannot read property 'startsWith' of undefined {}
Developer Tools Log
console.ts:134 [Extension Host] [CMakeTools] 2019-05-09T13:36:04.849Z [fatal] [rollbar] Unhandled exception: Unhandled Promise rejection: build TypeError: Cannot read property 'startsWith' of undefined {}
t.log @ console.ts:134
$logExtensionHostMessage @ mainThreadConsole.ts:39
_doInvokeHandler @ rpcProtocol.ts:399
_invokeHandler @ rpcProtocol.ts:384
_receiveRequest @ rpcProtocol.ts:304
_receiveOneMessage @ rpcProtocol.ts:226
_protocol.onMessage.e @ rpcProtocol.ts:101
fire @ event.ts:584
a @ ipc.net.ts:392
e @ ipc.net.ts:399
fire @ event.ts:584
_receiveMessage @ ipc.net.ts:678
_socketDisposables.push._socketReader.onMessage.e @ ipc.net.ts:549
fire @ event.ts:584
acceptChunk @ ipc.net.ts:212
_register._socket.onData.e @ ipc.net.ts:173
t @ ipc.net.ts:24
emit @ events.js:182
addChunk @ _stream_readable.js:279
readableAddChunk @ _stream_readable.js:264
Readable.push @ _stream_readable.js:219
onread @ net.js:636
console.ts:134 [Extension Host] TypeError: Cannot read property 'startsWith' of undefined
at parseCatchTestOutput (C:\...\vector-of-bool.cmake-tools-1.1.3\out\src\ctest.js:90:31)
at parseTestOutput (C:\...\vector-of-bool.cmake-tools-1.1.3\out\src\ctest.js:107:16)
at CTestDriver._reloadTestResults (C:\...\vector-of-bool.cmake-tools-1.1.3\out\src\ctest.js:306:38)
t.log @ console.ts:134
$logExtensionHostMessage @ mainThreadConsole.ts:39
_doInvokeHandler @ rpcProtocol.ts:399
_invokeHandler @ rpcProtocol.ts:384
_receiveRequest @ rpcProtocol.ts:304
_receiveOneMessage @ rpcProtocol.ts:226
_protocol.onMessage.e @ rpcProtocol.ts:101
fire @ event.ts:584
a @ ipc.net.ts:392
e @ ipc.net.ts:399
fire @ event.ts:584
_receiveMessage @ ipc.net.ts:678
_socketDisposables.push._socketReader.onMessage.e @ ipc.net.ts:549
fire @ event.ts:584
acceptChunk @ ipc.net.ts:212
_register._socket.onData.e @ ipc.net.ts:173
t @ ipc.net.ts:24
emit @ events.js:182
addChunk @ _stream_readable.js:279
readableAddChunk @ _stream_readable.js:264
Readable.push @ _stream_readable.js:219
onread @ net.js:636
notificationsAlerts.ts:40 Cannot read property 'startsWith' of undefined
onDidNotificationChange @ notificationsAlerts.ts:40
_register.model.onDidNotificationChange.e @ notificationsAlerts.ts:26
fire @ event.ts:584
notify @ notifications.ts:113
error @ notificationService.ts:49
commandService.executeCommand.then.e @ statusbarPart.ts:373
_tickCallback @ internal/process/next_tick.js:68
Promise.then (async)
executeCommand @ statusbarPart.ts:373
entry.command.t.push.E.addDisposableListener @ statusbarPart.ts:295
Platform and Versions
- Operating System: Windows
- CMake Version: cmake version 3.14.3 (I think this error started happening after upgrading CMake from 3.12)
- VSCode Version: 1.33.1
- CMake Tools Extension Version: 1.1.3
- Compiler/Toolchain: Visual C++ 2017
I encountered the same issue on linux. Issue seemed to be related to the loading or parsing of test results. It went away after I cleared my build directory and configured again.
I'm pretty sure I tried it, but I'll try that again
Crash is in ctest.ts line 175. If you can provide a sample test log, that would help us solve the problem more quickly. Thank you!
It's been long enough since this happened that I am unable to provide a sample test log. I no longer have something which can reproduce this.
Sorry about the delay in getting to it. We'll see if we can cook something up that does.
Yep, thanks for this thread. Cleaning the build folder works for me on Linux platform.
This issue is now marked as 'stale-old' due to there being no activity on it for the past 720 days. Unless the 'stale-old' label is removed or the issue is commented on, this will be remain open for at least 14 days and then it may be closed. If you would like to make this issue exempt from getting stale, please add the 'stale-exempt' label.
This issue is now closed due to there being no activity on it for the past 14 days since being marked as 'stale-old'.