Todo-tree: Fails to find todos and throws error

Created on 14 Jun 2018  路  5Comments  路  Source: Gruntfuggly/todo-tree

Recently Todo Tree has been failing to find any Todo's in my project and displays the following error message: "todo-tree: Cannot read property 'length' of undefined". My project definitely has several todo's but even if it didn't the extension shouldn't be throwing errors as a result.

Extension version: 0.0.62
VS Code version: Code 1.24.1 (24f62626b222e9a8313213fb64b10d741a326288, 2018-06-13T17:51:32.889Z)
OS version: Windows_NT x64 6.1.7601

bug fixed

All 5 comments

Hi - could you do me a favour and open the developer tools and find out what line number the error is coming from?

Hi - I have same error too :
screen shot 2018-06-14 at 4 03 15 pm
Thanks ! :)

This is what I see in the dev console:

todo-tree: Cannot read property 'length' of undefined
    e.onDidNotificationChange @ notificationsAlerts.ts:42
    (anonymous) @ notificationsAlerts.ts:28
    e.fire @ event.ts:140
    e.notify @ notifications.ts:127
    e.notify @ notificationService.ts:65
    (anonymous) @ mainThreadMessageService.ts:84
    e._showMessage @ mainThreadMessageService.ts:45
    e.$showMessage @ mainThreadMessageService.ts:39
    e._doInvokeHandler @ rpcProtocol.ts:265
    e._invokeHandler @ rpcProtocol.ts:250
    e._receiveRequest @ rpcProtocol.ts:196
    e._receiveOneMessage @ rpcProtocol.ts:178
    (anonymous) @ rpcProtocol.ts:111
    (anonymous) @ rpcProtocol.ts:307
    e.fire @ event.ts:140
    (anonymous) @ ipc.net.ts:81
    emitOne @ events.js:96
    emit @ events.js:191
    readableAddChunk @ _stream_readable.js:178
    Readable.push @ _stream_readable.js:136
    onread @ net.js:560
    console.ts:136 [Extension Host] rejected promise not handled within 1 second
    t.log @ console.ts:136
    t._logExtensionHostMessage @ extensionHost.ts:393
    (anonymous) @ extensionHost.ts:210
    emitTwo @ events.js:106
    emit @ events.js:194
    process.nextTick @ internal/child_process.js:766
    _combinedTickCallback @ internal/process/next_tick.js:73
    _tickCallback @ internal/process/next_tick.js:104

console.ts:136 [Extension Host] rejected promise not handled within 1 second
    t.log @ console.ts:136
    t._logExtensionHostMessage @ extensionHost.ts:393
    (anonymous) @ extensionHost.ts:210
    emitTwo @ events.js:106
    emit @ events.js:194
    process.nextTick @ internal/child_process.js:766
    _combinedTickCallback @ internal/process/next_tick.js:73
    _tickCallback @ internal/process/next_tick.js:104

I'm also seeing this - it's reporting an error on line 225 of dataProvider.js.js when trying to perform an Array.map. I'm seeing the same pop up as @Rittoune.

Stack Trace shows:

TypeError: Cannot read property 'length' of undefined
    at TodoDataProvider.add (/Users/mattkeeble/.vscode/extensions/gruntfuggly.todo-tree-0.0.62/dataProvider.js:225:62)
    at /Users/mattkeeble/.vscode/extensions/gruntfuggly.todo-tree-0.0.62/extension.js:227:22
    at Array.map (native)
    at addToTree (/Users/mattkeeble/.vscode/extensions/gruntfuggly.todo-tree-0.0.62/extension.js:225:17)
    at iterateSearchList (/Users/mattkeeble/.vscode/extensions/gruntfuggly.todo-tree-0.0.62/extension.js:364:13)
    at ripgrep.then.catch.e (/Users/mattkeeble/.vscode/extensions/gruntfuggly.todo-tree-0.0.62/extension.js:267:13)
    at <anonymous>

Thanks for the stack traces.

It's because I didn't check what happens when languages don't have multiline comments. Sorry for the inconvenience! I've just uploaded a version that should fix the problem.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alystair picture alystair  路  9Comments

joserubicon picture joserubicon  路  9Comments

ghost picture ghost  路  7Comments

jabacchetta picture jabacchetta  路  8Comments

JonathanTroyer picture JonathanTroyer  路  5Comments