Skip to content

[v2] Trying to copy within Terminal is broken #985

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

Closed
sr229 opened this issue Sep 15, 2019 · 12 comments
Closed

[v2] Trying to copy within Terminal is broken #985

sr229 opened this issue Sep 15, 2019 · 12 comments
Labels
bug Something isn't working

Comments

@sr229
Copy link
Contributor

sr229 commented Sep 15, 2019

  • code-server version: master LKGR (1.38.1 Upstream)
  • OS Version: Ubuntu 18.04.03 LTS on Hyper-V

Description

Trying to copy from the terminal will break code-server. This used to work up until the current LKGR.

Steps to Reproduce

  1. Spawn Terminal
  2. Highlight selection and hit Ctrl+C

image

@sr229 sr229 added bug Something isn't working v2 labels Sep 15, 2019
@sr229
Copy link
Contributor Author

sr229 commented Sep 15, 2019

Checking console, this error pops up:

TypeError: Cannot set property 'open' of undefined
    at extensionHostWorker.js:586
    at Function.t._safeInvokeFunction (loader.js:1014)
    at Function.t._invokeFactory (loader.js:1033)
    at t.complete (loader.js:1046)
    at s._onModuleComplete (loader.js:1663)
    at s._resolve (loader.js:1623)
    at s.defineModule (loader.js:1274)
    at o (loader.js:1713)
    at extensionHostWorker.js:586
    at extensionHostWorker.js:587
r @ loader.js:267
  ERR Cannot read property 'writeText' of undefined: TypeError: Cannot read property 'writeText' of undefined
    at Proxy.<anonymous> (http://192.168.130.104:8080/static-bb46e80d44304eb6bff94a9f4ee5516baffb598d/out/vs/workbench/workbench.web.api.js:1396:803)
    at Generator.next (<anonymous>)
    at http://192.168.130.104:8080/static-bb46e80d44304eb6bff94a9f4ee5516baffb598d/out/vs/workbench/workbench.web.api.js:35:566
    at new Promise (<anonymous>)
    at n (http://192.168.130.104:8080/static-bb46e80d44304eb6bff94a9f4ee5516baffb598d/out/vs/workbench/workbench.web.api.js:35:343)
    at Proxy.writeText (http://192.168.130.104:8080/static-bb46e80d44304eb6bff94a9f4ee5516baffb598d/out/vs/workbench/workbench.web.api.js:1396:737)
    at e.<anonymous> (http://192.168.130.104:8080/static-bb46e80d44304eb6bff94a9f4ee5516baffb598d/out/vs/workbench/workbench.web.api.js:3987:51)
    at Generator.next (<anonymous>)
    at r (http://192.168.130.104:8080/static-bb46e80d44304eb6bff94a9f4ee5516baffb598d/out/vs/workbench/workbench.web.api.js:35:399)

@maplebeats
Copy link

i have then same question when use chromium on ubuntu18.04

@sr229
Copy link
Contributor Author

sr229 commented Sep 18, 2019

i have then same question when use chromium on ubuntu18.04

Try running it on localhost and see if that works. The reason for this is because the browser prevents clipboard access on insecure remotes.

@maplebeats
Copy link

i have then same question when use chromium on ubuntu18.04

Try running it on localhost and see if that works. The reason for this is because the browser prevents clipboard access on insecure remotes.

ubuntu only? my mac's chromium works well.

@sr229
Copy link
Contributor Author

sr229 commented Sep 19, 2019

@maplebeats all versions of Chromium regardless of platform is affected.

@darkdragn
Copy link

This is going to sound a little stupid, but Chrome only did this to me if the connection was untrusted.

As soon as I got an SSL Cert from a trusted source, it started working like a charm. Both copy and paste, I just needed that site "Allow Access to Clipboard" setting to be tripped. This applies to both the linux chromium, running on CentOS and Chrome OS' browser.

So, sorry to be the barer of bad news, but it looks like it's a Chrome Permissions issue, that applies to untrusted connections, not something the code server guys can do anything about.

@sr229
Copy link
Contributor Author

sr229 commented Oct 6, 2019

This is going to sound a little stupid, but Chrome only did this to me if the connection was untrusted.

As soon as I got an SSL Cert from a trusted source, it started working like a charm. Both copy and paste, I just needed that site "Allow Access to Clipboard" setting to be tripped. This applies to both the linux chromium, running on CentOS and Chrome OS' browser.

So, sorry to be the barer of bad news, but it looks like it's a Chrome Permissions issue, that applies to untrusted connections, not something the code server guys can do anything about.

I did hear localhost and .local (avahi-daemon domains) are exempt from this, butyeah what @darkdragn said.

@oldrichsmejkal
Copy link

Not sure how they achieve it, but in Jupyter lab copying (from Terminal with ctrl+c) working without any issue, even on non trusted site
(Ubuntu 18 on DigitalOcean as remote and Chrome in Windows 10 as local - same setup as I am trying with code-server)

@oldrichsmejkal
Copy link

I think this quite kills usability for many users. Working without clipboard is quite hard some times..

@sr229
Copy link
Contributor Author

sr229 commented Oct 21, 2019

I think this quite kills usability for many users. Working without clipboard is quite hard some times..

I think you should raise this to Chromium, this is beyond our control sadly, and we're not going to compromise code quality for features which might make it hard to maintain over time.

@code-asher
Copy link
Member

Closing to consolidate into #1106.

@oldrichsmejkal
Copy link

I think this quite kills usability for many users. Working without clipboard is quite hard some times..

I think you should raise this to Chromium, this is beyond our control sadly, and we're not going to compromise code quality for features which might make it hard to maintain over time.

It doesn't work in any browser as far as I know.
Definitely not in Firefox/Vivaldi.
So raising issue to Chromium doesn't make much sense...

Maybe it would be better to make this work as it is elsewhere, than insist on solution purity...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants