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

Copying of results to clipboard not working #24043

Closed
Nikolai5 opened this issue Aug 1, 2023 · 11 comments · Fixed by #24341 · May be fixed by #24137
Closed

Copying of results to clipboard not working #24043

Nikolai5 opened this issue Aug 1, 2023 · 11 comments · Fixed by #24341 · May be fixed by #24137
Assignees
Labels
Area - Query Editor Bug Impact OS: Linux Applies to Linux OS only - only use for platform specific issues Triage: Done

Comments

@Nikolai5
Copy link

Nikolai5 commented Aug 1, 2023

Type: Bug

If I try to copy the contents of a field, even a single field, it doesn't work. The first time I press a copy I get a progress bar/popup in the bottom-right of the window that says "copying.." and even if I wait for that to go away it hasn't actually copied the text to my clipboard.

After that the message doesn't appear but copy still seems to do nothing. It is the same if I right click and select copy or use the ctrl + c shortcut.

Azure Data Studio version: azuredatastudio 1.45.0 (8eff468, 2023-07-24T18:11:05.791Z)
OS version: Linux x64 5.15.0-78-generic
Restricted Mode: No
Preview Features: Disabled
Modes:

System Info
Item Value
CPUs AMD Ryzen 7 1800X Eight-Core Processor (16 x 3743)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) 1, 1, 2
Memory (System) 31.27GB (22.77GB free)
Process Argv --unity-launch
Screen Reader no
VM 0%
DESKTOP_SESSION cinnamon
XDG_CURRENT_DESKTOP X-Cinnamon
XDG_SESSION_DESKTOP cinnamon
XDG_SESSION_TYPE x11
Extensions (1)
Extension Author (truncated) Version
import Mic 1.5.5
@cssuh
Copy link
Member

cssuh commented Aug 2, 2023

I was able to repro this issue, this is the error I'm getting in the Developer Tools Console when I try to copy anything from the query results.

image

Edit: After further testing, this only applies to the linux platform - windows and macos worked fine.

@cssuh cssuh added the Impact OS: Linux Applies to Linux OS only - only use for platform specific issues label Aug 2, 2023
@cssuh cssuh added this to the September 2023 Release milestone Aug 3, 2023
@cssuh cssuh self-assigned this Aug 3, 2023
@cssuh
Copy link
Member

cssuh commented Aug 3, 2023

@Nikolai5 can you try installing xsel as a workaroud? Seems like this worked for another user in #24066. Meanwhile, we will be working on a fix.

@Nikolai5
Copy link
Author

Nikolai5 commented Aug 4, 2023

@Nikolai5 can you try installing xsel as a workaroud? Seems like this worked for another user in #24066. Meanwhile, we will be working on a fix.

It seems to work fine with xsel installed yeah. It looks like its related to a new feature where it tells you how many rows its copied, I guess due to previous complaints that the copy and paste from results seemed to be a little unreliable at times.

I guess a solution would be to add xsel as a dependency of the package so that it gets auto installed?

@jhubsharp
Copy link

jhubsharp commented Aug 8, 2023

Copy/paste is also broken on Windows 11 from the query results. Copying from output or something else works fine. I don't see a popup or anything, it just doesn't work.

Here's what I see in DevTools:

ERR Object reference not set to an instance of an object.: Error: Object reference not set to an instance of an object.
	at \AppData\Local\Programs\Azure Data Studio\resources\app\extensions\mssql\dist\main.js:2:694866
	at \AppData\Local\Programs\Azure Data Studio\resources\app\extensions\mssql\dist\main.js:2:695160
	at Immediate.<anonymous> (\AppData\Local\Programs\Azure Data Studio\resources\app\extensions\mssql\dist\main.js:2:695521)
	at process.processImmediate (node:internal/timers:466:21)

@cssuh
Copy link
Member

cssuh commented Sep 5, 2023

CopyText/TextCopy#733 Seems like this issue is coming from the TextCopy package we added to STS here: microsoft/sqltoolsservice#2096

@cssuh
Copy link
Member

cssuh commented Sep 11, 2023

@Nikolai5 The fix should be in the latest insiders, if you'd like to give it a try.

@jhubsharp
Copy link

jhubsharp commented Sep 19, 2023

@cssuh I downloaded the latest insiders build (1.4.7.0-insider) but this still doesn't work on Windows 11 with the same error in the dev tools:

ERR Object reference not set to an instance of an object.: Error: Object reference not set to an instance of an object.
at c:\Users\MyUser\AppData\Local\Programs\Azure Data Studio - Insiders\resources\app\extensions\mssql\dist\main.js:2:682049
at c:\Users\MyUser\AppData\Local\Programs\Azure Data Studio - Insiders\resources\app\extensions\mssql\dist\main.js:2:682343
at Immediate. (c:\Users\MyUser\AppData\Local\Programs\Azure Data Studio - Insiders\resources\app\extensions\mssql\dist\main.js:2:682704)
at process.processImmediate (node:internal/timers:466:21)

@cssuh
Copy link
Member

cssuh commented Sep 19, 2023

@jhubsharp do you mind opening a new issue for this? Also, what type of server are you connected to?

@jhubsharp
Copy link

@cssuh new issue filed with details of which databases (both SQL Server) are having problems. Thanks for taking a look.

@LarnuUK
Copy link

LarnuUK commented Sep 22, 2023

Seems like this is also back on Linux. The installation of Xsel is not longer a work around. How does Microsoft break such a fundamental feature? Next we won't be able to paste into the Query window...

@Nikolai5
Copy link
Author

Just wanted to confirm that the issue seems to be resolved. I can copy without xsell installed without issue.

Tested on 6.6.7-1-MANJARO KDE (X11)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area - Query Editor Bug Impact OS: Linux Applies to Linux OS only - only use for platform specific issues Triage: Done
Projects
5 participants