Issues with Code Road extension, collated posts

So I am following the Relational databases course and I am having some problems trying to move to the next tutorial. I just finished the third tutorial but now I can’t move to the next one. I think it has something to do with CodeRoad, because every time that I rebuild the container the extension is not installed by default and when I start it, it doesn’t show me the place to paste the URL for the next tutorial. What can I do?

I found a solution for this. You just need to uninstall CodeRoad form the extensions panel and install it again. Then you should rebuild your container.

2 Likes

Today When I try to start the CodeRoad I get this error Error loading webview: Error: Could not register service worker: InvalidStateError: Failed to register a ServiceWorker: The document is in an invalid state

1 Like

maybe it is time to open a github issue and see what the fCC maintainers can do.

Thank you for helping make FCC better. Bugs can be reported as GitHub Issues. Whenever reporting a bug, please check first that there isn’t already an issue for it and provide as much detail as possible.

Like many others, I’ve been struggling with the local Docker setup for freeCodeCamp’s Relational Database course. After 3 days of troubleshooting, I finally found a reliable solution that works consistently.

My Setup:

  • Mac M1
  • Docker Desktop
  • No technical background (so I might be overdoing some steps, but this works for me!)

The Solution (11 Steps)

  1. Delete your user token from freeCodeCamp profile settings
  2. Comment out the token line in Dockerfile:

dockerfile

# ENV CODEROAD_WEBHOOK_TOKEN=your-token-here

Remember to save the file

  1. Run cache cleanup commands (see below)
  2. Quit Docker Desktop completely
  3. Restart Docker Desktop
  4. Build the container following freeCodeCamp instructions but skip token generation
  • Stop at step 3 (before CodeRoad setup)
  1. Run cache cleanup commands again
  2. Quit Docker Desktop
  3. Generate a new token in freeCodeCamp, add it to Dockerfile, and save
  4. Build the container again
  5. Complete the remaining freeCodeCamp setup steps

Cache Cleanup Commands

Run these in your terminal one by one:

bash

docker system prune -a --volumes
docker builder prune -a
rm -rf ~/.vscode/extensions/coderoad*
rm -rf ~/Library/Application\ Support/Code/User/workspaceStorage/

Success Indicators

:white_check_mark: When setup works correctly:

  • VS Code changes from black to ocean blue theme (not sure why this happens!)
  • Terminal prompt shows: camper: /project$

:cross_mark: When setup failed:

  • Terminal prompt shows: camper@097163d61364:/workspace/project$

Important Notes

  • I use my computer’s terminal, not VS Code’s integrated terminal (might be relevant)
  • Progress can be lost: I left the “Build a Kitty Ipsum Translator” tutorial half-finished overnight, and it stopped working the next morning. Had to repeat all steps and lost my progress.
  • This seems excessive but it’s the most reliable method I’ve found
  • I just ended the “Build a Kitty Ipsum Translator” tutorial and progress in my freeCodeCamp was correctly recorded and saved.

This solution has worked consistently for me. Hope it helps others facing similar Docker/CodeRoad issues!

4 Likes

there are instructions in the readme file in the repo to help avoid this scenario. I haven’t tried them but I did see them there:

How to Restart or Switch Projects

Note: If you restart or switch projects you will lose your progress, along with any files or directories you created.

  1. Press Ctrl / Cmd + Shift + P and enter Dev Containers: Rebuild Container
  2. Wait for VS Code to reopen and reload the Docker container
  3. Open CodeRoad, enter the URL to a tutorial.json file, and start the project as described above

Maybe there is some context I missed.

I was having 2 main problems before doing this overkill steps.

1- I couldn’t advance. I was having the same issue than arber:

So I am following the Relational databases course and I am having some problems trying to move to the next tutorial. I just finished the third tutorial but now I can’t move to the next one. I think it has something to do with CodeRoad, because every time that I rebuild the container the extension is not installed by default and when I start it, it doesn’t show me the place to paste the URL for the next tutorial. What can I do?

The problem is, the solution he/she found didn’t worked for me.

2- When for some divine reason I made to the next tutorial the bash terminal detection from CodeRoad didn’t worked. So I typed the commands but could’t advance. This is the same problem reported on this thread Learn SQL by Building a Student Database: Part 2 - Build a Student Database: Part 2 by gabriellillo.

I retried it multiple times using the readme, the course and some instructions from this forum and didn’t work. So in my conclusion the problem might be on how VSCode, CodeRoad and Docker deal with the token and some information on their caches. Maybe is just my machine, but I saw a lot of other users having the same issues as me.

So, If somebody is in the same situation as me, I expect this helps.

1 Like

Thanks again for digging into this and debugging everyone. I will take a look when I get a chance and see we can make it more reliable.

I’ve been playing with this a bit today. I unpinned CodeRoad, so if you update your rdb-alpha repo, it should install CodeRoad when you load the container.

I believe it was pinned because of the other issues we are having. VSCode extensions can save things to your computer (outside the container), even when running in a container. For instance, maybe the tutorial and step you are on - and it persists even if you delete docker containers/volumes/etc - so docker isn’t the issue as far as I can tell. So it was opening to the middle of a course after rebuilding the container and would be stuck there.

I believe the bottom two commands that @f.labarca.mercado found will clean up that local storage and allow you to start fresh - note that they are OS specific and can delete storage for other extension (the bottom one can I think anyway). I found an alternative workaround - not sure if it’s any better…

  1. Go to the rdb-alpha folder in the terminal
  2. Run code --user-data-dir ./vscode-profile --extensions-dir ./vscode-extensions .

This sets the path for VSCode’s data folders. vscode-profile and vscode-extensions folders will be created in the rdb-alpha folder when you launch it like this - and those will be used instead of the ones elsewhere on your system. Since the folders are empty, you will need to:

  1. Install the dev-containers extension again (You should get a little prompt to install it) - and:
  2. Run Reopen in Container (You should get a little prompt for that too).

Now you can launch CodeRoad as usual and start a fresh course. If you close the window while in the middle of a course, you should be able to continue with the Reopen in container command (not Rebuild and Reopen). To start fresh again (start a different course), delete those two folders (vscode-profile and vscode-extensions) and repeat steps 1 and 2.

I will see if I can find a way to make running these easier.

5 Likes

there’s been some issues with some campers getting through the setup but their coderoad doesn’t detect when the proper commands are being entered for some reason.

I think there’s some confusion with the initial instructions maybe in that they say to find the hamburger menu and open up a terminal but in my version of vscode, there is no hamburger menu to use for that (I used a short-cut instead).

Also the issue of not knowing if you’re in a docker container or not (it takes some getting used to - to figure that out at least) may come up for some.

1 Like

another thought. Some people won’t know that an update has been made to the repo. Should the instructions always say to pull the latest updates each time they go back in to work on something?

these steps don’t work on wsl’s ubuntu because the flags are not recognized.

Edit: but I came up with a workaround here "Rebuild and Reopen in Container" does not show up in DevContainers - #27 by hbar1st

1 Like

Hi everyone!

I ran into a problem with the “Build a Boilerplate” project. CodeRoad is showing the error “Test Runner Failed.”

I followed all the steps as described here: https://www.freecodecamp.org/learn/relational-database/learn-bash-by-building-a-boilerplate/build-a-boilerplate

Does anyone know what the issue might be? I’d really appreciate any help! Have a great day, everyone!

1 Like

i think your best bet is to redo the instructions from scratch but only after cleaning up your docker environment (and removing the directory).

Which operating system are you on?

any update on this? Windows users especially are struggling. (My instructions are written for people who use wsl so not for beginners and the beginners need too much of my time in order to get setup with the workaround I came up with)

Tank you!
it was solution to me.
but i use only 5 steps of your method, then i followed the instructions from freeCodeCamp, inserted the URL in the corresponding field, and it worked

1 Like

Updates:
Everything worked through WSL2 on Windows.
Installed Git in WSL2.
Cloned the repository in WSL2.
Then followed the instructions

@hbar1st Thanks for the tips and help!
Thanks to everyone who shared their problems and solutions in the chat.

2 Likes

thank you for the shout-out. I hope that there is an official solution coming soon from @moT01 (please and thank you!)

Edit: would be great if someone created a pinned doc in the archived course to help out everyone using the course since this topic keeps getting buried.

more than a month later, and I’m still till having to go and find this for people…wish there was a pinned post that people can find.