gitkraken/vscode-gitlens

Copy to clipboard not working

turijs opened this issue · 6 comments

  • GitLens Version: 8.4.1
  • VSCode Version: 1.24.1
  • OS Version: Ubuntu 16.04

None of the methods for copying a commit ID to clipboard are working for me. I came across issue #35, but I do have xclip installed and I am not getting any error message. Any help would be appreciated!

And thanks for this awesome plugin btw!

In case it helps, I was also experiencing the same issue with:

  • GitLens Version: 8.4.1
  • VSCode Version: 1.24.1
  • OS Version: Ubuntu 16.04
  • xclip Version 0.12

I opened the VS Code developer tools and saw the following errors were being written to the console after attempting to copy a commit ID to the clipboard:

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
mainThreadExtensionService.ts:43 [eamodio.gitlens]Couldn't find the required `xsel` binary. On Debian/Ubuntu you can install it with: sudo apt install xsel
e.$onExtensionRuntimeError @ mainThreadExtensionService.ts:43
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
mainThreadExtensionService.ts:44 Error: Couldn't find the required `xsel` binary. On Debian/Ubuntu you can install it with: sudo apt install xsel
	at handler (/home/stephen/.vscode/extensions/eamodio.gitlens-8.4.1/node_modules/clipboardy/lib/linux.js:7:9)
	at <anonymous>
	at process._tickCallback (internal/process/next_tick.js:109:7)
e.$onExtensionRuntimeError @ mainThreadExtensionService.ts:44
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

Running sudo apt install xsel as suggested in the error message fixed the problem for me.

Thanks for the tip! This solved my issue.

There is something else going on as xsel should be bundled. So either my bundling is wrong or this is just some edge case that needs a much better error message

In that case, let me know if there is any info I can provide to help track this down.

I'm still getting this with gitlens@8.5.6 and code@1.26.1 when trying to copy commit id or message:

notificationsAlerts.ts:41 Unable to copy commit id, xsel is not installed. You can install it via `sudo apt install xsel`
t.onDidNotificationChange @ notificationsAlerts.ts:41
(anonymous) @ notificationsAlerts.ts:27
e.fire @ event.ts:140
t.notify @ notifications.ts:113
t.notify @ notificationService.ts:56
e._showMessage @ mainThreadMessageService.ts:84
e._showMessage @ mainThreadMessageService.ts:45
e.$showMessage @ mainThreadMessageService.ts:39
e._doInvokeHandler @ rpcProtocol.ts:261
e._invokeHandler @ rpcProtocol.ts:246
e._receiveRequest @ rpcProtocol.ts:192
e._receiveOneMessage @ rpcProtocol.ts:174
(anonymous) @ rpcProtocol.ts:107
(anonymous) @ rpcProtocol.ts:303
e.fire @ event.ts:140
a @ ipc.net.ts:104
n._socketDataListener @ ipc.net.ts:133
emitOne @ events.js:116
emit @ events.js:211
addChunk @ _stream_readable.js:263
readableAddChunk @ _stream_readable.js:250
Readable.push @ _stream_readable.js:208
onread @ net.js:594
log.ts:171   ERR Unexpected SIGPIPE: Error: Unexpected SIGPIPE
	at process.<anonymous> (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:833:204)
	at emitNone (events.js:106:13)
	at process.emit (events.js:208:7)
	at Signal.process.on.wrap.onsignal (internal/process.js:208:44)

Installing xsel did fix this though.

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.