šŸ’” [SOLUTION] for error: `Unable to read from browser's clipboard`

Most of the time, your browser wonā€™t allow clipboard access due to security reasons. This is the error you get when the clipboard is inaccessible:

If you are unable to paste in the RDB courseā€™s terminal, follow these steps for Chrome.

1. Allow Clipboard on Chrome for freecodecamp.org

clipboard

If this doesnā€™t work, try the step below.

2. Use alternate keys to paste.

I am able to paste using shift+insert on Chrome/ Windows. This saves a lot of time, especially in writing bulk queries.

I hope this helps! :slight_smile:

7 Likes

Hey, tried both solutions, error steal prevail. Is it bug relevant to CodeAlly or VS Code virtual machine? Still it is very frustrating to work with SQL in that manner.

I believe I found the solution. There is problem between CodeAlly and FreeCodeCamp. If you open CodeAlly standalone pasting issue is solved.

Simply delete FreeCodeCamp from adress in browser.

Hi, Iā€™ve tried all solutions in this bost yet error still appears.

  • Clipboard has been enabled and the page refreshed, yet it gives the same error when I ctrl+v
  • If I try to shift+insert I get ~ instead of the previously copied text (I donā€™t have an EN keyboard so I tried changing the language settings yet I get the same ~)
  • Lastly, there is no way to remove FreeCodeCamp from the address bar in the browser without having the page refresh to a google search. Maybe Iā€™m doing this last one wrong?

Iā€™d appreciate some extra guidance thank you in advance!

How are you copying the text?
The way I copy is I select with a mouse and then right click and choose copy.

Iā€™ve tried both the usual ways as well as the shift+insert suggested here

If I try with mouse, I can copy no problem yet as soon as I try right click in the the terminal the ā€œUnable to copy from clipboardā€ message appears
ctrl+c and ctrl+v gives the same result

Okay but what I am asking you is, when you said you tried the shift-insert method, and it didnā€™t work, how were you performing the copy?

The way I do it is I use the mouse to select, then right click to select copy.
Then I place my mouse in the terminal prompt line and click shift-insert.

Have you tried it like this?

Indeed, I still receive ~ as a result no matter which line I highlited and clicked to copy.

I tried like this:

  • mouse select text example for the exercise from browser , right click copy, shift+insert into the terminal and obtain ~
  • mouse select text I wrote in a txt file, right click copy, shift+insert into terminal and obtain ~

however if I select from browser and copy it in the txt file it works fine even with shift+insert so Iā€™m a bit confused

ps: thank you for taking the time to help me out, appreciate it

When you highlight the text, and move into the terminal area, is the text still highlighted? I was reading that maybe shift-insert only copies from the ā€œselected clipboardā€ not the ā€œcopy clipboardā€, so just wanted you to see if you can try again and check that the text is still highlighted as you are clicking shift-insert

How did you enable the clipboard? Was it steps similar to these?

  1. Navigate to your Settings tab from Chrome.
  2. Click on Privacy and Security.
  3. Click on Site Settings.
  4. Click View permissions and data stored across sites.
  5. Select the entry for the site that is associated with your VS Code server.
  6. Scroll down until you find a Clipboardpermission, and select Allow from the provided dropdown menu to the right of the permission.

Have you tried to use the mouse to paste instead of CTRL-v? That is, place your mouse in the terminal and right click and select the paste option?

I clicked the ā€˜locketā€™ icon on the top left of the browser and allowed Clipboard from there through similar steps.
Nevertheless, I went through it using the steps you mentioned and www.freecodecamp.org is listed in the allowed websites already.

I am unable to use the mouse to paste, as soon as I try to right click in the the terminal the ā€œUnable to copy from clipboardā€ message appears. Iā€™m not even offered the possibility to paste.

I didnā€™t pay attention to it specifically so I just tried again :slight_smile:
I can confirm that
text remains highlighted when copying both from txt file and from the exercise instruction box yet when pasting I get the same errors (either ~ or pop up message)

however

selection instantly disappears if I try to right click copy a line from the terminal
so I can only copy using ctrl+c
if I paste it in my txt file it works

if I do ctrl+c in the terminal the text remains highlited and the pop up error appears while shift+insert again gives ~

Can you highlight and not use the copy option? (Keep your copy clipboard clean)

Then click into the terminal to shift-insert?

Unfortunately itā€™s not working either, even with clipboard clean it still results in ~ when I shift+insert.
(I even win key+v to check and make sure the clipboard was actually clean :confused: )

And when you are doing this your computerā€™s language setting is always English United States?

Hi, please log in onto your CodeAlly account and run project directly from theirs site.

2 Likes

No, Iā€™m not US based.
Nevertheless to exclude all possibilities, I changed system language and settings to EN US, restarted the laptop and replicaded each scenario mentioned above. Still unsuccesful

I hope this can clear any doubts that the issue might be on the machine Iā€™m using and be useful information to identify and fix the problem on freecodecamp.com

Hey,
I experienced the same problem. The post here that solved my problem was the one of jakub-baran.

Open the Codeally website (CodeAlly) and simply click run code on the right for the specific project you are working on. I was able to use the clipboard now, working with the Codeally URL in Chrome.

And I really need to use it, as the backslash command is not working on non-English keyboards either in PSQL on my Mac nor in the remote environment. So I need to copy the backslash all the time. Itā€™s really annoying but there seems to be no solution other than buying a English-layouted keyboard or changing layout.

Thanks for helping out.

3 Likes

Hey Guys! If you are using Chrome on a laptop having Windows/Linux, get tilda ā€˜~ā€™ on pressing the ā€˜shift + insertā€™ buttons then you can try this. Just use Fn ā€˜Functionā€™ key - if your insert key on the keyboard has different functions like on a single press itā€™s a delete and with the ā€˜Fnā€™ key it inserts - on your keyboard with the combination. It would work like a charm. Thanks, Gaurav

Any updates on this? Iā€™ve tried all the solutions here and nothing is working. very frustrating. Thanks.

1 Like