[rollbar] Unhandled exception: TypeError: Cannot read property 'startsWith' of undefined {}
See original GitHub issueBrief 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
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
TypeError: Cannot read property 'startsWith' of undefined
On one function I get the following error message: "TypeError: Cannot read property 'startsWith' of undefined" What causes this message.
Read more >React Native [TypeError: Cannot read property 'startsWith' of ...
In Javascript project its worked fine but when I put the code into a Typescript project I got the error. Is there any...
Read more >cannot read properties of undefined (reading 'listen') - You.com
Unhandled error in debug adapter: TypeError: Cannot read properties of ... when a record starts with one of the prefixes the # records...
Read more >Cannot read property 'startsWith' of undefined node.js V12 ...
[Solved]-TypeError: Cannot read property 'startsWith' of undefined node.js V12.18.2-discord.js ... Instead of if (!msg.content.startsWith(config.prefix) , it ...
Read more >Angular Error Handling Best Practices - Medium
We can't try to catch errors everywhere in the code. We need global error handling. Catch'em all. Fortunately, Angular provides a hook for...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
Yep, thanks for this thread. Cleaning the build folder works for me on Linux platform.