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

"Test Runner Failed" error when I try to run freeCodeCamp tutorial(working on gitpod) in my local VSCode #618

Open
ndubbaka opened this issue Jul 19, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@ndubbaka
Copy link

Describe the bug
tutorial at https://raw.githubusercontent.com/freeCodeCamp/learn-relational-databases-by-building-a-mario-database/main/tutorial.json is working on gitpod from https://www.freecodecamp.org/learn/relational-database/learn-relational-databases-by-building-a-mario-database/build-a-mario-database but it's not working locally on my Mac visual studio code.

To Reproduce
Steps to reproduce the behavior:

  1. import tutorial in local VS code https://raw.githubusercontent.com/freeCodeCamp/learn-relational-databases-by-building-a-mario-database/main/tutorial.json
  2. Click on 'start' button
  3. first level, first step: "Once you open a new one, type echo hello PostgreSQL into the terminal and press enter."
  4. I made sure I opened bash terminal in vs code since https://github.com/freeCodeCamp/learn-relational-databases-by-building-a-mario-database/blob/v2.0.0/.freeCodeCamp/test/10.test.js const lastCommand = await getLastCommand(); assert(lastCommand[0] === 'echo' && lastCommand[1] === 'hello' && lastCommand[2] === 'PostgreSQL'); has the function getLastCommand https://github.com/freeCodeCamp/learn-relational-databases-by-building-a-mario-database/blob/v2.0.0/.freeCodeCamp/test/utils.js#L9 which is looking at .bash_history file. const getLastCommand = async (howManyBack = 0, parse = true, dir = process.cwd()) => { const pathToBashLogs = path.join(dir, '../../', '.bash_history');
  5. Click on 'Run' button
  6. See error "Test Runner Failed"
    image

Expected behavior
not see the error "Test Runner Failed" and I am expected to successfully complete level 1 & navigate to level 2.

Desktop:

  • Platform: Mac
  • OS: MacOS Ventura
  • Version 13.5

VSCode:

  • Version 1.91.1 (Universal)

Node:

  • Version v18.18.1

Git (please complete the following information):

  • Version 2.39.3 (Apple Git-145)
@ndubbaka ndubbaka added the bug Something isn't working label Jul 19, 2024
@jcandan
Copy link

jcandan commented Jan 27, 2025

I wonder if this doesn't support zsh.

Could you possibly attempt this tutorial build from a bash environment?

I'd check, but am currently having other issues with VS Code and CodeRoad. I'll try to circle back to this at some point.

@jcandan
Copy link

jcandan commented Jan 27, 2025

Oh. I just read your attempt to accommodate with bash. Sorry I missed that. So I can assume the zsh message shown is letting you know something other than bash is default.

Confirmed this issue exists on my machine:

When I get to the first lesson, and I run echo hello PostgreSQL, it should run the test. It does not. If I click Run, the Test Runner Failed is shown.

Desktop (please complete the following information):

  • Platfrom: Windows 11 Version 23H2 (OS Build 22631.2861)
  • OS: Ubuntu via WSL2
  • Version 24.04.1

Node (please complete the following information):

  • Version v23.6.1

Git (please complete the following information):

  • Version 2.43.0

Additional context

GNU bash, version 5.2.21(1)-release (x86_64-pc-linux-gnu)

@jcandan
Copy link

jcandan commented Jan 27, 2025

I can also confirm this is affecting locally built tutorials.

After overcoming #626 with the work-around described there, after uploading and starting the tutorial.json file from Open your tutorial, it is **not ** running the test when I create the index.html file, nor passing when hitting run.

@jcandan
Copy link

jcandan commented Jan 27, 2025

Well, I just attempted to run my instance of Create a Practice Tutorial in Gitpod by borrowing from freeCodeCamp's implementations, but still couldn't get it to run or pass a test.

Start Gitpod with jcandan/first-coderoad-tutorial

So, there's something wrong with my implementation, perhaps. Therefore, my confirmation is still only that the mario database project from the original post is having this issue. My project can't be considered an additional confirmation.

@jcandan
Copy link

jcandan commented Feb 5, 2025

I think I have the steps needed:

  1. Open VSCode
  2. Open an empty folder
  3. Run CodeRoad: Start from the Command Pallete.
  4. Hit Start New Tutorial
  5. Choose File, and upload a tutorial.json file
  6. Open terminal, and in this empty project folder, run git init.
  7. Hit Start on the tutorial

#629 may help to address documentation or user experience issues.

Let us know if the above steps help resolve being able to run tutorials locally.

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

3 participants