Can't Write to Clipboard (Possibly Linux-related) #48
gazugafan posted onGitHub
I've gotten a couple bug reports on my VS Code extension that uses Clipboardy. It seems that there's sometimes a problem calling clipboardy.write(). I haven't been able to reproduce it myself, but both users are running Linux. One in particular is running: Linux x64 4.9.0-8-amd64 (SolydX 9 / Debian Stretch)
One of them gave the following error log...
[Extension Host] Error pasting... TypeError: Cannot read property 'end' of undefined
at handleInput (/home/sembiance/.vscode/extensions/gazugafan.vscode-indent-on-paste-2.3.2/node_modules/execa/index.js:75:17)
at module.exports (/home/sembiance/.vscode/extensions/gazugafan.vscode-indent-on-paste-2.3.2/node_modules/execa/index.js:273:2)
at Object.copy (/home/sembiance/.vscode/extensions/gazugafan.vscode-indent-on-paste-2.3.2/node_modules/clipboardy/lib/linux.js:17:10)
at Object.exports.write.input [as write] (/home/sembiance/.vscode/extensions/gazugafan.vscode-indent-on-paste-2.3.2/node_modules/clipboardy/index.js:28:20)
at indentOnPaste (/home/sembiance/.vscode/extensions/gazugafan.vscode-indent-on-paste-2.3.2/out/src/extension.js:96:24)
... the line in my extension triggering this error (out/src/extension.js:96:24
) is calling clipboardy.write(). It looks like this...
clipboardy.write(clipboard_1).then(function () {
...
}, function () { pasting = false; });
... which seems to be really straightforward to me. Not sure what's going wrong, but according to the error log it could be up in clipboardy or execa. Any ideas? Are there any known issues with clipboardy on certain flavors of Linux?