PowerRun Calculated value fails to copy with message "Copy failed, Please try later"
PowerRun calculator suddenly started returning the error.
Version : V0.19.2
Steps to replicate :
- Enter some string to Calculate: 10939+49883/8373
- Click enter to copy the result shown

@shirkerohit do you have anything else that may inhibit an app copying to the clipboard? Any group policy?
No, Nothing. facing this since I have updated to latest version.
Just wanted to add that I'm also running into this issue a lot on v0.20. The strange thing is, in my case, the copy actually succeeds (I can paste the correct copied value into other applications) but I'm still getting the error "Copy failed, please try later" even though the copy succeeded. I'm also using it to copy the values of calculations.
EDIT: And I've already found a potential cause - I get this error whenever I have HTMLPad 2018 by Blumentals running, whether in the foreground or background. Once I quit HTMLPad, I no longer get the error message.
We use a standard call to clipboard. That app could be doing something odd.
@shirkerohit does this happen if PT is the only thing running? do you notice something like @syneryder did with a certain app open it causes the quirk?
No I am not sure if I had any specific app open. Since I have updated to v 0.20.1, I have not faced this issue and hence closing this. Thanks for your time!
If I face it again surely report it back.
PhraseExpress by Bartels Media also seems to be a conflict. Latest beta released just recently could potentially have fixed this.
I just installed v0.58 with the suggested bugfix (thank you very much for looking at this!), but unfortunately it hasn't fixed it for me.
The weird thing is, the error message in my case is incorrect - the copy actually succeeds. Is it possible this is an Exception that can be ignored? The error message doesn't state what the Exception is. If the error message was commented out (ie the MessageBox call on line 54 of ResultHelper.cs), I wouldn't have a problem at all. However, the bug still only occurs for me when HTMLPad 2022 by Blumentals is running, so I guess that app is the true problem.
I found this MS Forum post which describes an identical problem with nearly identical code to what is in ResultHelper.cs:
https://social.microsoft.com/Forums/en-US/d2a67962-ca82-43f2-8476-213ccbdbdd92/clipboardsettext-exception?forum=Offtopic
And this StackOverflow post about How To Handle A Blocked Clipboard also appears to be directly relevant:
https://stackoverflow.com/questions/930219/how-to-handle-a-blocked-clipboard-and-other-oddities
The other bug for me is that the error message dialog sometimes "locks up" PowerRun, because the message dialog doesn't appear front-most. An icon for the error dialog window appears on the taskbar, but clicking on it reveals PowerRun instead of the error dialog. In those cases, there's no way to get to the MessageBox error dialog to click the OK button to dismiss it. (In Win32 C this often happens when passing NULL as the parent HWND for the message dialog, but I'm not a C# developer, so I'm not sure if that's relevant here.)
To reproduce:
- Launch conflicting app (ie HTMLPad 2022, don't need to do anything beyond launching, can run in background)
- Type keyboard shortcut to launch PowerRun
- Type in a mathematical expression, eg 10 + 20
- Press enter to copy the result to the clipboard
- "Copy failed, please try later" Error dialog message now appears
I always get this error without any conflicting apps running (at least I have closed all non-background applications and still get the problem). But likewise the copy does succeed for me even though it says it fails. Basically everything @syneryder described is what I am experiencing. I guess I have some unidentifiable conflicting app in the background.
Still present in 0.62. Since this feature is based on Wox, and Wox had the same bug, I'm hoping someone from Microsoft can figure out the root cause and fix it.
https://github.com/Wox-launcher/Wox/issues/2469
Very annoying bug. If trying to copy certain result from the new "History Results" addon, and if it fails, there's no such dialog popping up and it hangs the "PowerToys.PowerLauncher.exe".
Very annoying bug. If trying to copy certain result from the new "History Results" addon, and if it fails, there's no such dialog popping up and it hangs the "PowerToys.PowerLauncher.exe".
same issue when trying to convert units especially try this line:(tried it on more than one pc): 10 sec to ms press enter to copy receive the error: copy failed
Same issue here.
Facing the same issue with the latest update. Worked fine previously.
The good news is you can press Enter again and it closes the window, since the OK button is selected. However, the window does take a second to appear, so it's not a perfect workaround. But yeah, it's still happening for me as of v0.85.1.
I encountered the same problem, and I got inspiration from https://github.com/Wox-launcher/Wox/issues/2469#issuecomment-935757046, because I enabled the flow function of Logitech Option+ similar to the Unbounded Mouse, and after turning it off, I confirmed that the behavior of copying to the clipboard returned to normal. Maybe any similar function will cause the error. Wox seems to have no intention of fixing this error in version 1.x
我遇到了相同的问题,我从 https://github.com/Wox-launcher/Wox/issues/2469#issuecomment-935757046 得到了灵感,因为我启动了类似于无界鼠标的罗技option+的flow功能,在关闭后我确认复制到剪切板的行为恢复了正常,也许任何类似的功能都会导致错误。wox似乎无意在1.x版本修复这个错误