Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Command failed" on paste #42

Open
timiles opened this issue Aug 7, 2018 · 10 comments
Open

"Command failed" on paste #42

timiles opened this issue Aug 7, 2018 · 10 comments
Labels
bug 💵 Funded on Issuehunt This issue has been funded on Issuehunt help wanted

Comments

@timiles
Copy link

timiles commented Aug 7, 2018

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 with RUST_BACKTRACE=1 for 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
Copy link
Collaborator

I thinks this bug is in upstream module -
sindresorhus/windows-clipboard#16

@yeikel
Copy link

yeikel commented Nov 1, 2018

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

@IssueHuntBot
Copy link

@IssueHunt has funded $60.00 to this issue.


@issuehunt-oss issuehunt-oss bot added the 💵 Funded on Issuehunt This issue has been funded on Issuehunt label May 10, 2019
@zhfnjust
Copy link

zhfnjust commented Jun 7, 2021

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
Copy link

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 with RUST_BACKTRACE=1 for a backtrace.

@lisa21212
Copy link

lisa21212 commented Aug 15, 2024

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

@amishrap4
Copy link

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 with RUST_BACKTRACE=1 for a backtrace.

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

@fardinahosancse
Copy link

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

@ru44
Copy link

ru44 commented Dec 19, 2024

@timiles I tested the fallback on Windows using this version, and it seems to work fine:
clipboardy@1.2.3/fallbacks/windows

Let me know if it's work with you

@amishrap4
Copy link

So It worked for me, when I stopped my windows machine being locked/screensaver after a few moments.
so for me, the solution was to not lock the machine or prevent the idle mode after a moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 💵 Funded on Issuehunt This issue has been funded on Issuehunt help wanted
Projects
None yet
Development

No branches or pull requests

10 participants