sindresorhus / clipboardy

Access the system clipboard (copy/paste)
MIT License
1.8k stars 63 forks source link

"Command failed" on paste #42

Open timiles opened 6 years ago

timiles commented 6 years ago

Issuehunt badges

I'm using the Clipboard Ring extension (https://github.com/SrTobi/code-clip-ring) in VS Code, which has a dependency on clipboardy ^1.2.3.

I occasionally get the following error, preventing me from pasting the content of my clipboard:

Command failed: C:\Users\Tim\.vscode\extensions\code-clip-ring\node_modules\clipboardy\fallbacks\windows\clipboard_x86_64.exe --paste thread 'main' panicked at 'Error: Could not paste from clipboard: Error { repr: Os { code: 0, message: "The operation completed successfully." } }', src\libcore\result.rs:906:4 note: Run withRUST_BACKTRACE=1for a backtrace.

Seems strange that clipboard_x86_64.exe reports an Error with what looks like a success message?

I think restarting VS Code might fix this, but it's a nuisance. Any ideas?

Other info: I'm running Windows 10 Home N. VS Code: Version 1.24.1.

There is a $60.00 open bounty on this issue. Add more on Issuehunt.

floatdrop commented 6 years ago

I thinks this bug is in upstream module - https://github.com/sindresorhus/win-clipboard/issues/16

yeikel commented 6 years ago

A good way to reproduce this is to try doing an operation multiple times. Example : copy

IssueHuntBot commented 5 years ago

@issuehunt has funded $60.00 to this issue.


zhfnjust commented 3 years ago

same issue

     Error: Command failed: C:\Users\myland\code\ide2\node_modules\clipboardy\fallbacks\windows\clipboard_x86_64.exe --paste
thread 'main' panicked at 'Error: Could not paste from clipboard: Error { repr: Os { code: 5, message: "拒绝访问。" } }', src\libcore\result.rs:906:4
note: Run with `RUST_BACKTRACE=1` for a backtrace.
amishrap4 commented 9 months ago

Same issue: Command failed with exit code 101: C:\vscode_test\node_modules\clipboardy\fallbacks\windows\clipboard_x86_64.exe --paste thread 'main' panicked at 'Error: Could not paste from clipboard: Error { repr: Os { code: 5, message: "アクセスが拒否されました。" } }', src\libcore\result.rs:906:4 note: Run withRUST_BACKTRACE=1for a backtrace.

lisa21212 commented 3 months ago

Any solution for this problem? It'll happen when I execute paste from clipboard multiple times in a short time. { code: 5, message: "存取被拒。" }

amishrap4 commented 3 months ago

Same issue: Command failed with exit code 101: C:\vscode_test\node_modules\clipboardy\fallbacks\windows\clipboard_x86_64.exe --paste thread 'main' panicked at 'Error: Could not paste from clipboard: Error { repr: Os { code: 5, message: "アクセスが拒否されました。" } }', src\libcore\result.rs:906:4 note: Run withRUST_BACKTRACE=1for a backtrace.

Even I upgraded the NodeJs to 20.15.5, then also I am having the same issue; Environment: Windows 11, Japanese

fardinahosancse commented 1 month ago

Same issue,

Error: Command failed with exit code 101: F:\DevFardin\v02\syncx\node_modules\clipboardy\fallbacks\windows\clipboard_x86_64.exe --paste thread 'main' panicked at 'Error: Could not paste from clipboard: Error { repr: Os { code: 1168, message: "Element not found." } }', src\libcore\result.rs:906:4 note: Run with RUST_BACKTRACE=1 for a backtrace.

at makeError (file:///F:/DevFardin/v02/syncx/node_modules/clipboardy/node_modules/execa/lib/error.js:60:11)
at handlePromise (file:///F:/DevFardin/v02/syncx/node_modules/clipboardy/node_modules/execa/index.js:124:26)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.paste (file:///F:/DevFardin/v02/syncx/node_modules/clipboardy/lib/windows.js:16:20)
at async Timeout._onTimeout (F:\DevFardin\v02\syncx\server.js:77:38) {

shortMessage: 'Command failed with exit code 101: F:\DevFardin\v02\syncx\node_modules\clipboardy\fallbacks\windows\clipboard_x86_64.exe --paste', command: 'F:\DevFardin\v02\syncx\node_modules\clipboardy\fallbacks\windows\clipboard_x86_64.exe --paste', escapedCommand: '"F:\DevFardin\v02\syncx\node_modules\clipboardy\fallbacks\windows\clipboard_x86_64.exe" --paste', exitCode: 101, signal: undefined, signalDescription: undefined, stdout: '', stderr: thread 'main' panicked at 'Error: Could not paste from clipboard: Error { repr: Os { code: 1168, message: "Element not found." } }', src\\libcore\\result.rs:906:4\n + 'note: Run with RUST_BACKTRACE=1 for a backtrace.\n', cwd: 'F:\DevFardin\v02\syncx', failed: true, timedOut: false, isCanceled: false, killed: false

environment: Windows 11 Pro