💡 [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:

6 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.

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