Hello!
Since I updated my vsc the plugin always made the extension host crash when I opened vsc, with the following error:
abstractExtensionService.ts:467 Extension host terminated unexpectedly. Code: 1 Signal: null
_onExtensionHostCrashed @ abstractExtensionService.ts:438
log.ts:197 ERR Extension host terminated unexpectedly. The following extensions were running: vscode.microsoft-authentication, vscode.configuration-editing, vscode.extension-editing, vscode.json-language-features, ms-vscode.js-debug, vscode.npm, lonefy.vscode-JS-CSS-HTML-formatter, vscode.debug-auto-launch, vscode.emmet, vscode.git, vscode.merge-conflict, vscode.search-result, Equinusocio.vsc-material-theme, equinusocio.vsc-material-theme-icons, Gruntfuggly.todo-tree, icrawl.discord-vscode, Shan.code-settings-sync, softwaredotcom.music-time, svipas.code-autocomplete, tobiaswaelde.clockify-tracker, vscode-icons-team.vscode-icons, WakaTime.vscode-wakatime, vscode.github-authentication, aaron-bond.better-comments
notificationsAlerts.ts:40 Extension host terminated unexpectedly.
onDidChangeNotification @ breadcrumbsModel.ts:39
localProcessExtensionHost.ts:257 Extension Host
localProcessExtensionHost.ts:258 internal/fs/utils.js:220
throw err;
^
[Error: ENOENT: no such file or directory, unlink 'c:\Users\Novot\AppData\Roaming\Code\User\workspaceStorage\47df53c98423b83c0f854c05652c2fd6\Gruntfuggly.todo-tree\pattern.txt'
at Object.unlinkSync (fs.js:1035:3)
at ChildProcess.<anonymous> (c:\Users\Novot\.vscode\extensions\gruntfuggly.todo-tree-0.0.188\dist\extension.js:22:36287)
at ChildProcess.emit (events.js:228:7)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)] {
errno: -4058,
syscall: 'unlink',
code: 'ENOENT',
path: 'c:\\Users\\Novot\\AppData\\Roaming\\Code\\User\\workspaceStorage\\47df53c98423b83c0f854c05652c2fd6\\Gruntfuggly.todo-tree\\pattern.txt'
}
And I have to go into the folder and create the pattern.txt file manually to continue using VSC. And since I set the "todo-tree.general.debug": true,, about 3 days ago, the issue disappeared, It's interesting that it's now fixed so I thought I would share it.
Now getting a different error, running the latest plugin version:
internal/fs/utils.js:525
throw new ERR_INVALID_ARG_TYPE(propName, ['string', 'Buffer', 'URL'], path);
^
[TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be one of type string, Buffer, or URL. Received type undefined
at mkdirSync (fs.js:815:10)
at Object.fs.mkdirSync (electron/js2c/asar.js:718:16)
at B (c:\Users\Novot\.vscode\extensions\gruntfuggly.todo-tree-0.0.188\dist\extension.js:22:11526)
at Timeout.j [as _onTimeout] (c:\Users\Novot\.vscode\extensions\gruntfuggly.todo-tree-0.0.188\dist\extension.js:22:12769)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7)] {
code: 'ERR_INVALID_ARG_TYPE'
}
Please could you post your todo-tree settings - I'll see if I can recreate it here.
Also, are you running remotely, or anything that might be "unusual" ?
Under settings, you mean the settings.json file entries, right?
{
"todo-tree.tree.showScanModeButton": false,
"todo-tree.filtering.includeHiddenFiles": true,
"todo-tree.general.enableFileWatcher": true,
"todo-tree.general.statusBar": "current file",
"todo-tree.regex.regexCaseSensitive": false,
"todo-tree.highlights.customHighlight": {
"HACK": {
"iconColour": "green",
"background": "green",
"gutterIcon": true,
"icon": "rss"
},
"BUG": {
"iconColour": "magenta",
"background": "magenta",
"icon": "bug",
"gutterIcon": true
},
"FIXME": {
"iconColour": "yellow",
"background": "yellow",
"gutterIcon": true,
"icon": "flame"
},
"TODO": {
"iconColour": "#FFA550",
"background": "FFA550",
"gutterIcon": true,
"icon": "check"
}
},
"todo-tree.general.debug": true
}
And nothing unusual, the error only started occurring when I updated vsc. Reinstalling VSC and the plugin didn't help.
Now I'm getting a different error, again:
fs.js:143
throw new ERR_INVALID_CALLBACK(cb);
^
[TypeError [ERR_INVALID_CALLBACK]: Callback must be a function. Received undefined
at makeCallback (fs.js:143:11)
at Object.unlink (fs.js:1024:14)
at Socket.<anonymous> (c:\Users\Novot\.vscode\extensions\gruntfuggly.todo-tree-0.0.188\dist\extension.js:22:36215)
at Socket.emit (events.js:228:7)
at addChunk (_stream_readable.js:309:12)
at readableAddChunk (_stream_readable.js:286:13)
at Socket.Readable.push (_stream_readable.js:224:10)
at Pipe.onStreamRead (internal/stream_base_commons.js:181:23)] {
code: 'ERR_INVALID_CALLBACK'
}
Now I'm getting these three errors in a random order, and now just creating a pattern.txt doesn't fix anything
I have no idea what's causing all this weirdness, probably a conflict with another plugin?
Here are my installed extensions:
13xforever.language-x86-64-assembly
aaron-bond.better-comments
af4jm.vscode-icalendar
bar9.stories
bltg-team.masm
bmewburn.vscode-intelephense-client
cmstead.jsrefactor
cstrachan.vcard
Dart-Code.dart-code
Dart-Code.flutter
dbaeumer.jshint
DotJoshJohnson.xml
eamodio.gitlens
Equinusocio.vsc-community-material-theme
Equinusocio.vsc-material-theme
equinusocio.vsc-material-theme-icons
felixfbecker.php-intellisense
geequlim.godot-tools
Gruntfuggly.todo-tree
icrawl.discord-vscode
janisdd.vscode-edit-csv
lonefy.vscode-JS-CSS-HTML-formatter
ms-dotnettools.csharp
ms-python.python
ms-toolsai.jupyter
ms-vscode.cmake-tools
ms-vscode.cpptools
ms-vscode.hexeditor
pepri.subtitles-editor
RaidXu.logcat-color
Razoric.gdscript-toolkit-formatter
redhat.java
Shan.code-settings-sync
softwaredotcom.music-time
softwaredotcom.swdc-vscode
SonarSource.sonarlint-vscode
spences10.vba
svipas.code-autocomplete
timonwong.shellcheck
tobiaswaelde.clockify-tracker
VisualStudioExptTeam.vscodeintellicode
vscjava.vscode-java-debug
vscjava.vscode-java-dependency
vscjava.vscode-java-pack
vscjava.vscode-java-test
vscjava.vscode-maven
vscode-icons-team.vscode-icons
WakaTime.vscode-wakatime
I think I understand the last one - it's not removing the pattern file correctly when the search fails. It should be using 'unlinkSync', but that was also failing in your first problem, so I don't think that will magically fix anything.
You could try Todo Tree: Reset Cache, which should clear any stored settings and data.
Or more drastically, you could revert to version 0.0.183 which removes the support for the pattern file.
One other thought - are you running a virus scanner? It looks like there is an issue with writing to the workspace storage area - maybe it's interfering.
If reverting to 0.0.183 works, I'll add an option to not use the pattern file in the next release.
So resetting cache didn't work and I also disabled and excluded the VSC folders in my antivirus (Eset Internet Security) but didn't solve the problem.
BUT since I reverted to 0.0.183 about two hours ago the error has disappeared. I'm not sure whether this a permanent thing or the error will come back later, but I will keep you updated!
Yeah, definitely no errors now. Reverting fixed it!
You may now close this issue 馃憤
I've added an option to disable use of the pattern file in the next version. Please can you try it and if you still have the same issues, try setting todo-tree.ripgrep.usePatternFile to false. That should be the equivalent of reverting to the old version.
I've just uploaded a new version which fixes an issue with the pattern file. I'm not sure it's exactly the same issue as you were seeing, but you might find it now works with the pattern file enabled.
It's been working for almost 8 days and now it's back to my second error:
internal/fs/utils.js:525
throw new ERR_INVALID_ARG_TYPE(propName, ['string', 'Buffer', 'URL'], path);
^
[TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be one of type string, Buffer, or URL. Received type undefined
at mkdirSync (fs.js:815:10)
at Object.fs.mkdirSync (electron/js2c/asar.js:718:16)
at B (c:\Users\Novot\.vscode\extensions\gruntfuggly.todo-tree-0.0.192\dist\extension.js:22:11299)
at Timeout.j [as _onTimeout] (c:\Users\Novot\.vscode\extensions\gruntfuggly.todo-tree-0.0.192\dist\extension.js:22:12637)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7)] {
code: 'ERR_INVALID_ARG_TYPE'
}
I've just pushed a version (0.0.194) which should be slightly more robust when creating the storage folders (if required). It should also log when it is trying to do so.
Can you please try it and let me know if there is any improvement?
Hello, I've been really careful not to update todo-tree accidentally. So I tried updating to 0.0.194 and I got the following error trace without any additional debug messages:
localProcessExtensionHost.ts:258 c:\Users\Novot\.vscode\extensions\gruntfuggly.todo-tree-0.0.194\dist\extension.js:39
*/var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},a=0;a<10;a++)t["_"+String.fromCharCode(a)]=a;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var a,l,h=i(e),u=1;u<arguments.length;u++){for(var s in a=Object(arguments[u]))r.call(a,s)&&(h[s]=a[s]);if(n){l=n(a);for(var c=0;c<l.length;c++)o.call(a,l[c])&&(h[l[c]]=a[l[c]])}}return h}},function(e,t,a){var n,r=
[ReferenceError: context_ is not defined
at d (c:\Users\Novot\.vscode\extensions\gruntfuggly.todo-tree-0.0.194\dist\extension.js:39:2298)
at c:\Users\Novot\.vscode\extensions\gruntfuggly.todo-tree-0.0.194\dist\extension.js:39:4088
at Array.forEach (<anonymous>)
at Timeout.y [as _onTimeout] (c:\Users\Novot\.vscode\extensions\gruntfuggly.todo-tree-0.0.194\dist\extension.js:39:4061)
at listOnTimeout (internal/timers.js:533:17)
at processTimers (internal/timers.js:475:7)] {
vslsStack: [
CallSite {},
CallSite {},
CallSite {},
CallSite {},
CallSite {},
CallSite {}
]
}
And also sometimes vsc fails to load the plugin:
abstractExtensionService.ts:717 Activating extension 'Gruntfuggly.todo-tree' failed: Cannot read property 'indexOf' of undefined.
_logMessageInConsole @ abstractExtensionService.ts:660
_logOrShowMessage @ abstractExtensionService.ts:728
$onExtensionActivationError @ mainThreadExtensionService.ts:57
_doInvokeHandler @ rpcProtocol.ts:396
_invokeHandler @ rpcProtocol.ts:330
_receiveRequest @ rpcProtocol.ts:269
_receiveOneMessage @ rpcProtocol.ts:208
(anonymous) @ rpcProtocol.ts:90
fire @ event.ts:525
fire @ ipc.net.ts:449
_receiveMessage @ ipc.net.ts:785
(anonymous) @ ipc.net.ts:642
fire @ event.ts:525
acceptChunk @ ipc.net.ts:191
(anonymous) @ ipc.net.ts:191
t @ ipc.net.ts:925
emit @ events.js:223
addChunk @ _stream_readable.js:309
readableAddChunk @ _stream_readable.js:290
Readable.push @ _stream_readable.js:224
onStreamRead @ internal/stream_base_commons.js:181
Yeh, just spotted both those errors. I'm just pushing a new version which should hopefully fix both.
Should now be available (0.0.195), when the marketplace catches up.
Looks like it is working at the moment, I will keep you updated.
Six days have gone by without any issues, everything is working perfectly 馃憣
You may now close this issue!